Skip to content

Commit 8a15bb6

Browse files
committed
Fix footer JavaScript and add inline script for footer-end hook
1 parent b797ac9 commit 8a15bb6

1 file changed

Lines changed: 9 additions & 22 deletions

File tree

static/footer.js

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,11 @@
11
(function() {
2-
document.addEventListener('DOMContentLoaded', function() {
3-
const footer = document.querySelector('.page-footer footer');
4-
if (!footer) return;
5-
6-
// Create a single line footer
7-
const customFooter = document.createElement('div');
8-
customFooter.className = 'text-center text-sm mb-4';
9-
10-
// Get current date
11-
const now = new Date();
12-
const dateStr = now.toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric' });
13-
14-
// Build the footer content
15-
customFooter.innerHTML =
16-
'© Jana Gonnermann-Müller | Last modified: ' + dateStr + ' | ' +
17-
'<a href="/privacy" class="hover:underline">Privacy Notice</a> | ' +
18-
'<a href="/legal" class="hover:underline">Legal Notice</a>';
19-
20-
// Replace the entire footer content
21-
footer.innerHTML = '';
22-
footer.appendChild(customFooter);
23-
});
2+
const footer = document.querySelector('.page-footer footer');
3+
if (!footer) return;
4+
5+
// Get current date
6+
const now = new Date();
7+
const dateStr = now.toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric' });
8+
9+
// Replace entire footer content with single line
10+
footer.innerHTML = '<div class="text-center text-sm">© Jana Gonnermann-Müller | Last modified: ' + dateStr + ' | <a href="/privacy" class="hover:underline">Privacy Notice</a> | <a href="/legal" class="hover:underline">Legal Notice</a></div>';
2411
})();

0 commit comments

Comments
 (0)