Skip to content

Commit ec98277

Browse files
committed
Java Script + Font Change
Signed-off-by: Markus Eisele <[email protected]>
1 parent 4f197f9 commit ec98277

File tree

2 files changed

+22
-29
lines changed

2 files changed

+22
-29
lines changed

docs/mkdocs-customizations/overrides/partials/copyright.html

Lines changed: 20 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -41,31 +41,24 @@
4141
</div>
4242

4343
<script>
44-
(function() {
45-
// 1. Find the element
46-
var dateEl = document.getElementById('build-date');
47-
48-
if (dateEl) {
49-
// 2. Create a Date object from the UTC string
50-
// The format "YYYY-MM-DD HH:MM:SS UTC" parses correctly in most browsers
51-
var utcDate = new Date(dateEl.innerText.trim());
52-
53-
// 3. check if date is valid
54-
if (!isNaN(utcDate.getTime())) {
55-
// 4. Format it to the user's locale (e.g., en-US, de-DE)
56-
// options: "November 20, 2025 at 10:37 AM"
57-
var localDate = new Intl.DateTimeFormat(undefined, {
58-
year: 'numeric',
59-
month: 'long',
60-
day: 'numeric',
61-
hour: '2-digit',
62-
minute: '2-digit',
63-
timeZoneName: 'short'
64-
}).format(utcDate);
65-
66-
// 5. Update the HTML
67-
dateEl.innerText = localDate;
68-
}
44+
(function() {
45+
var dateEl = document.getElementById('build-date');
46+
if (dateEl) {
47+
var utcDate = new Date(dateEl.innerText.trim());
48+
if (!isNaN(utcDate.getTime())) {
49+
50+
// Configuration for "Nov 20, 12:30 GMT+1" style
51+
var localDate = new Intl.DateTimeFormat(undefined, {
52+
month: 'short', // "Nov"
53+
day: 'numeric', // "20"
54+
hour: '2-digit', // "12"
55+
minute: '2-digit', // "30"
56+
hour12: false, // Use 24-hour clock (False = 13:00, True = 1:00 PM)
57+
timeZoneName: 'short' // "GMT+1", "CET", "EST" (Depends on browser)
58+
}).format(utcDate);
59+
60+
dateEl.innerText = localDate;
6961
}
70-
})();
71-
</script>
62+
}
63+
})();
64+
</script>

docs/mkdocs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ theme:
4545
icon: material/lightbulb-on
4646
name: Switch to light mode
4747
font:
48-
text: Roboto
49-
code: Ubuntu Mono
48+
text: "IBM Plex Sans"
49+
code: "IBM Plex Mono"
5050
icon:
5151
repo: fontawesome/brands/github
5252
logo: images/logo.png

0 commit comments

Comments
 (0)