Explorar el Código

Added about.haml, style improvements

tags/last-sinatra-version
Adrian Short hace 14 años
padre
commit
a84a4b501e
Se han modificado 4 ficheros con 83 adiciones y 4 borrados
  1. +4
    -1
      app.rb
  2. +7
    -2
      public/style.css
  3. +65
    -0
      views/about.haml
  4. +7
    -1
      views/home.haml

+ 4
- 1
app.rb Ver fichero

@@ -19,4 +19,7 @@ get '/wards' do
@ward_name = result_ary['administrative']['ward']['title']
haml :wards
end

get '/about' do
haml :about
end

+ 7
- 2
public/style.css Ver fichero

@@ -1,9 +1,10 @@
body
{
background-color: #eee;
background-color: #fffeda;
font-family: Helvetica, Arial, sans-serif;
width: 450px;
width: 600px;
margin: 60px auto;
line-height: 1.5em;
}

@@ -43,3 +44,7 @@ a:hover
color: #333;
}

h2
{
margin-top: 50px;
}

+ 65
- 0
views/about.haml Ver fichero

@@ -0,0 +1,65 @@
%h1 How the council election works

%p On 6 May 2010 you get to choose your local councillors and to decide who runs Sutton Council for the next four years.

%p The borough is divided into 18 areas called wards.

%p Each ward has three councillors. That makes 54 councillors for the whole borough.

%p You get three votes to choose three councillors for your ward from the list of candidates.

%p The three people with the most votes in each ward become the councillors for that ward.

%p If a political party gets 28 or more councillors they get to run the council and decide its policies and services until the next election in four years time.


%h2 Registering 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.


%h2 Voting

%h3 Voting at your polling station

%p Most people vote at their local polling station. This is usually in a school, hall or community centre near you.

%p
The council will send you a
%strong poll card
showing you where to vote.

%p If you lose your poll card, don't worry. You can still vote as long as you are registered.

%p
You can vote at your polling station
%strong between 7am and 10pm on 6 May.

%p If you don't want to vote at a polling station or are unable to get there you can also:

%ul
%li vote by post
%li ask someone to vote for you

%h3 Voting by post

%p Anyone can apply to vote by post.

%p If you are registered to vote by post you won't be allowed to vote at a polling station.

%h3 Asking someone to vote for you

%p
You can choose to have someone vote for you at the polling station. This is called a
%strong proxy vote.

%p If you want to vote by post or have someone vote for you and haven't already told Sutton Council about this, do it straight away.

+ 7
- 1
views/home.haml Ver fichero

@@ -5,6 +5,12 @@
%label{ :for => "postcode" } My postcode is
%input{ :type => 'text', :name => 'postcode', :value => 'SM1 1EA', :size => 8, :maxlength => 8 }
%input{ :type => 'submit', :value => "Find" }
%p
%a{ :href => '/about' } How the council election works
-#
- for ward in @wards
%p= ward
%p= ward

Cargando…
Cancelar
Guardar