Make status bar disappear without JS

This commit is contained in:
Andrey Nikitin 2025-06-03 17:32:04 +03:00
parent 5cbb20dcc4
commit 9bf5e936fe
3 changed files with 8 additions and 3 deletions

View file

@ -1,16 +1,20 @@
# Changelog
This file keeps track of changes in a human-readable fashion
## v2.0.0 stuff
## Upcoming
These changes are not yet released
* Fully refactored the project internally
* Fully refactored the project internally to use several packages
* Log *directory* is now specified as opposed to *file*.
Files in that directory are generated as `hibiscus_YYYY-MM-DD_HH:MM:SS.log`
* Adjusted default theme
* Error pages are now translated
* API: `/api/today` POST now behaves like other file uploads
* Disabling JS now makes the status bar disappear since it won't work
## v1.1.4

View file

@ -45,6 +45,6 @@ function sanitize(title) {
// Open a new note
function newNote(text_prompt) {
name = sanitize(prompt(text_prompt + ':'))
let name = sanitize(prompt(text_prompt + ':'))
window.location.replace('/notes/' + name)
}

View file

@ -1,7 +1,7 @@
{{ define "header" }}
<header>
<h1>{{ config.Title }}</h1>
<p>{{ translate "time.date" }} <span id="today-date">a place</span> <span id="grace" hidden>({{ translate "time.grace" }})</span></p>
<p id="status" style="display: none;">{{ translate "time.date" }} <span id="today-date">a place</span> <span id="grace" hidden>({{ translate "time.grace" }})</span></p>
</header>
{{ end }}
@ -25,6 +25,7 @@
</main>
{{- template "footer" . -}}
<script defer>
document.getElementById("status").style.display = 'block';
const langName="{{ config.Language }}";
const timeZone="{{ config.Timezone }}";
beginTimeUpdater()