Parcourir la source

Shortened candidates' names to single forename. Layout improvements.

tags/last-sinatra-version
Adrian Short il y a 14 ans
Parent
révision
a3b7f5bcd4
5 fichiers modifiés avec 42 ajouts et 32 suppressions
  1. +12
    -9
      public/style.css
  2. +10
    -4
      views/about.haml
  3. +4
    -2
      views/home.haml
  4. +13
    -14
      views/layout.haml
  5. +3
    -3
      views/wards.haml

+ 12
- 9
public/style.css Voir le fichier

@@ -3,12 +3,18 @@ body
background-color: #fff;
color: #555;
font-family: Helvetica, Arial, sans-serif;
font-size: 100%;
width: 760px;
margin: 20px auto;
margin: 60px auto;
line-height: 1.5em;
}

p
{
font-size: 110%;
}

input
{
font-size: 130%;
@@ -29,13 +35,15 @@ input.postcode
{
font-size: 100%;
background-color: #fff;
text-align: right;
text-align: left;
margin: 40px 0;
}

.credit
{
text-align: right;
text-align: left;
font-size: 80%;
display: none;
}

a, a:visited
@@ -81,7 +89,7 @@ a.date

#header
{
margin-bottom: 60px;
margin-bottom: 0px;
}

h1
@@ -112,9 +120,4 @@ h1
strong
{
color: #000;
}

.border_right
{
border-right: 0px solid #ccc;
}

+ 10
- 4
views/about.haml Voir le fichier

@@ -11,18 +11,24 @@
%a{ :href => "http://twitter.com/adrianshort" }<follow me on Twitter
\.
%p.highlight This site is independent of Sutton Council, all political parties and candidates. It exists only to provide information about the voting system and local candidates.
%p.highlight This site is independent of Sutton Council, all political parties and candidates.
%p
The council candidates' data comes from Sutton Council who also provided information on council wards and parliamentary constituencies.
%p
This site is written in Ruby using the Sinatra framework.
%p
The code for this website is open source and managed on Github. It is hosted by Heroku.
%p
The postcode lookup is done by UK Postcodes using open data from Ordnance Survey Code-Point Open enhanced by MySociety. I use the Ruby Pat gem to access the postcodes API.
The postcode lookup is done by UK Postcodes using open data from Ordnance Survey enhanced by MySociety. I use the Ruby Pat gem to access the postcodes API.
%p
This site is written in Ruby using the Sinatra framework. The HTML templates use Haml. The database is SQLite for development and PostgreSQL for production, abstracted through DataMapper. Source control and deployment is done with Git.
The HTML templates use Haml. The database is SQLite for development and PostgreSQL for production, abstracted through DataMapper.
%p
Source control and deployment is done with Git.
-#


+ 4
- 2
views/home.haml Voir le fichier

@@ -1,8 +1,10 @@
.grid_9
%h1
Vote for your MP and councillors
Vote for your MP and
%br
in Sutton on 6 May
councillors in Sutton
%br
on 6 May
%p
On 6 May 2010 you can vote to


+ 13
- 14
views/layout.haml Voir le fichier

@@ -17,18 +17,17 @@
= yield
.clear
#footer
.grid_9
&nbsp;
.grid_3
%p
%a{ :href => '/' } Home
%p
%a{ :href => '/how-the-council-election-works' } How the council election works
-#
.grid_12
%p
%a{ :href => '/voting' } How to vote
%p
%a{ :href => '/about' } About this website
%p.credit
Design
%a{ :href => "http://adrianshort.co.uk/" } Adrian Short
%a{ :href => '/' } Home
%p
%a{ :href => '/how-the-council-election-works' } How the council election works
-#
%p
%a{ :href => '/voting' } How to vote
%p
%a{ :href => '/about' } About this website
%p.credit
Design
%a{ :href => "http://adrianshort.co.uk/" } Adrian Short
.clear

+ 3
- 3
views/wards.haml Voir le fichier

@@ -4,7 +4,7 @@
If you live in
= @postcode

.grid_6.border_right
.grid_6
%h1
= @ward.constituency.name
member of parliament
@@ -42,7 +42,7 @@
- for candidate in @parly_candidates
%p
%span.candidate_name
= candidate.forenames
= candidate.forenames.split(' ')[0]
= candidate.surname
%br
%span.candidate_party
@@ -60,7 +60,7 @@
- for candidate in @council_candidates
%p
%span.candidate_name
= candidate.forenames
= candidate.forenames.split(' ')[0]
= candidate.surname
%br
%span.candidate_party

Chargement…
Annuler
Enregistrer