Added status

This commit is contained in:
EpicKiwi 2023-11-04 17:40:09 +01:00
parent 072b907dd1
commit ca0351511a
Signed by: epickiwi
GPG Key ID: C4B28FD2729941CE
5 changed files with 65 additions and 4 deletions

View File

@ -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 {

View File

@ -80,7 +80,7 @@
<p> Ouvert tous les mardis à partir de 19h</p>
<section>
<section class="status-section">
<a href="/status/" id="status">Vérifier si le local est ouvert 🠖</a>
<script src="/js/status.js"></script>
</section>

View File

@ -9,7 +9,7 @@
<link rel="stylesheet" href="/css/style.css" type="text/css" media="screen">
</head>
<body>
<body class="status-page">
<header id="main-header">
<img class="logo" src="/images/logo_picto.svg" alt="Laboratoire Ouvert Lyonnais" />

View File

@ -9,7 +9,7 @@
<link rel="stylesheet" href="/css/style.css" type="text/css" media="screen">
</head>
<body>
<body class="status-page">
<header id="main-header">
<img class="logo" src="/images/logo_picto.svg" alt="Laboratoire Ouvert Lyonnais" />

19
status/set-status.sh Executable file
View File

@ -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