Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
65 lines (56 sloc) 1.8 KB
- @previous_tags = []
#pre_front
%h2 A Year of Links: #{@year.year_string}
#colophon
%p
© 2012-#{Time.now.year} Alex Forey
%br
Set in Museo Sans and Helvetica Neue Light.
Data extracted from Markpond.
%br
https://markpond.com/u/alex
#cover
%h1 A Year of Links: #{@year.year_string}
%h2 Alex Forey
%h3 Volume #{@year.volume_number}
#toc
%h2 Contents
%ul.contents
-@bookmarks_by_month.each do |month, collection|
%li
%a{:href => "##{mark_hash(month)}"}= month
- @bookmarks_by_month.each do |month, collection|
- if collection.any?
%h2.month
%a{:name => mark_hash(month)}
= month
.month_collection
- collection.group_by(&:day).each do |day, day_collection|
- if day_collection.any?
.day_container
%h3.day= format_date(day_collection.first.bookmarked_at)
%ul.bookmarks
- for bookmark in day_collection
%li.bookmark
.qr
%img{:src => bookmark.qr_for_url}
.bookmark_itself
%h4= h bookmark.title
.href= h bookmark.url
.desc= h bookmark.excerpt
- if bookmark.via
.via= h "Via: " + bookmark.via
.tags
-output = []
- bookmark.tags.each do |t|
- unique_id, new_previous_tags = id_for_tag(t, @previous_tags)
- output << "<span id='#{unique_id}'>#{t}</span>"
= output.join(", ")
#index
%h2 Tag Index
- uniq_tags = @previous_tags.uniq
%ul
- for tag in uniq_tags.sort
%li
= tag
= @previous_tags.count(tag).times.map {|i| "<a href='##{tag}-#{i+1}'></a>"}.join(", ")
You can’t perform that action at this time.