From 5fc14804395234c84a8029711f56c3ed665fdbfc Mon Sep 17 00:00:00 2001 From: Adrian Short Date: Fri, 16 Apr 2010 20:35:19 +0100 Subject: [PATCH] Distinct visited link colours are always a good idea --- lib/models.rb | 18 +++++++++--------- public/style.css | 8 ++++++++ 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/lib/models.rb b/lib/models.rb index a366d9a..73b276b 100644 --- a/lib/models.rb +++ b/lib/models.rb @@ -19,12 +19,12 @@ end class Ward include DataMapper::Resource - property :id, Serial - property :ons_id, String, :required => true - property :name, String, :required => true - property :constituency_id, Integer, :required => true + property :id, Serial + property :ons_id, String, :required => true + property :name, String, :required => true + property :constituency_id, Integer, :required => true - has n, :councilcandidates, :order => [ 'surname' ] + has n, :councilcandidates, :order => ['surname'] belongs_to :constituency def self.slugify(name) @@ -39,8 +39,8 @@ class Party property :id, Serial property :name, String, :required => true - has n, :councilcandidates, :order => [ 'surname' ] - has n, :parliamentcandidates, :order => [ 'surname' ] + has n, :councilcandidates, :order => ['surname'] + has n, :parliamentcandidates, :order => ['surname'] end class Councilcandidate @@ -79,8 +79,8 @@ class Constituency property :id, Serial property :name, String, :required => true - has n, :wards, :order => 'name' - has n, :parliamentcandidates, :order => [ 'surname' ] + has n, :wards, :order => ['name'] + has n, :parliamentcandidates, :order => ['surname'] end DataMapper.setup(:default, ENV['DATABASE_URL'] || "sqlite3://#{Dir.pwd}/db.sqlite3") diff --git a/public/style.css b/public/style.css index ac260ac..426a672 100644 --- a/public/style.css +++ b/public/style.css @@ -51,6 +51,14 @@ a, a:visited text-decoration: none; } +a:visited +{ + background-color: #eee; + padding: 1px 4px; + color: #111; + text-decoration: none; +} + a:hover { background-color: #4f4f4f;