-
-
Notifications
You must be signed in to change notification settings - Fork 29
Feat/social icons clickable #69
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
Open
raj-aryan-official
wants to merge
12
commits into
DjedAlliance:main
Choose a base branch
from
raj-aryan-official:feat/social-icons-clickable
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
bb23a25
Add GitHub link to footer
raj-aryan-official 22d7396
chore: add StablePay favicon and head link
raj-aryan-official 3354d50
chore: use file-based favicon; move favicon to app; export viewport; …
raj-aryan-official 3bf4ab4
fix: add github icon + remove out-of-scope public favicon; add docstr…
raj-aryan-official d82db0d
chore(ci): revert out-of-scope Footer change; remove github.svg; add …
raj-aryan-official e506bec
feat(svg): add SVG logo and use in Header/Footer
raj-aryan-official 8273836
feat(logo-spinner): add Stability Nexus and Djed Alliance SVGs; wire …
raj-aryan-official 219b463
feat: add light mode
raj-aryan-official ab397e4
chore(docs): add JSDoc comments for components to improve doc coverage
raj-aryan-official 87bf31d
fix(footer): replace placeholder hrefs with Next.js Link routes
raj-aryan-official 944762a
docs: add License.md (MIT)
raj-aryan-official 38e9de4
feat(footer): make social icons clickable and add share links
raj-aryan-official File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| MIT License | ||
|
|
||
| Copyright (c) 2026 raj-aryan-official | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in all | ||
| copies or substantial portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| SOFTWARE. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| "use client"; | ||
|
|
||
| import { useEffect, useState } from 'react'; | ||
| import { motion } from 'framer-motion'; | ||
| import { Sun, Moon } from 'lucide-react'; | ||
|
|
||
| /** | ||
| * ThemeToggle — client component that toggles between light and dark themes. | ||
| * Persists selection to `localStorage` and applies the `dark` class to the root element. | ||
| */ | ||
| export default function ThemeToggle() { | ||
| const [theme, setTheme] = useState<'light' | 'dark'>('dark'); | ||
| const [mounted, setMounted] = useState(false); | ||
|
|
||
| // Read initial theme and apply classes | ||
| useEffect(() => { | ||
| setMounted(true); | ||
| const storedTheme = localStorage.getItem('theme') as 'light' | 'dark' | null; | ||
| const initialTheme = storedTheme || (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'); | ||
| setTheme(initialTheme); | ||
| }, []); | ||
|
|
||
| useEffect(() => { | ||
| if (!mounted) return; | ||
| const root = document.documentElement; | ||
| if (theme === 'dark') { | ||
| root.classList.add('dark'); | ||
| } else { | ||
| root.classList.remove('dark'); | ||
| } | ||
| localStorage.setItem('theme', theme); | ||
| }, [theme, mounted]); | ||
|
|
||
| const toggleTheme = () => { | ||
| setTheme(prev => (prev === 'dark' ? 'light' : 'dark')); | ||
| }; | ||
|
|
||
| if (!mounted) { | ||
| // Prevent hydration mismatch by rendering a placeholder of the exact same size | ||
| return <div className="w-[60px] h-[32px] rounded-full bg-white/10" />; | ||
| } | ||
|
|
||
| const isDark = theme === 'dark'; | ||
|
|
||
| return ( | ||
| <button | ||
| onClick={toggleTheme} | ||
| className={`relative flex items-center w-[60px] h-[32px] rounded-full p-1 transition-colors duration-500 ease-in-out border border-white/10 | ||
| ${isDark ? 'bg-white/10 shadow-[inset_0px_0px_10px_rgba(255,255,255,0.1)]' : 'bg-black/5 shadow-[inset_0px_0px_10px_rgba(0,0,0,0.05)]'}`} | ||
| aria-label="Toggle Theme" | ||
| style={{ | ||
| WebkitTapHighlightColor: 'transparent', | ||
| }} | ||
| > | ||
| <motion.div | ||
| className={`absolute flex items-center justify-center w-6 h-6 rounded-full shadow-md z-10 | ||
| ${isDark ? 'bg-[#331500]' : 'bg-white'} border border-white/20`} | ||
| layout | ||
| transition={{ type: 'spring', stiffness: 700, damping: 30 }} | ||
| initial={false} | ||
| animate={{ | ||
| x: isDark ? 26 : 0, | ||
| }} | ||
| > | ||
| {isDark ? ( | ||
| <Moon className="w-3.5 h-3.5 text-[#FF863B]" /> | ||
| ) : ( | ||
| <Sun className="w-3.5 h-3.5 text-amber-500" /> | ||
| )} | ||
| </motion.div> | ||
|
|
||
| {/* Background Icons */} | ||
| <div className="absolute inset-x-2 flex justify-between pointer-events-none text-black/30 dark:text-white/30 text-xs"> | ||
| <Sun className={`w-3.5 h-3.5 transition-opacity duration-300 ${!isDark ? 'opacity-0' : 'opacity-100'}`} /> | ||
| <Moon className={`w-3.5 h-3.5 transition-opacity duration-300 ${isDark ? 'opacity-0' : 'opacity-100'}`} /> | ||
| </div> | ||
| </button> | ||
| ); | ||
| } | ||
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flash of light theme on page load for dark-mode users.
The component correctly defers theme application until after mount, but
src/app/layout.tsxrenders with light-mode classes (bg-white text-black) and lacks a blocking script to synchronize thedarkclass before React hydrates. Users with a stored dark preference orprefers-color-scheme: darkwill see a flash of light theme.To fix, add an inline script in
<head>(or on<html>) that readslocalStorage/matchMediaand applies thedarkclass synchronously, plus addsuppressHydrationWarningto<html>:🤖 Prompt for AI Agents