Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
bb23a25
Add GitHub link to footer
raj-aryan-official Mar 30, 2026
22d7396
chore: add StablePay favicon and head link
raj-aryan-official Mar 30, 2026
3354d50
chore: use file-based favicon; move favicon to app; export viewport; …
raj-aryan-official Mar 30, 2026
3bf4ab4
fix: add github icon + remove out-of-scope public favicon; add docstr…
raj-aryan-official Mar 30, 2026
d82db0d
chore(ci): revert out-of-scope Footer change; remove github.svg; add …
raj-aryan-official Mar 30, 2026
e506bec
feat(svg): add SVG logo and use in Header/Footer
raj-aryan-official Mar 30, 2026
8273836
feat(logo-spinner): add Stability Nexus and Djed Alliance SVGs; wire …
raj-aryan-official Mar 30, 2026
219b463
feat: add light mode
raj-aryan-official Mar 30, 2026
ab397e4
chore(docs): add JSDoc comments for components to improve doc coverage
raj-aryan-official Mar 30, 2026
87bf31d
fix(footer): replace placeholder hrefs with Next.js Link routes
raj-aryan-official Mar 30, 2026
944762a
docs: add License.md (MIT)
raj-aryan-official Mar 30, 2026
38e9de4
feat(footer): make social icons clickable and add share links
raj-aryan-official Mar 30, 2026
01d7ad6
fix(header): lower z-index to avoid overlapping mobile modals/images
raj-aryan-official Mar 30, 2026
6224a29
fix(button): accept HTML button props and default type='button'
raj-aryan-official Mar 30, 2026
f60d033
fix(nav): remove unused Fraunces font and implement smooth scroll for…
raj-aryan-official Mar 30, 2026
8e0eea9
fix(footer): place 'use client' at top for Next.js
raj-aryan-official Mar 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions License.md
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.
6 changes: 6 additions & 0 deletions src/app/apple-touch-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions src/app/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 13 additions & 9 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Metadata } from 'next'
import { Inter, Fraunces, Caudex } from 'next/font/google'
import { Inter, Caudex } from 'next/font/google'
import { twMerge } from 'tailwind-merge'
import './globals.css'

Expand All @@ -9,12 +9,7 @@ const inter = Inter({
display: 'swap',
})

const fraunces = Fraunces({
subsets: ['latin'],
variable: '--font-fraunces',
display: 'swap',
weight: ['400', '500', '600', '700'],
})
// Removed unused Fraunces font to avoid unnecessary load

const caudex = Caudex({
subsets: ['latin'],
Expand All @@ -28,6 +23,16 @@ export const metadata: Metadata = {
description: 'A landing page for StablePay',
}

// Configure theme color and viewport-related settings via export
export const viewport = {
// Theme color used by some browsers and OS UI when using file-based favicons
themeColor: '#0ea5a1',
}

/**
* RootLayout wraps all pages and provides global styles and fonts.
* It also exports `viewport` and `metadata` used by Next.js.
*/
export default function RootLayout({
children,
}: Readonly<{
Expand All @@ -38,9 +43,8 @@ export default function RootLayout({
<body
className={twMerge(
inter.variable,
fraunces.variable,
caudex.variable,
'font-inter bg-black text-white antialiased'
'font-inter antialiased bg-white text-black dark:bg-black dark:text-white'
)}
>
{children}
Expand Down
3 changes: 3 additions & 0 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import { Features } from '@/sections/Features'
import { CallToAction } from '@/sections/CallToAction'
import { Footer } from '@/sections/Footer'

/**
* Home — landing page root component assembling page sections.
*/
export default function Home() {
return (
<>
Expand Down
8 changes: 8 additions & 0 deletions src/assets/djed-alliance.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions src/assets/stability-nexus.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions src/assets/svg/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 14 additions & 6 deletions src/components/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
function Button(props: React.PropsWithChildren) {
/**
* Button — small styled button used throughout the site.
* Accepts children to be rendered inside the button element.
*/
type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement>

function Button(props: ButtonProps) {
const { children, className = '', type = 'button', style, ...rest } = props

const baseClass = 'relative py-1.5 px-2.5 sm:py-2 sm:px-3 rounded-lg font-medium text-xs sm:text-sm bg-gradient-to-b from-[#331500] to-[#FF863B] text-white'
const mergedStyle = Object.assign({ boxShadow: '0 0 12px #FF863B' }, style || {})

return (
<button
className="relative py-1.5 px-2.5 sm:py-2 sm:px-3 rounded-lg font-medium text-xs sm:text-sm bg-gradient-to-b from-[#331500] to-[#FF863B]"
style={{ boxShadow: '0 0 12px #FF863B' }}
>
<button type={type} className={`${baseClass} ${className}`} style={mergedStyle} {...rest}>
<div className="absolute inset-0 rounded-lg">
<div className="rounded-lg border border-white/20 absolute inset-0 [mask-image:linear-gradient(to_bottom,black,transparent)]"></div>
<div className="rounded-lg border absolute inset-0 border-white/40 [mask-image:linear-gradient(to_top,black,transparent)]"></div>
<div className="absolute inset-0 shadow-[0px_0px_10px_0px_rgba(255,134,59,0.7)_inset] rounded-lg"></div>
</div>
<span>{props.children}</span>
<span>{children}</span>
</button>
)
}
Expand Down
79 changes: 79 additions & 0 deletions src/components/ThemeToggle.tsx
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>
);
}
29 changes: 21 additions & 8 deletions src/sections/CallToAction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ import { RefObject, useEffect, useRef, useCallback } from 'react'
import { useMotionTemplate, useMotionValue, useScroll, useTransform } from 'framer-motion'
import { motion } from 'framer-motion'

/**
* Hook to track mouse position relative to a target element.
* Returns motion values `[mouseX, mouseY]` representing coordinates
* within the target element's bounding box.
*/
const useRelativeMousePosition = (to: RefObject<HTMLElement>) => {
const mouseX = useMotionValue(0)
const mouseY = useMotionValue(0)
Expand All @@ -32,6 +37,10 @@ const useRelativeMousePosition = (to: RefObject<HTMLElement>) => {
return [mouseX, mouseY]
}

/**
* CallToAction component — hero CTA block with animated background
* Displays a headline, supporting text, and primary action button.
*/
export const CallToAction = () => {
const sectionRef = useRef<HTMLElement>(null)
const borderedDivRef = useRef<HTMLDivElement>(null)
Expand All @@ -46,11 +55,11 @@ export const CallToAction = () => {
const maskImage = useMotionTemplate`radial-gradient(50% 50% at ${mouseX}px ${mouseY}px, black, transparent)`

return (
<section ref={sectionRef} className="py-12 sm:py-16 md:py-24">
<section id="developers" ref={sectionRef} className="py-12 sm:py-16 md:py-24">
<div className="container px-4 sm:px-6">
<motion.div
ref={borderedDivRef}
className="border border-white/15 py-12 sm:py-16 md:py-24 rounded-xl overflow-hidden relative group"
className="border border-black/15 dark:border-white/15 py-12 sm:py-16 md:py-24 rounded-xl overflow-hidden relative group transition-colors duration-500 bg-white dark:bg-black"
animate={{
backgroundPositionX: startBg.width,
}}
Expand All @@ -59,11 +68,15 @@ export const CallToAction = () => {
duration: 60,
ease: 'linear',
}}
style={{
backgroundImage: `url(${startBg.src})`,
backgroundPositionY: backgroundPositionY,
}}
>
{/* Animated Background */}
<motion.div
className="absolute inset-0 -z-20 invert opacity-40 dark:invert-0 dark:opacity-100 transition-all duration-500 pointer-events-none"
style={{
backgroundImage: `url(${startBg.src})`,
backgroundPositionY: backgroundPositionY,
}}
/>
<div
className="absolute inset-0 bg-[#FF863B] bg-blend-overlay [mask-image:radial-gradient(50%_50%_at_50%_35%,black,transparent)] group-hover:opacity-0 transition duration-300"
style={{
Expand All @@ -78,10 +91,10 @@ export const CallToAction = () => {
}}
></motion.div>
<div className="relative px-4 sm:px-6">
<h2 className="text-3xl sm:text-4xl md:text-5xl lg:text-6xl font-medium max-w-xs sm:max-w-sm mx-auto tracking-tighter text-center">
<h2 className="text-3xl sm:text-4xl md:text-5xl lg:text-6xl font-medium max-w-xs sm:max-w-sm mx-auto tracking-tighter text-center text-black dark:text-white transition-colors duration-500">
Redefining the Future of Stable Payments.
</h2>
<p className="text-base sm:text-lg md:text-xl max-w-xs mx-auto text-center text-white/70 mt-4 sm:mt-5 tracking-tight">
<p className="text-base sm:text-lg md:text-xl max-w-xs mx-auto text-center text-black/70 dark:text-white/70 mt-4 sm:mt-5 tracking-tight transition-colors duration-500">
Accept Djed stablecoins and empower your business with a reliable, decentralized payment solution.
</p>

Expand Down
Loading