From ca0351511a8b8f23d259632b10db2d6f6829bc67 Mon Sep 17 00:00:00 2001 From: EpicKiwi Date: Sat, 4 Nov 2023 17:40:09 +0100 Subject: [PATCH] Added status --- css/style.css | 44 +++++++++++++++++++++++++++++++++++++++- index.html | 2 +- status/index.fermé.html | 2 +- status/index.ouvert.html | 2 +- status/set-status.sh | 19 +++++++++++++++++ 5 files changed, 65 insertions(+), 4 deletions(-) create mode 100755 status/set-status.sh diff --git a/css/style.css b/css/style.css index 128d2f5..81c29ed 100644 --- a/css/style.css +++ b/css/style.css @@ -32,7 +32,6 @@ a:link { a:hover, a:focus { color: white; - background-color:black; text-decoration: underline; } @@ -160,6 +159,49 @@ main #description { } } +/* status page */ + +.status-page main { + width: 90%; + max-width: 300px; + margin-left: auto; + margin-right: auto; + margin-top: 15vh; + margin-bottom: 15vh; +} + +/* status block */ + +.status-container { + text-align: left; + display: grid; + grid-template-columns: minmax(min-content, 75px) 1fr; + align-items: center; + column-gap: 5px; + + border: solid 1px white; + background: black; + padding: 15px; +} + +.status-container > * { + grid-column: span 2; + text-align: center; + font-size: 0.8em; +} + +.status-container > *:first-child:not(img) { + grid-column: 2; + text-align: left; + font-size: inherit; +} + +.status-container .status-icon { + grid-column: 1; + grid-row: 1; + align-self: center; +} + /* toolbar */ #homepage .toolbar button { diff --git a/index.html b/index.html index 72ce197..15e2d34 100644 --- a/index.html +++ b/index.html @@ -80,7 +80,7 @@

Ouvert tous les mardis à partir de 19h

-
+
Vérifier si le local est ouvert 🠖
diff --git a/status/index.fermé.html b/status/index.fermé.html index a10d3a2..f8688e5 100644 --- a/status/index.fermé.html +++ b/status/index.fermé.html @@ -9,7 +9,7 @@ - +
diff --git a/status/index.ouvert.html b/status/index.ouvert.html index 1c3c8ec..59e8817 100644 --- a/status/index.ouvert.html +++ b/status/index.ouvert.html @@ -9,7 +9,7 @@ - +
diff --git a/status/set-status.sh b/status/set-status.sh new file mode 100755 index 0000000..821fe7f --- /dev/null +++ b/status/set-status.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +SCRIPTPATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" + +if [ "$#" = "0" ]; then + echo "Usage set-status.sh [new-status]" + echo "" + echo "[new-status] can be \"opened\" or \"closed\"" + echo "" + exit 1 +fi + +if [ "$1" = "opened" ]; then + ln -sf "index.ouvert.html" "$SCRIPTPATH/index.html" +fi + +if [ "$1" = "closed" ]; then + ln -sf "index.fermé.html" "$SCRIPTPATH/index.html" +fi \ No newline at end of file