From 3de1fc65168f948ff088594fac4ae5fd3ac1ab66 Mon Sep 17 00:00:00 2001 From: Jakob L. Kreuze Date: Sun, 13 Feb 2022 16:55:04 -0500 Subject: Add front-matter for series I don't intend to finish --- haunt/jakob/utils.scm | 6 ++++-- haunt/static/css/style.css | 14 ++++++++++++++ haunt/static/image/tango-emblem-important.png | Bin 0 -> 81310 bytes 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 haunt/static/image/tango-emblem-important.png (limited to 'haunt') diff --git a/haunt/jakob/utils.scm b/haunt/jakob/utils.scm index 20869be..a3ad1b7 100644 --- a/haunt/jakob/utils.scm +++ b/haunt/jakob/utils.scm @@ -63,8 +63,10 @@ is of an odd length and every second element is DELIM." (result '())) (match sxml (() (remove-footnote-references (reverse result))) - ((or (('p ...) _ ...) (paragraph _ ...)) - (remove-footnote-references (reverse (cons paragraph result)))) + ((or (('p ...) tail ...) (paragraph tail ...)) + (if (and (list? paragraph) (eqv? 'header (car paragraph))) + (loop tail result) ; Ignore front-matter. + (remove-footnote-references (reverse (cons paragraph result))))) ((head . tail) (loop tail (cons head result)))))) diff --git a/haunt/static/css/style.css b/haunt/static/css/style.css index 1063626..8c70dac 100644 --- a/haunt/static/css/style.css +++ b/haunt/static/css/style.css @@ -388,3 +388,17 @@ button { background-color: #4d4270; color: #fff; } + +.article-front-matter { + border: 1px solid; + border-radius: 3px; + padding: 0.25em 1em; +} + +.article-warning { + background-image: url('/static/image/tango-emblem-important.png'); + background-repeat: no-repeat; + background-size: 4em 4em; + background-position: 1.5em 50%; + padding: 0.25em 1em 0.25em 7em; +} diff --git a/haunt/static/image/tango-emblem-important.png b/haunt/static/image/tango-emblem-important.png new file mode 100644 index 0000000..81c455b Binary files /dev/null and b/haunt/static/image/tango-emblem-important.png differ -- cgit v1.3