Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Year updater with js #95

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion blogs.html
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,8 @@ <h3>Quick Links</h3>
/>
</div>
<div class="copyright">
&copy; 2023 Algorithmia SE 🌍. All Rights Reserved
<!-- update current year -->
&copy; <script>document.write(new Date().getFullYear())</script> Algorithmia SE 🌍. All Rights Reserved
</div>
</div>
</footer>
Expand Down
3 changes: 2 additions & 1 deletion events.html
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,8 @@ <h3>Quick Links</h3>
/>
</div>
<div class="copyright">
&copy; 2023 Algorithmia SE 🌍. All Rights Reserved
<!-- update current year -->
&copy; <script>document.write(new Date().getFullYear())</script> Algorithmia SE 🌍. All Rights Reserved
</div>
</div>
</footer>
Expand Down
3 changes: 2 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,8 @@ <h3>Quick Links</h3>
/>
</div>
<div class="copyright">
&copy; 2023 Algorithmia SE 🌍. All Rights Reserved
<!-- update current year -->
&copy; <span id="currentYear"></span> Algorithmia SE 🌍. All Rights Reserved
</div>
</div>
</footer>
Expand Down
6 changes: 6 additions & 0 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,9 @@ menu.addEventListener("click", function () {
menu.classList.toggle("fa-times");
navbar.classList.toggle("active");
});

// Year updater
var currentYearElement = document.getElementById('currentYear');
if (currentYearElement) {
currentYearElement.innerText = new Date().getFullYear();
}
3 changes: 2 additions & 1 deletion projects.html
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,8 @@ <h3>Quick Links</h3>
/>
</div>
<div class="copyright">
&copy; 2023 Algorithmia SE 🌍. All Rights Reserved
<!-- update current year -->
&copy; <script>document.write(new Date().getFullYear())</script> Algorithmia SE 🌍. All Rights Reserved
</div>
</div>
</footer>
Expand Down