X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=themes%2Fdefault.sh;h=1f8d285d4eb9a241601dde074f0fbd80fcb66800;hb=5e41ef419be25a2c23c8eff06acb5ebadf523f5a;hp=1830e26673ccd60c29e95a85f446143cce3dd18c;hpb=ee0162b0ee46d258908de998cfa220edb4074d96;p=shellwiki diff --git a/themes/default.sh b/themes/default.sh index 1830e26..1f8d285 100755 --- a/themes/default.sh +++ b/themes/default.sh @@ -15,12 +15,27 @@ theme_header(){ } theme_footer(){ - printf '' "$(wiki '[wiki]/footer/' ||echo No footer)" + printf '' "$(wiki '[wiki]/footer/')" +} + +theme_pagemenu(){ + local page="$1" + + if acl_write "$page"; then + printf ' +
' + fi } theme_page(){ - local page="$1" title - title="${page%/}"; title="${title##*/}" + local page="$1" title="$2" id="$3" + title="$(HTML "${title:-"${page}"}")" + id="$(HTML "${id:-"${page}"}")" # Important! Web Server response including newline printf "%s\r\n" "Content-Type: text/html; charset=utf-8" "" @@ -29,17 +44,18 @@ theme_page(){ $(theme_head) -