diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | README.org | 1 | ||||
-rw-r--r-- | bin/page.html.erb | 2 | ||||
-rw-r--r-- | bin/util.rb | 1 | ||||
-rw-r--r-- | src/dnd/DND.scss | 54 | ||||
-rw-r--r-- | src/dnd/PsionicSchools.org | 2 | ||||
-rw-r--r-- | src/dnd/Psionist.md | 2 | ||||
-rw-r--r-- | src/dnd/SpellGauntlet.org | 2 | ||||
-rw-r--r-- | src/dnd/Tastavi.md | 2 | ||||
-rw-r--r-- | src/main.scss | 54 |
10 files changed, 62 insertions, 60 deletions
@@ -19,7 +19,7 @@ html.out += $(foreach d,$(sort $(dir $(patsubst src/%,out/%,$(html.src)))),$dind mydir = $(patsubst %/,%,$(patsubst out/%,%,$(dir $@))) -all: $(html.out) out/main.css out/dnd/DND.css +all: $(html.out) out/main.css .PHONY: all bin/page = bin/page bin/util.rb bin/pandoc.rb @@ -59,6 +59,7 @@ generator: | pandoc_flags | "" | no | string ("--foo --bar") | | pandoc_format | either "markdown" or "org" | no | string ("markdown+extnsn1+extnsns2") | | html_head_extra | "" | Org-mode | string | +| class | "" | no | string (CSS class to apply to ~<body>~) | | tags | "" | LaTeX, kinda[fn:1] | string ("ES HB") or list (["ES", "HB"]) | | published[fn:2] | most recent git commit for file | no | string (Ruby ~Date.parse()~) or date[fn:3] | | updated[fn:2] | first git commit for file | no | string (Ruby ~Date.parse()~) or date[fn:3] | 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? diff --git a/src/dnd/DND.scss b/src/dnd/DND.scss deleted file mode 100644 index fcb258c..0000000 --- a/src/dnd/DND.scss +++ /dev/null @@ -1,54 +0,0 @@ -/* This bit is taken from the defaults of org-mode export */ - -body > article { font-family: Times, serif; font-size: 12pt; -.title { text-align: center; } -.todo { color: red; } -.done { color: green; } -.tag { background-color: #add8e6; font-weight:normal } -.target { } -.timestamp { color: #bebebe; } -.timestamp-kwd { color: #5f9ea0; } -.right {margin-left:auto; margin-right:0px; text-align:right;} -.left {margin-left:0px; margin-right:auto; text-align:left;} -.center {margin-left:auto; margin-right:auto; text-align:center;} -p.verse { margin-left: 3% } -pre { - border: 1pt solid #AEBDCC; - background-color: #F3F5F7; - padding: 5pt; - font-family: courier, monospace; - font-size: 90%; - overflow:auto; -} -table { border-collapse: collapse; } -td, th { vertical-align: top; } -th.right { text-align:center; } -th.left { text-align:center; } -th.center { text-align:center; } -td.right { text-align:right; } -td.left { text-align:left; } -td.center { text-align:center; } -dt { font-weight: bold; } -div.figure { padding: 0.5em; } -div.figure p { text-align: center; } -div.inlinetask { - padding:10px; - border:2px solid gray; - margin:10px; - background: #ffffcc; -} -textarea { overflow-x: auto; } -.linenr { font-size:smaller } -.code-highlighted {background-color:#ffff00;} -.org-info-js_info-navigation { border-style:none; } -#org-info-js_console-label { font-size:10px; font-weight:bold; - white-space:nowrap; } -.org-info-js_search-highlight {background-color:#ffff00; color:#000000; - font-weight:bold; } -} -/* Andrew wrote the following */ - -body { - background: url(Background.png) repeat-y; - background-size: 100%; -} diff --git a/src/dnd/PsionicSchools.org b/src/dnd/PsionicSchools.org index 91f84a1..bd3ab60 100644 --- a/src/dnd/PsionicSchools.org +++ b/src/dnd/PsionicSchools.org @@ -1,5 +1,5 @@ #+TITLE: Schools of Psionics
-#+HTML_HEAD_EXTRA: <link rel="stylesheet" href="DND.css">
+#+CLASS: dnd
#+TAGS: ES HB
From what I've seen, the most recent few 5e Unearthed Arcana dealing
diff --git a/src/dnd/Psionist.md b/src/dnd/Psionist.md index 1c7b9e5..58ac623 100644 --- a/src/dnd/Psionist.md +++ b/src/dnd/Psionist.md @@ -1,7 +1,7 @@ --- title: "Psionist" updated: "2016-07-16T21:01-0400" -html_head_extra: "<link rel=stylesheet href=DND.css>" +class: "dnd" tags: ES HB --- diff --git a/src/dnd/SpellGauntlet.org b/src/dnd/SpellGauntlet.org index cb97497..8cf1c0d 100644 --- a/src/dnd/SpellGauntlet.org +++ b/src/dnd/SpellGauntlet.org @@ -1,5 +1,5 @@ #+TITLE: Spell Gauntlet: Practical Spellcasting -#+HTML_HEAD_EXTRA: <link rel="stylesheet" href="DND.css"> +#+CLASS: dnd #+TAGS: FF SS WP * Teleport diff --git a/src/dnd/Tastavi.md b/src/dnd/Tastavi.md index 0f7eb12..d9b7e86 100644 --- a/src/dnd/Tastavi.md +++ b/src/dnd/Tastavi.md @@ -1,7 +1,7 @@ --- title: "Tastavi D'Maelnor of Llolethane" updated: "2016-08-30 Tue 23:56" -html_head_extra: "<link rel=stylesheet href=DND.css>" +class: "dnd" tags: SS --- diff --git a/src/main.scss b/src/main.scss index 4917724..c40cb52 100644 --- a/src/main.scss +++ b/src/main.scss @@ -139,3 +139,57 @@ footer { margin: 0 2em; font-size: smaller; } + +body.dnd { + background: url(dnd/Background.png) repeat-y; + background-size: 100%; + + /* This bit is taken from the defaults of org-mode export */ + article { + font-family: Times, serif; font-size: 12pt; + .title { text-align: center; } + .todo { color: red; } + .done { color: green; } + .tag { background-color: #add8e6; font-weight:normal } + .target { } + .timestamp { color: #bebebe; } + .timestamp-kwd { color: #5f9ea0; } + .right {margin-left:auto; margin-right:0px; text-align:right;} + .left {margin-left:0px; margin-right:auto; text-align:left;} + .center {margin-left:auto; margin-right:auto; text-align:center;} + p.verse { margin-left: 3% } + pre { + border: 1pt solid #AEBDCC; + background-color: #F3F5F7; + padding: 5pt; + font-family: courier, monospace; + font-size: 90%; + overflow:auto; + } + table { border-collapse: collapse; } + td, th { vertical-align: top; } + th.right { text-align:center; } + th.left { text-align:center; } + th.center { text-align:center; } + td.right { text-align:right; } + td.left { text-align:left; } + td.center { text-align:center; } + dt { font-weight: bold; } + div.figure { padding: 0.5em; } + div.figure p { text-align: center; } + div.inlinetask { + padding:10px; + border:2px solid gray; + margin:10px; + background: #ffffcc; + } + textarea { overflow-x: auto; } + .linenr { font-size:smaller } + .code-highlighted {background-color:#ffff00;} + .org-info-js_info-navigation { border-style:none; } + #org-info-js_console-label { font-size:10px; font-weight:bold; + white-space:nowrap; } + .org-info-js_search-highlight {background-color:#ffff00; color:#000000; + font-weight:bold; } + } +} |