dtr/webroot/index.shs

23 lines
577 B
Plaintext
Raw Normal View History

2021-05-20 22:11:48 +02:00
#!/bin/bash
source "templates/head.sh"
2021-06-11 22:36:15 +02:00
echo "<link rel='stylesheet' href='/style.css'>"
if [[ "${get_data[type]}" == "bars" ]]; then
echo "<a class='right' href='/'>Graphs</a>"
else
echo "<a class='right' href='/?type=bars'>Bars</a>"
fi
2021-05-20 22:11:48 +02:00
IFS=$'\n'
for i in $(jq -r '.[]' < storage/appconfig/graphs.json); do
2021-06-11 22:36:15 +02:00
echo "<div class='container'>"
if [[ "${get_data[type]}" != "bars" ]]; then
source "${cfg[namespace]}/webroot/uwu.shs" "$(shasum <<< $i | cut -c 1-16)"
else
source "${cfg[namespace]}/webroot/owo.shs" "$(shasum <<< $i | cut -c 1-16)"
fi
echo "</div>"
2021-05-20 22:11:48 +02:00
done