X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;ds=inline;f=themes%2Fdefault.sh;h=85febeef60e7274563a2e62c0d59698e7088bb12;hb=d9a3dee90a669c88bd6b4b0fa553e01ed1e729a1;hp=6370166017775241ed9691cfca7c23c78b7282d7;hpb=4fb35b146e7aca6faf5945105ab36a270b7f1ad5;p=shellwiki
diff --git a/themes/default.sh b/themes/default.sh
index 6370166..85febee 100755
--- a/themes/default.sh
+++ b/themes/default.sh
@@ -1,27 +1,218 @@
#!/bin/sh
-theme_404(){
- printf "%s\r\n" "Status: 404 Not Found"
+# Copyright 2022 - 2023 Paul Hänsch
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED âAS ISâ AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+# SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+# IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- theme_page '/[404]/'
+. "$_EXEC/tools.sh"
+
+theme_head(){
+ local IFS="$BR"
+ printf '
+
+ '
+ for css in "$_BASE/%5B.%5D/cgilite/common.css" "$_BASE/%5B.%5D/themes/default.css" $PAGE_CSS; do
+ printf '' \
+ "$(HTML "${css##*//}")"
+ done
+}
+
+theme_header(){
+ printf '%s' "$(wiki '[wiki]/header/')"
+}
+
+theme_footer(){
+ printf '' "$(wiki '[wiki]/footer/')"
+}
+
+theme_pagemenu(){
+ local page="$1"
+
+ if acl_write "$page"; then
+ cat <<-EOF
+