X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=themes%2Fdefault.sh;h=6fa6ba16566245e9e7c0b92b883a155bf9ad4a19;hb=b222bd291672e71b29ed352c3cf058d8345f342d;hp=56b57aed24eb505669d742cca13fde2f9660ae3f;hpb=b2c5e68fd567ad46143e70254c95f5b1050c8ed0;p=shellwiki diff --git a/themes/default.sh b/themes/default.sh index 56b57ae..6fa6ba1 100755 --- a/themes/default.sh +++ b/themes/default.sh @@ -1,9 +1,12 @@ #!/bin/sh +. "$_EXEC/tools.sh" + theme_head(){ printf ' + ' "$_BASE" } @@ -19,7 +22,7 @@ theme_page(){ local page="$1" title title="${page%/}"; title="${title##*/}" - # Important! Web Server response including newline newline + # Important! Web Server response including newline printf "%s\r\n" "Content-Type: text/html; charset=utf-8" "" cat <<-EOF @@ -29,7 +32,15 @@ theme_page(){ $(HTML "${title}") $(theme_header) -
$(wiki "$page" || printf 'Page not found')
+
+ +
+ $(wiki "$page" || printf 'Page not found') +
+
$(theme_footer) EOF @@ -39,7 +50,7 @@ theme_editor(){ local page="$1" title title="${page%/}"; title="${title##*/}" - # Important! Web Server response including newline newline + # Important! Web Server response including newline printf "%s\r\n" "Content-Type: text/html; charset=utf-8" "" cat <<-EOF @@ -50,15 +61,49 @@ theme_editor(){ $(theme_header)
- - - + + + +
$(theme_footer) EOF } +theme_attachments(){ + local page="$1" title + title="${page%/}"; title="${title##*/}" + + # Important! Web Server response including newline + printf "%s\r\n" "Content-Type: text/html; charset=utf-8" "" + + cat <<-EOF + + + $(theme_head) + Attachments $(HTML "${title}") + + $(theme_header) +
+ +
+ $(theme_footer) + + EOF +} + theme_login(){ theme_page '[wiki]/login/' }