]> git.plutz.net Git - confetti/blobdiff - index.cgi
App title and basic styling
[confetti] / index.cgi
index 3008c7d06dd74edc222cef130c778ac555ad983a..170645f4c3d1d733f1b5173d710e1c5eedcd3ac5 100755 (executable)
--- a/index.cgi
+++ b/index.cgi
@@ -15,11 +15,15 @@ esac; done
 _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"]
     '
@@ -30,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"