добавил смену тайтла раз в секунду

design
serr 2025-06-12 23:20:34 +03:00
parent ad08bc441e
commit c8f89013c6
3 changed files with 5 additions and 0 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

View File

@ -6,6 +6,11 @@
<link rel="shortcut icon" href="/assets/pic/favicon.ico?v={{ .version }}" type="image/x-icon">
<link rel="stylesheet" href="/assets/css/styles.css?v={{ .version }}" type="text/css">
<script src="/assets/scripts/htmx.js?v={{ .version }}"></script>
<script>
const titles = ["freedom","love","music","flowers","breathing"]; let i = 0;
function update() { document.title = titles[i++%5]; } update();
setInterval(update, 1000);
</script>
<script>
document.addEventListener('htmx:afterSwap', function(evt) {
const triggeringElement = evt.detail.requestConfig.elt;