]> git.plutz.net Git - confetti/blobdiff - index.cgi
App title and basic styling
[confetti] / index.cgi
index 12f59b299db03c715539a229c965f0e63e73cc59..170645f4c3d1d733f1b5173d710e1c5eedcd3ac5 100755 (executable)
--- a/index.cgi
+++ b/index.cgi
@@ -10,15 +10,20 @@ esac; done
 [ -z "${_DATA%/}" ] && _DATA=. || _DATA="${_DATA%/}"
 
 . "$_EXEC/cgilite/cgilite.sh"
+. "$_EXEC/cgilite/session.sh"
 
 _PATH="$(PATH "/${PATH_INFO}")"
 ACTION="$(GET a)"
 
+message="$(COOKIE message)"
+[ "$message" ] && SET_COOKIE 0 message=''
+
 yield_page() {
   local class="$1" style="$2"
   printf 'Content-Type: text/html; charset=utf-8\r\n\r\n'
   { printf '
        [html [head
+          [title Confetti]
          [meta name="viewport" content="width=device-width"]
          [link rel="stylesheet" type="text/css" href="/style.css"]
     '
@@ -29,6 +34,7 @@ yield_page() {
        ] [body class="%s"
     ' "$class"
     cat
+    [ "$message" ] && printf '[p #message\n%s\n]' $(l10n "$message")
     printf '] ]'
   } \
   | "${_EXEC}/cgilite/html-sh.sed"