diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2017-12-22 21:05:44 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2017-12-22 21:05:44 -0500 |
commit | 61ac134ab6fc68166b2fddeec16914d28e40aa26 (patch) | |
tree | 2a4f41e0a6a5705cad4d420ab26f5149823b11e8 /lib | |
parent | a7df47f1ca6226bfb67ccc59a72aafc1f18ecfd1 (diff) |
Re-do CSS.
I also add a few <section> tags, and added classes to a couple of <span>s.
I moved the dnd CSS to a separate file that is currently unused. I assume
I'll add it back soon.
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 |