Kaynağa Gözat

Distinct visited link colours are always a good idea

tags/last-sinatra-version
Adrian Short 14 yıl önce
ebeveyn
işleme
5fc1480439
2 değiştirilmiş dosya ile 17 ekleme ve 9 silme
  1. +9
    -9
      lib/models.rb
  2. +8
    -0
      public/style.css

+ 9
- 9
lib/models.rb Dosyayı Görüntüle

@@ -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 Dosyayı Görüntüle

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


Yükleniyor…
İptal
Kaydet