From: Paul Hänsch Date: Tue, 14 May 2019 15:08:15 +0000 (+0200) Subject: simple message/error display X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=ad105acdefe3a76de9abdfd3376527d1960bddc2;p=lobster simple message/error display --- diff --git a/index.cgi b/index.cgi index 3008c7d..f187439 100755 --- a/index.cgi +++ b/index.cgi @@ -15,6 +15,9 @@ 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' @@ -30,6 +33,7 @@ yield_page() { ] [body class="%s" ' "$class" cat + [ "$message" ] && printf '[p #message\n%s\n]' $(l10n "$message") printf '] ]' } \ | "${_EXEC}/cgilite/html-sh.sed" diff --git a/style.css b/style.css index e466cb7..e8d385a 100644 --- a/style.css +++ b/style.css @@ -77,6 +77,17 @@ body { background: #FCC; } +#message { + display: block; + position: fixed; + top: 0; width: 100%; + margin: 0; padding: 1em; + text-align: center; + font-weight: bold; + background-color: #FAA; + border: 1px solid #000; + border-style: none none solid none; +} .trailbtn { display: none; } .trailbtn + .trailbox { display: none; }