summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2017-01-03 19:05:27 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2017-01-03 19:05:27 -0500
commit4e1129f36187897e2154edbe4c68f5e0e0c21a5e (patch)
tree4ecd6909b4aeed9769a23dcae6dd0a2e9600fd64 /bin
parent9436b60185b7ec661e2ee47186679339249f0aa6 (diff)
Add "class" metadata attribute; use it instead of separate CSS files.
Diffstat (limited to 'bin')
-rw-r--r--bin/page.html.erb2
-rw-r--r--bin/util.rb1
2 files changed, 2 insertions, 1 deletions
diff --git a/bin/page.html.erb b/bin/page.html.erb
index 64afdf0..354b123 100644
--- a/bin/page.html.erb
+++ b/bin/page.html.erb
@@ -7,7 +7,7 @@
<link rel="alternate" type="application/atom+xml" href="./index.atom" name="web log entries"/>
<%= @page.head %>
</head>
- <body>
+ <body<% if @page.class %> class="<%= @page.class %>"<% end %>>
<header>
<p class=breadcrumbs><%= @page.breadcrumbs %></p>
<h1>AndrewDM</h1>
diff --git a/bin/util.rb b/bin/util.rb
index 3376699..1318f28 100644
--- a/bin/util.rb
+++ b/bin/util.rb
@@ -118,6 +118,7 @@ class Page
def slug ; @slug ||= infile.sub(/\..*$/,'').sub(/^.*\//,'') ; end
def content ; @content ||= pandoc.to('html5 '+(pandoc['pandoc_flags']||'')) ; end
def head ; @head ||= pandoc['html_head_extra'] ; end
+ def class ; @class ||= pandoc['class'] ; end
def tags
if @tags.nil?