Browse Source

Add Guides tab to top nav. Fix #28

tags/last-sinatra-version
Adrian Short 8 years ago
parent
commit
e2238ffd3f
6 changed files with 24 additions and 12 deletions
  1. +6
    -2
      app.rb
  2. +0
    -8
      views/about.haml
  3. +3
    -0
      views/election.haml
  4. +9
    -0
      views/guides.haml
  5. +2
    -1
      views/layout.haml
  6. +4
    -1
      views/parliament.haml

+ 6
- 2
app.rb View File

@@ -293,11 +293,11 @@ get '/bodies/:body/:districts_name/:district' do
haml :district
end

get '/how-the-council-election-works' do
get '/guides/how-the-council-election-works' do
haml :election
end

get '/how-the-parliament-election-works' do
get '/guides/how-the-parliament-election-works' do
haml :parliament
end

@@ -305,6 +305,10 @@ get '/error' do
haml :error
end

get '/guides' do
haml :guides
end

get '/about' do
haml :about
end


+ 0
- 8
views/about.haml View File

@@ -15,11 +15,3 @@
and
%a{ :href => "http://www.ordnancesurvey.co.uk/business-and-government/products/code-point-open.html" }
Ordnance Survey.

%ul
%li.pure-menu-item
%a{ :href => '/how-the-parliament-election-works' }
About parliamentary elections
%li.pure-menu-item
%a{ :href => '/how-the-council-election-works' }
About council elections

+ 3
- 0
views/election.haml View File

@@ -1,3 +1,6 @@
%nav
%a{ :href => '/guides'} « Guides

%h1= @page_title = "How council elections work"

%p


+ 9
- 0
views/guides.haml View File

@@ -0,0 +1,9 @@
%h1= @page_title = "Guides"

%ul
%li
%a{ :href => '/guides/how-the-parliament-election-works' }
How parliamentary elections work
%li
%a{ :href => '/guides/how-the-council-election-works' }
How council elections work

+ 2
- 1
views/layout.haml View File

@@ -20,9 +20,10 @@
%li.pure-menu-item
%a{ :href => "/bodies/#{body.slug}" }
= body.name
elections
%li.pure-menu-item
%a{ :href => '/candidates' } Candidates
%li.pure-menu-item
%a{ :href => '/guides' } Guides
%li.pure-menu-item
%a{ :href => '/about' } About



+ 4
- 1
views/parliament.haml View File

@@ -1,4 +1,7 @@
%h1= @page_title = "How parliament elections work"
%nav
%a{ :href => '/guides'} « Guides

%h1= @page_title = "How parliamentary elections work"

%p In parliament elections you can vote for your local member of parliament (MP) and help to decide who governs the UK.



Loading…
Cancel
Save