X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;ds=sidebyside;f=themes%2Fdefault.sh;h=3c5a87fcb57a1ce56a0f4061070a1f8ab4e9bc2e;hb=a26c541b845f86aa37b872d06ab3bf51e8206be8;hp=0439f0d642421244c6049fa2ef9896389a5e21a5;hpb=d88ce0318691f70a29d7f8a2a19a82872d01c261;p=shellwiki diff --git a/themes/default.sh b/themes/default.sh index 0439f0d..3c5a87f 100755 --- a/themes/default.sh +++ b/themes/default.sh @@ -25,22 +25,23 @@ 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" "" @@ -68,50 +69,74 @@ theme_page(){ } theme_editor(){ - local page="$1" template="$2" title - title="${page%/}"; title="${title##*/}" + local page="$1" template="$2" title file att + title="$(HTML "${PAGE_TITLE:-"${page}"}")" [ "$template" ] && acl_read "$template" || template="$page" theme_page - "Editor: $title" <<-EOF - +![](%s)
[%s](%s)
' "$att" "$att" + ;; + esac + done) +