Skip to content

Commit

Permalink
Automatisch im Footer immer das aktuelle Jahr einfügen
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidCraftDev authored Jan 1, 2025
1 parent d7b2480 commit 6bd2b01
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion assets/elements/footer.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<footer class="p-4 shadow md:flex md:items-center md:justify-between md:p-6 bg-gray-800">
<span class="text-sm text-gray-400 sm:text-center">© 2022 - 2025 <a href="https://zoeyvid.de" class="hover:underline">ZoeyVid</a>. All Rights Reserved.
<span class="text-sm text-gray-400 sm:text-center" id="years">© 2022 - <a href="https://zoeyvid.de" class="hover:underline">ZoeyVid</a>. All Rights Reserved.
</span>
<ul class="flex flex-wrap items-center mt-3 text-sm text-gray-400 sm:mt-0 list-none">
<li>
Expand Down
3 changes: 2 additions & 1 deletion assets/js/elements.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ function elementLoad() {
document.getElementById("footer").classList.add("pt-4");
document.getElementById("footer").classList.add("mt-auto");
document.getElementsByTagName('noscript')[0].remove();
document.getElementById("git").href = git()
document.getElementById("years").append(new Date().getFullYear());
document.getElementById("git").href = git();
if (document.location.pathname == "/") {
document.getElementById("navbar").classList.remove("pb-4");
document.getElementById("footer").classList.remove("pt-4");
Expand Down

0 comments on commit 6bd2b01

Please sign in to comment.