diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/page.rb | 4 | ||||
-rw-r--r-- | lib/page_index.rb | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/lib/page.rb b/lib/page.rb index b349dc8..ebc123b 100644 --- a/lib/page.rb +++ b/lib/page.rb @@ -91,11 +91,11 @@ class Page end def index_link(cururl, depth) # FIXME: This code is super gross. - ret = " * <span><a class=\"#{index_class}\" href=\"#{cururl.route_to(url)}\" title=\"Published on #{atom_published.strftime('%Y-%m-%d')}" + ret = " * <span class=link-main><a class=\"#{index_class}\" href=\"#{cururl.route_to(url)}\" title=\"Published on #{atom_published.strftime('%Y-%m-%d')}" if atom_updated != atom_published ret += " (updated on #{atom_updated.strftime('%Y-%m-%d')})" end - ret += "\">#{atom_title}</a></span><span>" + ret += "\">#{atom_title}</a></span><span class=link-categories>" atom_categories.each do |t| ret += t.html end diff --git a/lib/page_index.rb b/lib/page_index.rb index 43bf367..585fd57 100644 --- a/lib/page_index.rb +++ b/lib/page_index.rb @@ -57,7 +57,7 @@ class IndexPage < LocalPage def index_link(cururl, depth) ret = '' unless depth <= 1 - ret += "<h#{depth}>[#{atom_title}](#{cururl.route_to(url)})</h#{depth}>\n\n" + ret += "<section><h#{depth}>[#{atom_title}](#{cururl.route_to(url)})</h#{depth}>\n\n" end for page in index_pages.select{|page|not page.is_a?(IndexPage)}.sort_by{|page|page.atom_published} ret += page.index_link(cururl, depth+1) @@ -67,6 +67,9 @@ class IndexPage < LocalPage ret += page.index_link(cururl, depth+1) end ret += "\n" + unless depth <= 1 + ret += "</section>\n\n" + end return ret.gsub(/\n\n+/, "\n\n") end def index_title |