Skip to content

Commit c924b86

Browse files
committed
Add semi-automated "last update" date footer
1 parent 186583e commit c924b86

2 files changed

Lines changed: 23 additions & 2 deletions

File tree

index.html

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,10 @@ <h2 id="funding-heading" aria-label="Supported by the Austrian Science Fund">Sup
399399
<!-- ====================== FOOTER ====================== -->
400400
<footer class="footer">
401401
<div class="wrap">
402-
<span>© <span id="year">2026</span> <a href="#top">Let's Encode!</a> · <a href="https://mdw.ac.at" target="_blank" rel="noopener">mdw — University of Music and Performing Arts Vienna</a></span>
402+
<div class="footer-left">
403+
<span>© <span id="year">2026</span> <a href="#top">Let's Encode!</a> · <a href="https://mdw.ac.at" target="_blank" rel="noopener">mdw — University of Music and Performing Arts Vienna</a></span>
404+
<span class="footer-updated">Last updated: <time id="last-updated" datetime="2026-06-30">30 June 2026</time></span>
405+
</div>
403406
<span>
404407
<a href="https://iwk.mdw.ac.at/lets-encode" target="_blank" rel="noopener">Project page</a>
405408
&nbsp;·&nbsp;
@@ -415,6 +418,18 @@ <h2 id="funding-heading" aria-label="Supported by the Austrian Science Fund">Sup
415418
<script>
416419
document.getElementById("year").textContent = new Date().getFullYear();
417420

421+
// "Last updated" reflects the deployed file's Last-Modified time (≈ deploy date
422+
// on GitHub Pages), so it stays current with no manual upkeep. Falls back to the
423+
// date baked into the markup if the timestamp is missing/unparseable.
424+
(function () {
425+
var el = document.getElementById("last-updated");
426+
if (!el) return;
427+
var d = new Date(document.lastModified);
428+
if (isNaN(d)) return;
429+
el.dateTime = d.toISOString().slice(0, 10);
430+
el.textContent = d.toLocaleDateString("en-GB", { day: "numeric", month: "long", year: "numeric" });
431+
})();
432+
418433
// Mobile burger menu: toggles the primary nav dropdown.
419434
(function () {
420435
var btn = document.querySelector(".nav-toggle");

styles.css

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,13 +507,19 @@ section.alt {
507507
flex-wrap: wrap;
508508
gap: 1rem;
509509
justify-content: space-between;
510-
align-items: center;
510+
align-items: baseline;
511511
}
512512

513513
.footer a {
514514
color: var(--ink-soft);
515515
}
516516

517+
.footer-left {
518+
display: flex;
519+
flex-direction: column;
520+
line-height: 1.5;
521+
}
522+
517523
@media (max-width: 560px) {
518524

519525
/* clear the sticky topbar on anchor jumps so the section kicker stays visible

0 commit comments

Comments
 (0)