X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=themes%2Fdefault.sh;h=3c5a87fcb57a1ce56a0f4061070a1f8ab4e9bc2e;hb=2ad6da3df5555069e13d2c5c6f39b5d3a4d8071d;hp=001dd3caa85d1ca95825359afa8d69f47b0d3600;hpb=e2ad5bc6d56a970f4c4674f5c96ba7458370d8c9;p=shellwiki diff --git a/themes/default.sh b/themes/default.sh index 001dd3c..3c5a87f 100755 --- a/themes/default.sh +++ b/themes/default.sh @@ -3,11 +3,14 @@ . "$_EXEC/tools.sh" theme_head(){ + local IFS="$BR" printf ' - - - - ' "$_BASE" + + ' + for css in "$_BASE/%5B.%5D/cgilite/common.css" "$_BASE/%5B.%5D/themes/default.css" $PAGE_CSS; do + printf '' \ + "$(HTML "${css##*//}")" + done } theme_header(){ @@ -22,26 +25,30 @@ theme_pagemenu(){ local page="$1" if acl_write "$page"; then - printf ' -
' + cat <<-EOF + + EOF fi } theme_page(){ local page="$1" title="$2" - title="$(HTML "${title:-"${page}"}")" + title="$(HTML "${title:-"${PAGE_TITLE:-"${page}"}"}")" # Important! Web Server response including newline printf "%s\r\n" "Content-Type: text/html; charset=utf-8" "" cat <<-EOF - + $(theme_head)![](%s)
[%s](%s)
' "$att" "$att" + ;; + esac + done) +