]> git.plutz.net Git - shellwiki/commitdiff
enable slideshow footer
authorPaul Hänsch <paul@plutz.net>
Sun, 27 Sep 2026 12:55:11 +0000 (14:55 +0200)
committerPaul Hänsch <paul@plutz.net>
Sun, 27 Sep 2026 12:55:11 +0000 (14:55 +0200)
handlers/70_slideshow.sh
themes/slideshow.css

index 9b01b980edba9013a86c0784fddbd693ccf20c1a..bcefa2bdf15819ec5429b887733ae9622ee4c640 100755 (executable)
@@ -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 '<footer>%s</footer>' "$(HTML "$FOOTER")"
 printf '<a href="#" class="toplevel">overview</a>'
 
-page="${PATH_INFO%\[*\]}"
 wiki "$page" | {
   # slide previous ID, slide current ID, slide number
   sl_pre='' sl_cur='' sl_num=0
index b37cad16f9c7c2b026daf1239fb7f9572d2fa9bc..c44782d509e8fb895b6149b31d56916d8e342fc5 100644 (file)
@@ -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 */