Selaa lähdekoodia

Distinct visited link colours are always a good idea

tags/last-sinatra-version
Adrian Short 14 vuotta sitten
vanhempi
commit
5fc1480439
2 muutettua tiedostoa jossa 17 lisäystä ja 9 poistoa
  1. +9
    -9
      lib/models.rb
  2. +8
    -0
      public/style.css

+ 9
- 9
lib/models.rb Näytä tiedosto

@@ -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")

+ 8
- 0
public/style.css Näytä tiedosto

@@ -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;


Ladataan…
Peruuta
Tallenna