Skip to content

[Feature Request] Add Theme Toggle (Dark/Light Mode) & Scroll-to-Top/Bottom ButtonΒ #704

@antara5603

Description

@antara5603

🧩 Feature Overview

This issue proposes adding two UI/UX enhancements to the DevPath landing page:

  1. Theme Toggle Button β€” allows users to switch between dark and light mode
  2. Scroll Navigation Button β€” a fixed floating button to jump between the top and bottom of the page

🎯 Motivation

Currently, the DevPath website only supports a dark theme. Many users prefer light mode for readability, especially in bright environments. Additionally, as the page grows with more sections, a scroll shortcut button will significantly improve navigation experience.

Both of these are beginner-friendly, high-impact improvements aligned with modern web UX standards.


πŸ› οΈ Proposed Implementation

1. Theme Toggle

  • Add a toggle button in the navbar (next to the GitHub button)
  • On click, add/remove a data-theme="light" attribute on <body>
  • Define a :root[data-theme="light"] CSS block to override color variables
  • Persist user preference using localStorage so it survives page reloads
  • Show a sun β˜€οΈ / moon πŸŒ™ icon to indicate current mode

2. Scroll-to-Top / Bottom Button

  • Add a fixed floating button at the bottom-right corner of the page
  • First click β†’ scrolls to the top of the page (scrollTo(0, 0))
  • Second click β†’ scrolls to the bottom (scrollTo(0, document.body.scrollHeight))
  • Toggle the arrow direction (⬆ / ⬇) based on current scroll position
  • Button appears only after the user scrolls 200px or more (avoids clutter at the top)

βœ… Acceptance Criteria

  • Theme toggle is visible in the navbar
  • Light mode applies correct color overrides across all sections
  • Theme preference persists after page refresh
  • Scroll button is fixed at bottom-right
  • Scroll direction toggles correctly
  • Button is hidden at the very top of the page
  • Both features are responsive (mobile + desktop)
  • No existing functionality is broken

πŸ“Ž Additional Notes

  • I plan to implement both features in separate commits for clean review history
  • I will test across Chrome, Firefox, and mobile viewport sizes
  • This contribution is part of GSSoC 2026

Would love to take this up if the maintainers are open to it! Please assign this issue to me. πŸ™

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions