@@ -1,9 +1,9 @@ | |||||
body | body | ||||
{ | { | ||||
background-color: beige; | |||||
background-color: #eee; | |||||
font-family: Helvetica, Arial, sans-serif; | font-family: Helvetica, Arial, sans-serif; | ||||
width: 760px; | |||||
margin: 40px auto; | |||||
width: 450px; | |||||
margin: 60px auto; | |||||
} | } | ||||
@@ -16,4 +16,30 @@ input | |||||
.highlight | .highlight | ||||
{ | { | ||||
background-color: yellow; | background-color: yellow; | ||||
} | |||||
} | |||||
#main | |||||
{ | |||||
margin: 60px 0; | |||||
} | |||||
#footer | |||||
{ | |||||
font-size: 90%; | |||||
text-align: right; | |||||
} | |||||
a, a:visited | |||||
{ | |||||
padding: 2px 5px; | |||||
background-color: #333; | |||||
color: #fff; | |||||
text-decoration: none; | |||||
} | |||||
a:hover | |||||
{ | |||||
background-color: #fff; | |||||
color: #333; | |||||
} | |||||
@@ -1,6 +1,9 @@ | |||||
%h2 | |||||
Who are my local candidates in the Sutton Council elections on 6 May? | |||||
%form{ :method => 'get', :action => '/wards' } | %form{ :method => 'get', :action => '/wards' } | ||||
%label{ :for => "postcode" } Postcode | |||||
%input{ :type => 'text', :name => 'postcode', :size => 8, :maxlength => 8 } | |||||
%label{ :for => "postcode" } My postcode is | |||||
%input{ :type => 'text', :name => 'postcode', :value => 'SM1 1EA', :size => 8, :maxlength => 8 } | |||||
%input{ :type => 'submit', :value => "Find" } | %input{ :type => 'submit', :value => "Find" } | ||||
-# | -# | ||||
- for ward in @wards | - for ward in @wards |
@@ -5,11 +5,11 @@ | |||||
%link{ :rel => 'stylesheet', :type => 'text/css', :href => 'style.css' } | %link{ :rel => 'stylesheet', :type => 'text/css', :href => 'style.css' } | ||||
%body | %body | ||||
#header | #header | ||||
%h1 Find My Candidates | |||||
%h1 | |||||
%a{ :href => '/' } Find My Candidates | |||||
#main | #main | ||||
= yield | = yield | ||||
#footer | #footer | ||||
%hr | |||||
%p | %p | ||||
Made by | |||||
Design | |||||
%a{ :href => "http://adrianshort.co.uk/" } Adrian Short | %a{ :href => "http://adrianshort.co.uk/" } Adrian Short |
@@ -1,7 +1,8 @@ | |||||
%h2 | %h2 | ||||
%span.highlight | |||||
= @postcode | |||||
= @postcode | |||||
is in | is in | ||||
= @ward_name | |||||
Ward in | |||||
%span.highlight | |||||
= @ward_name | |||||
Ward | |||||
in | |||||
= @district_name | = @district_name |