Skip to content

Conversation

@anxkhn
Copy link
Contributor

@anxkhn anxkhn commented Aug 13, 2025

Description:
This PR improves the UI by dynamically displaying the last data update time based on the latest commit to the /data directory, rather than the hardcoded updated "weekly” text.

Since this repository hasn’t been updated in a while, the previous static label could be misleading. The new implementation fetches the timestamp of the latest commit via the GitHub API and formats it into a human-readable “time ago” phrase (e.g., updated 3 days ago), making the displayed information more accurate and useful.

Changes:

  • Added fetchLastUpdatedPhrase() to script.js to retrieve the last commit date from GitHub API.
  • Implemented formatTimeAgo() utility to convert timestamps into a relative and nice human readable format.
  • Updated index.html to replace the static span with an element that can be dynamically updated.

Pre-commit Checks:

  • All pre-commit hooks have been run locally with pre-commit run --all-files.
  • No linting or formatting issues were found.

UI Design and Aesthetics:

  • Matches the existing design style with the same font and green color scheme.
  • Minimal changes to DOM structure for seamless integration.

Screenshot:

image

@kuutsav kuutsav merged commit e8b4548 into kuutsav:master Aug 14, 2025
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 this pull request may close these issues.

2 participants