summaryrefslogtreecommitdiff
path: root/lib/page_index.rb
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2017-12-22 21:05:44 -0500
committerLuke Shumaker <lukeshu@lukeshu.com>2017-12-22 21:05:44 -0500
commit61ac134ab6fc68166b2fddeec16914d28e40aa26 (patch)
tree2a4f41e0a6a5705cad4d420ab26f5149823b11e8 /lib/page_index.rb
parenta7df47f1ca6226bfb67ccc59a72aafc1f18ecfd1 (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/page_index.rb')
-rw-r--r--lib/page_index.rb5
1 files changed, 4 insertions, 1 deletions
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