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 #94

Open
SamuelWorld20 opened this issue Jan 24, 2024 · 1 comment · May be fixed by #95
Open

Year updater with js #94

SamuelWorld20 opened this issue Jan 24, 2024 · 1 comment · May be fixed by #95
Assignees

Comments

@SamuelWorld20
Copy link
Member

SamuelWorld20 commented Jan 24, 2024

Is your feature request related to a problem? Please describe.

I noticed in the footer the year 2023 is still there, then I checked the code and found out the year was just inputted there manually

Describe the solution you'd like

So I discovered we can use a JavaScript code to make it automatic (i.e input the year it's self)

Describe alternatives you've considered

Here is how I suggest the code to be

<div class="copyright"> &copy; <script>document.write(new Date().getFullYear());</script> Algorithmia SE 🌍. All Rights Reserved </div>

Or it can be written in the js file separately this way

var currentYearElement = document.getElementById('currentYear'); if (currentYearElement) { currentYearElement.innerText = new Date().getFullYear(); }

Then the html file should have this

<div class="copyright"> &copy; <span id="currentYear"></span> Algorithmia SE 🌍. All Rights Reserved </div>

Additional context

Screenshot (253)
Screenshot (252)

I hope you consider my request

@dohoudaniel
Copy link
Member

Hi there.
Thank you for your attention to detail.
Please, create a PR, and propose your solution, tagging this issue you created, and @ALX-SE-Algorithmia/code-reviewing-team.
Thank you, Samuel 🌟

@SamuelWorld20 SamuelWorld20 linked a pull request Jan 25, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants