From: Paul Hänsch Date: Sun, 27 Sep 2026 12:55:11 +0000 (+0200) Subject: enable slideshow footer X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=f70fba1d2ad2d68e7d7c24653808666e10635969;p=shellwiki enable slideshow footer --- diff --git a/handlers/70_slideshow.sh b/handlers/70_slideshow.sh index 9b01b98..bcefa2b 100755 --- a/handlers/70_slideshow.sh +++ b/handlers/70_slideshow.sh @@ -18,9 +18,23 @@ case $PATH_INFO in */\[slideshow\]) : ;; *) return 1 ;; esac +page="${PATH_INFO%\[*\]}" # TODO: Support .uncover for other than list items +FOOTER="$(sed -En ' + s;\r$;;; + /^%footer([\t ]+.*)?$/bFOOTER; + 20q; + b; + + :FOOTER + s;(%(footer)?)?[\t ]*;; + p; n; s;\r$;;; + /^(%[ \t]+|%footer[ \t]+|[ \t]+)[^ \t\r].*$/bFOOTER; + /^(%[ \t]*|%footer[ \t]*)$/bFOOTER; +' <"$(mdfile "$page")")" + printf "%s\r\n" "Content-Type: text/html; charset=utf-8" "" PAGE_CSS="${_BASE}/%5B.%5D/themes/slideshow.css${BR}${PAGE_CSS}" @@ -33,9 +47,9 @@ cat <<-EOF EOF # theme_pagemenu +[ -n "$FOOTER" ] && printf '' "$(HTML "$FOOTER")" printf 'overview' -page="${PATH_INFO%\[*\]}" wiki "$page" | { # slide previous ID, slide current ID, slide number sl_pre='' sl_cur='' sl_num=0 diff --git a/themes/slideshow.css b/themes/slideshow.css index b37cad1..c44782d 100644 --- a/themes/slideshow.css +++ b/themes/slideshow.css @@ -103,10 +103,13 @@ footer { bottom: 0; left: 0; width: 100%; font-size: .75em; - padding: .5em 4em .5em 12em; + line-height: 1.5em; + padding: 0 0 .25em 0; text-align: center; #color: #888; z-index: 4; + box-shadow: none; + background-color: transparent; /* footer must not have background, so slide number is not covered */ } footer:before { /* fake background in case footer spans multiple lines */