From d22cc2e58aeafceb05c2a37bda709321f5e60aa9 Mon Sep 17 00:00:00 2001 From: Dirk Heilig Date: Fri, 19 Jan 2024 11:37:21 +0100 Subject: [PATCH] add calendar loading indicator, prepolulate door status image to prevent layout shift --- .../layouts/partials/side-calendar.html | 4 +++- .../layouts/partials/side-door-status.html | 2 +- themes/hugo-theme-flat/static/img/trans.png | Bin 0 -> 251 bytes themes/hugo-theme-flat/static/js/calendar.js | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 themes/hugo-theme-flat/static/img/trans.png diff --git a/themes/hugo-theme-flat/layouts/partials/side-calendar.html b/themes/hugo-theme-flat/layouts/partials/side-calendar.html index cef3ae0..e01761b 100644 --- a/themes/hugo-theme-flat/layouts/partials/side-calendar.html +++ b/themes/hugo-theme-flat/layouts/partials/side-calendar.html @@ -1,6 +1,8 @@

Termine

- + diff --git a/themes/hugo-theme-flat/layouts/partials/side-door-status.html b/themes/hugo-theme-flat/layouts/partials/side-door-status.html index 2fc1c60..1be8d3c 100644 --- a/themes/hugo-theme-flat/layouts/partials/side-door-status.html +++ b/themes/hugo-theme-flat/layouts/partials/side-door-status.html @@ -2,7 +2,7 @@

Doorstatus

-

+

Aktueller Status:

Status vom:

Temperatur Clubraum:

diff --git a/themes/hugo-theme-flat/static/img/trans.png b/themes/hugo-theme-flat/static/img/trans.png new file mode 100644 index 0000000000000000000000000000000000000000..2c8b8f4513c7616027b164853574f4c677728204 GIT binary patch literal 251 zcmeAS@N?(olHy`uVBq!ia0y~yU;#2&7#Nv>l&nYkSjc0{an^LB{Ts5rw$$j literal 0 HcmV?d00001 diff --git a/themes/hugo-theme-flat/static/js/calendar.js b/themes/hugo-theme-flat/static/js/calendar.js index 2504907..a9b4a10 100644 --- a/themes/hugo-theme-flat/static/js/calendar.js +++ b/themes/hugo-theme-flat/static/js/calendar.js @@ -52,6 +52,7 @@ document.addEventListener("DOMContentLoaded", function () { li.attr("title", item.description); li.appendTo(box); } + document.querySelector("#calendar .loading").remove(); $(".location", box).click(function () { navigator.clipboard.writeText($(this).attr("data-loc")); });