23 lines
577 B
Bash
23 lines
577 B
Bash
#!/bin/bash
|
|
|
|
source "templates/head.sh"
|
|
|
|
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
|
|
|
|
IFS=$'\n'
|
|
for i in $(jq -r '.[]' < storage/appconfig/graphs.json); do
|
|
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>"
|
|
done
|