Explorar el Código

Added print stylesheet, parliament elections page. Moved voter registration text to a partial.

tags/last-sinatra-version
Adrian Short hace 14 años
padre
commit
cbb80972af
Se han modificado 10 ficheros con 48 adiciones y 24 borrados
  1. +1
    -0
      .gems
  2. +5
    -0
      app.rb
  3. +9
    -0
      public/print.css
  4. +4
    -4
      public/style.css
  5. +12
    -0
      views/_register-to-vote.haml
  6. +3
    -3
      views/about.haml
  7. +1
    -13
      views/election.haml
  8. +3
    -0
      views/layout.haml
  9. +6
    -0
      views/parliament.haml
  10. +4
    -4
      views/wards.haml

+ 1
- 0
.gems Ver fichero

@@ -1,2 +1,3 @@
pat --source gemcutter.org
sbfaulkner-sinatra-helpers -s http://gems.github.com


+ 5
- 0
app.rb Ver fichero

@@ -1,5 +1,6 @@
require 'rubygems'
require 'sinatra'
require 'sinatra-helpers/haml/partials'
require 'haml'
require 'pat'
require 'dm-core'
@@ -39,6 +40,10 @@ get '/how-the-council-election-works' do
haml :election
end

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

# get '/voting' do
# haml :voting
# end


+ 9
- 0
public/print.css Ver fichero

@@ -0,0 +1,9 @@
.noprint, #footer
{
display: none;
}

body
{
margin: 0 auto;
}

+ 4
- 4
public/style.css Ver fichero

@@ -41,7 +41,7 @@ input.postcode
font-size: 100%;
background-color: #fff;
text-align: left;
margin: 40px 0;
margin: 40px 0 0 0;
}

.credit
@@ -54,7 +54,7 @@ input.postcode
a, a:visited
{
background-color: #d9ec96;
padding: 2px 5px;
padding: 1px 4px;
color: #111;
text-decoration: none;
}
@@ -62,7 +62,7 @@ a, a:visited
a:hover
{
background-color: #4f4f4f;
color: #86a11d;
color: #fff;
}

a.date
@@ -82,7 +82,7 @@ a.date
h1
{
margin-top: 20px;
line-height: 1.5em;
line-height: 1.4em;
font-weight: bold;
color: #86a11d;
}


+ 12
- 0
views/_register-to-vote.haml Ver fichero

@@ -0,0 +1,12 @@
%h2 Register to vote

%p
If you're not already registered to vote you must do so by
%strong 20 April
otherwise you won't be able to take part.

%p
You can get a registration form at the
%a{ :href => "http://www.aboutmyvote.co.uk/" } About My Vote
website or by phoning Sutton Council on
%span{ :class => 'phone' } 020 8770 4888.

+ 3
- 3
views/about.haml Ver fichero

@@ -3,12 +3,12 @@
%p
This website was designed and written by
%a{ :href => 'http://adrianshort.co.uk' }> Adrian Short
%a{ :href => 'http://adrianshort.co.uk' } Adrian Short
\.
You can contact me by email at
%a{ :href => "mailto:adrian.short@gmail.com" }< adrian.short@gmail.com
%a{ :href => "mailto:adrian.short@gmail.com" } adrian.short@gmail.com
and
%a{ :href => "http://twitter.com/adrianshort" }<follow me on Twitter
%a{ :href => "http://twitter.com/adrianshort" } follow me on Twitter
\.
%p.highlight This site is independent of Sutton Council, all political parties and candidates.


+ 1
- 13
views/election.haml Ver fichero

@@ -13,16 +13,4 @@
%p If a political party gets 28 or more councillors they get to run Sutton Council and decide its policies and services until the next election in four years time.
%h2 Register to vote
%p
If you're not already registered to vote you must do so by
%strong 20 April
otherwise you won't be able to take part.
%p
You can get a registration form at the
%a{ :href => "http://www.aboutmyvote.co.uk/" } About My Vote
website or by phoning Sutton Council on
%span{ :class => 'phone' } 020 8770 4888.
= haml_partial('register-to-vote')

+ 3
- 0
views/layout.haml Ver fichero

@@ -4,6 +4,7 @@
%head
%title Sutton Elections 6 May 2010
%link{ :rel => 'stylesheet', :type => 'text/css', :href => '/style.css' }
%link{ :rel => 'stylesheet', :type => 'text/css', :href => '/print.css', :media => 'print' }
%link{ :rel => 'stylesheet', :type => 'text/css', :href => '/grid.css' }
<script type="text/javascript" src="http://use.typekit.com/wfg6cvc.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
@@ -20,6 +21,8 @@
.grid_12
%p
%a{ :href => '/' } Home
%p
%a{ :href => '/how-the-parliament-election-works' } How the parliament election works
%p
%a{ :href => '/how-the-council-election-works' } How the council election works
-#


+ 6
- 0
views/parliament.haml Ver fichero

@@ -0,0 +1,6 @@
.grid_9
%h1 How the parliament election works
%p Text to follow&hellip;
= haml_partial('register-to-vote')

+ 4
- 4
views/wards.haml Ver fichero

@@ -7,7 +7,7 @@
.grid_6
%h1
= @ward.constituency.name
member of parliament
MP candidates

.grid_6
%h1
@@ -21,8 +21,8 @@
You can vote for
%strong
ONE
of these people to become your next MP.
%p
of these people to become your member of parliament.
%p.noprint
Find out more about
%a{ :href => '/how-the-parliament-election-works' } how the parliament election works.

@@ -32,7 +32,7 @@
%strong
THREE
of these people to become your local councillors.
%p
%p.noprint
Find out more about
%a{ :href => '/how-the-council-election-works' } how the council election works.



Cargando…
Cancelar
Guardar