modified: html/style.css

modified:   index.sh
This commit is contained in:
xbl
2026-08-19 20:36:07 +02:00
parent c5cd727737
commit 077d08ef75
2 changed files with 12 additions and 9 deletions
+6 -3
View File
@@ -151,7 +151,8 @@ img.logo {
.current .wttr { font-size: 1.5rem; font-weight: bold; text-shadow: var(--dark-glow); } .current .wttr { font-size: 1.5rem; font-weight: bold; text-shadow: var(--dark-glow); }
.current .danger { font-size: 1rem; font-weight: normal; text-shadow: var(--dark-glow); } .current .danger { font-size: 1rem; font-weight: normal; text-shadow: var(--dark-glow); }
.current .level { font-size: 1.5rem; font-weight: bold; } .current .level { font-size: 1.5rem; font-weight: bold; }
.danger p { font-size: 1rem; font-weight: normal; } .danger a { font-size: 1rem; font-weight: normal; text-decoration: underline dotted #248bcc; color: var(--text); }
.danger p { font-size: 1rem; font-weight: normal; text-decoration: none; color: var(--text); }
/* 4 data cats — auto-placed into cols 2 & 3, 2 per row → 2×2 grid */ /* 4 data cats — auto-placed into cols 2 & 3, 2 per row → 2×2 grid */
.cat { .cat {
@@ -414,7 +415,8 @@ img.logo {
.current .wttr { font-size: 1.5rem; } .current .wttr { font-size: 1.5rem; }
.current .danger { font-size: 1rem; } .current .danger { font-size: 1rem; }
.current .level { font-size: 1rem; } .current .level { font-size: 1rem; }
.danger p { font-size: 1rem; } .danger a { font-size: 1rem; text-decoration: underline dotted #248bcc; color: var(--text); }
.danger p { font-size: 1rem; text-decoration: none; color: var(--text); }
.cat { font-size: 1rem; } .cat { font-size: 1rem; }
.cat p { padding-left: 14px; } .cat p { padding-left: 14px; }
@@ -440,7 +442,8 @@ img.logo {
.current .wttr { font-size: 1rem; } .current .wttr { font-size: 1rem; }
.current .danger { font-size: 0.75rem; } .current .danger { font-size: 0.75rem; }
.current .level { font-size: 1rem; } .current .level { font-size: 1rem; }
.danger p { font-size: 0.75rem; } .danger a { font-size: 0.75rem; text-decoration: underline dotted #248bcc; color: var(--text); }
.danger p { font-size: 0.75rem; text-decoration: none; color: var(--text); }
.cat { font-size: 0.75rem; } .cat { font-size: 0.75rem; }
.cat p { padding-left: 12px; } .cat p { padding-left: 12px; }
+6 -6
View File
@@ -21,12 +21,12 @@ if [ ! -s "$data/atemp.data" ]; then
fi fi
## Depth ## Depth
curl -s https://www.ag.ch/app/hydrometrie/station/?id=11626 | grep -m 9 td | tail -n 1 | grep -Eo '[0-9][0-9][0-9].[0-9][0-9]' | awk '{print $1-398}' > "$data"/depth.data curl -s --user-agent "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/538.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36" https://www.hydrodaten.admin.ch/de/seen-und-fluesse/stationen-und-daten/2099#stationsinfos | grep -A 8 -m 1 'Letzter' | tail -n 1 | grep -Eo '[0-9][0-9][0-9].[0-9][0-9]' | awk '{print $1-398}' > "$data"/depth.data
if [ ! -s "$data/depth.data" ]; then if [ ! -s "$data/depth.data" ]; then
echo "$(date): depth empty, wait a minute or something" >> /tmp/error.log echo "$(date): depth empty, wait a minute or something" >> /tmp/error.log
sleep 30 sleep 30
curl -s https://www.ag.ch/app/hydrometrie/station/?id=11626 | grep -m 9 td | tail -n 1 | grep -Eo '[0-9][0-9][0-9].[0-9][0-9]' | awk '{print $1-398}' > "$data"/depth.data curl -s --user-agent "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/538.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36" https://www.hydrodaten.admin.ch/de/seen-und-fluesse/stationen-und-daten/2099#stationsinfos | grep -A 8 -m 1 'Letzter' | tail -n 1 | grep -Eo '[0-9][0-9][0-9].[0-9][0-9]' | awk '{print $1-398}' > "$data"/depth.data
fi fi
## Discharge ## Discharge
@@ -191,18 +191,18 @@ echo -e "<!DOCTYPE html>
<h5>&#8505</h5> <h5>&#8505</h5>
</div> </div>
<span class=\"popuptext\" id=\"infopop\"> <span class=\"popuptext\" id=\"infopop\">
<p class=emo><a href=https://www.openstreetmap.org/#map=17/47.39157/8.52349 target=_blank>&#128506</a> <a href=mailto:[email protected]>&#128231</a></p> <p class=emo><a href=https://www.openstreetmap.org/#map=17/47.39157/8.52349 rel=\"noopener\" target=_blank>&#128506</a> <a href=mailto:[email protected]>&#128231</a></p>
<div class=text><p>Made with bash. No cookies, no bullshit.</p></div> <div class=text><p>Made with bash. No cookies, no bullshit.</p></div>
<div class=text><p>Updated every 20 minutes, curves show past week.</p></div> <div class=text><p>Updated every 20 minutes, curves show past week.</p></div>
<div class=sources><p>Using open data from:</p></div> <div class=sources><p>Using open data from:</p></div>
<div class=sources><a href=https://ag.ch target=_blank>ag.ch</a> <a href=https://wetteronline.ch target=_blank>wetteronline.ch</a> <a href=https://wttr.in target=_blank>wttr.in</a> <a href=https://zh.ch target=_blank>zh.ch</a></div> <div class=sources><a href=https://admin.ch rel=\"noopener\" target=_blank>admin.ch</a> <a href=https://wetteronline.ch rel=\"noopener\" target=_blank>wetteronline.ch</a> <a href=https://wttr.in rel=\"noopener\" target=_blank>wttr.in</a> <a href=https://zh.ch rel=\"noopener\" target=_blank>zh.ch</a></div>
<div class=text><p>Thank you!</ul></div> <div class=text><p>Thank you!</ul></div>
</span> </span>
</div> </div>
<div class=current> <div class=current>
<p class=update>Updated at ${utime}</p> <p class=update>Updated at ${utime}</p>
<p class=wttr>$wttr</p> <p class=wttr>$wttr</p>
<p class=danger>Danger Level</p> <p class=danger><a href=\"https://www.hydrodaten.admin.ch/de/die-5-gefahrenstufen-fuer-hochwasser\" rel=\"noopener\" target=_blank>Danger Level</a></p>
<p class=level style=\"${dangr} / 5</p> <p class=level style=\"${dangr} / 5</p>
</div> </div>
<div class=cat> <div class=cat>
@@ -227,7 +227,7 @@ echo -e "<!DOCTYPE html>
</div> </div>
</div> </div>
<div class=footer> <div class=footer>
<p>Gmacht mit <a href="https://6bit.ch">🔮</a> z'Züri.</p> <p>Gmacht mit <a href="https://6bit.ch" rel=\"noopener\" target=_blank>🔮</a> z'Züri.</p>
</div> </div>
</body> </body>
</html>" > /var/www/hardbrugg.ch/html/index.html </html>" > /var/www/hardbrugg.ch/html/index.html