Skip to content

added dynamic time-based greeting#61

Open
adityakhati-03 wants to merge 1 commit into
revatikadam0607:mainfrom
adityakhati-03:main
Open

added dynamic time-based greeting#61
adityakhati-03 wants to merge 1 commit into
revatikadam0607:mainfrom
adityakhati-03:main

Conversation

@adityakhati-03

@adityakhati-03 adityakhati-03 commented May 17, 2026

Copy link
Copy Markdown

ISSUE - #56

This PR enhances the landing page greeting by making it dynamic and increasing its visibility. Instead of a static "HELLO!", the portfolio now greets visitors based on their current local time.

Changes Made

  • index.html: Added an id="greeting" to the .hello-tag paragraph so it can be easily targeted by JavaScript.

  • js/script.js: Implemented a new setGreeting() function hooked to the DOMContentLoaded event. It checks the user's local system time and updates the greeting to either "GOOD MORNING!", "GOOD AFTERNOON!", or "GOOD EVENING!".

  • css/style.css: Increased the font-size of .hello-tag to 30px to make the new dynamic greeting stand out more on the hero section. (Note: Document was also automatically formatted by my code editor).

Personalizing the greeting adds a nice, interactive touch for visitors arriving at the portfolio, making the user experience feel more dynamic and welcoming.

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.

1 participant