瀏覽代碼

Add Guides tab to top nav. Fix #28

tags/last-sinatra-version
Adrian Short 8 年之前
父節點
當前提交
e2238ffd3f
共有 6 個檔案被更改,包括 24 行新增12 行删除
  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 查看文件

@@ -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 查看文件

@@ -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 查看文件

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

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

%p


+ 9
- 0
views/guides.haml 查看文件

@@ -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 查看文件

@@ -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 查看文件

@@ -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…
取消
儲存