{{ message }}
feat: 🚀 Complete UI Overhaul - Glassmorphism, Dark Mode & Interactive Effects#1
Merged
anshumanjadiya1102 merged 1 commit intoDrive-for-Java:mainfrom Mar 12, 2026
Merged
Conversation
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (2)
index.html (2)
13-18: Expose theme toggle state to assistive technologies.The button is labeled but does not expose on/off state. Add
aria-pressedand keep it in sync when theme changes.💡 Proposed markup + JS sync
-<button id="theme-toggle" class="theme-toggle-btn" aria-label="Toggle Theme"> +<button id="theme-toggle" class="theme-toggle-btn" aria-label="Toggle theme" aria-pressed="false">// script.js (inside initTheme) toggleBtn.setAttribute('aria-pressed', String(currentTheme === 'dark')); // inside click handler, after computing newTheme toggleBtn.setAttribute('aria-pressed', String(newTheme === 'dark'));🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@index.html` around lines 13 - 18, The theme toggle button (id "theme-toggle") lacks an exposed pressed state for assistive tech; update the initTheme routine (script.js) to set aria-pressed on the toggleBtn (or element with id "theme-toggle") to reflect whether currentTheme === 'dark', and ensure the click handler updates aria-pressed after computing newTheme (set to String(newTheme === 'dark')) so the attribute stays in sync with theme changes.
2-2: Avoid initial theme flash caused by hardcoded dark mode.Line 2 forces dark mode until JS runs, which can visibly flicker for light-mode users. Consider setting theme before first paint instead of hardcoding
data-theme="dark".💡 Suggested approach
-<html lang="en" data-theme="dark"> +<html lang="en"><!-- Place before the stylesheet link in <head> --> <script> (() => { try { const savedTheme = localStorage.getItem('theme'); const sysTheme = window.matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark'; document.documentElement.setAttribute('data-theme', savedTheme || sysTheme); } catch { document.documentElement.setAttribute('data-theme', 'dark'); } })(); </script>🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@index.html` at line 2, Remove the hardcoded data-theme="dark" attribute on the <html> element and instead add a small inline pre-stylesheet script that runs before first paint to set document.documentElement.setAttribute('data-theme', ...) using localStorage.getItem('theme') fallback to window.matchMedia('(prefers-color-scheme: light)') to detect system preference, and a try/catch fallback to 'dark' for safety; this ensures the initial theme is applied before CSS loads and prevents flash for light-mode users.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@script.js`:
- Around line 2-4: The DOMContentLoaded handler calls AOS.init and particlesJS
unguarded which can throw ReferenceError if their CDN scripts fail and prevent
initTheme() from running; update the DOMContentLoaded listener to check for the
globals before calling them (e.g., test window.AOS and window.particlesJS or
typeof AOS !== "undefined") and only invoke AOS.init(...) or particlesJS(...)
when present, and ensure initTheme() is called regardless (move it outside/after
guarded calls or call it in a finally-like flow) so theme initialization never
gets blocked by missing CDN scripts.
In `@style.css`:
- Line 1: The `@import` line and the font-family declaration violate stylelint
rules: change the `@import` url(...) to string notation (use `@import` '<url>';
instead of `@import` url(...);) and ensure font-family values quote multi-word
family names (wrap JetBrains Mono in quotes) and use consistent quoting for
Inter if needed; update the `@import` statement and the font-family declaration
that references Inter and JetBrains Mono so they follow import-notation and
font-family-name-quotes rules.
- Line 39: The global rule that enables transitions and smooth scrolling (the
universal selector "*" with scroll-behavior and transition) and the other
animation-heavy rules referenced lack a prefers-reduced-motion override; add a
media query `@media` (prefers-reduced-motion: reduce) that disables animations and
transitions for affected selectors (set transition: none !important; animation:
none !important; scroll-behavior: auto !important) and include the universal
selector and any specific selectors that declare transitions/animations (e.g.,
the rule that declares "transition: background-color 0.4s ease, color 0.4s ease,
border-color 0.4s ease" and the blocks around lines with persistent motion) so
users who request reduced motion get an immediate, non-animated experience.
---
Nitpick comments:
In `@index.html`:
- Around line 13-18: The theme toggle button (id "theme-toggle") lacks an
exposed pressed state for assistive tech; update the initTheme routine
(script.js) to set aria-pressed on the toggleBtn (or element with id
"theme-toggle") to reflect whether currentTheme === 'dark', and ensure the click
handler updates aria-pressed after computing newTheme (set to String(newTheme
=== 'dark')) so the attribute stays in sync with theme changes.
- Line 2: Remove the hardcoded data-theme="dark" attribute on the <html> element
and instead add a small inline pre-stylesheet script that runs before first
paint to set document.documentElement.setAttribute('data-theme', ...) using
localStorage.getItem('theme') fallback to
window.matchMedia('(prefers-color-scheme: light)') to detect system preference,
and a try/catch fallback to 'dark' for safety; this ensures the initial theme is
applied before CSS loads and prevents flash for light-mode users.
anshumanjadiya1102
approved these changes
Mar 5, 2026
Member
anshumanjadiya1102
left a comment
There was a problem hiding this comment.
Overall review is Nice. I approve it but there are few fixes here, I'll do that.
Thanks for your Contribution @Ziqian-Huang0607.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

📝 Summary
This Pull Request introduces a massive design overhaul for the Drive For Java landing page. The goal was to transition from a basic layout to a high-performance, "Elite-level" developer aesthetic.
The new design features a responsive Dark/Light mode, Glassmorphism (frosted glass effects), and dynamic interactive animations while preserving 100% of the original community content.
✨ Key Features & Changes
🎨 Visuals & UI
⚡ Interactivity & Effects
🛠 Technical Improvements
:rootvariables for easy color management and theme switching.✅ Checklist
Summary by CodeRabbit
Release Notes
New Features
Style