@@ -1,5 +1,6 @@ | |||||
require 'scraperwiki' | require 'scraperwiki' | ||||
require 'petrify' | require 'petrify' | ||||
require 'csv' | |||||
class Site | class Site | ||||
def self.generate | def self.generate | ||||
@@ -69,4 +70,8 @@ class Site | |||||
Petrify.csv(path, slug(auth['authority_name']), apps) | Petrify.csv(path, slug(auth['authority_name']), apps) | ||||
end | end | ||||
end | end | ||||
# Media page | |||||
media_items = CSV.read('media.csv', :headers => true ) | |||||
Petrify.page('media', 'media', { media_items: media_items }) | |||||
end | end |
@@ -188,6 +188,11 @@ nav | |||||
padding: 0 10px 0 0; | padding: 0 10px 0 0; | ||||
} | } | ||||
.tags { | |||||
font-size: 0.7rem; | |||||
text-transform: uppercase; | |||||
} | |||||
@media print { | @media print { | ||||
.noprint, footer, .nav, nav | .noprint, footer, .nav, nav | ||||
{ | { | ||||
@@ -21,6 +21,10 @@ | |||||
%li | %li | ||||
%a{ :href => '/appeals/' }< | %a{ :href => '/appeals/' }< | ||||
Appeals | Appeals | ||||
%li | |||||
%a{ :href => '/media/' }< | |||||
Media | |||||
= yield | = yield | ||||
%footer | %footer | ||||
@@ -0,0 +1,19 @@ | |||||
%h1 Media | |||||
%p | |||||
%a.button{ :href => 'https://github.com/adrianshort/kiosks/blob/master/media.csv' } | |||||
Add more media here | |||||
%table | |||||
- media_items.each do |item| | |||||
%tr | |||||
%td.nowrap= short_date(item['publish_date']) | |||||
%td.nowrap= item['publication'] | |||||
%td | |||||
%a{ :href => item['url'] }< | |||||
= item['title'] | |||||
-# | |||||
%div.tags | |||||
- item['authorities'].split('|').each do |authority| | |||||
%a{ :href => authority_url(authority) }< | |||||
= authority |