diff --git a/src/css/custom.css b/src/css/custom.css index 95fb9e8..1fd66c3 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -42,6 +42,29 @@ /* Add custom navbar styling */ .navbar { border-bottom: 1px solid rgba(147, 51, 234, 0.1); + padding: 0; +} + +/* Container for the entire navbar */ +.navbar__inner { + width: 100%; + margin: 0 auto; + padding: 0; +} + +/* Main content wrapper to match page content */ +.container { + max-width: var(--ifm-container-width) !important; + margin: 0 auto; + padding: 0 var(--ifm-spacing-horizontal); +} + +/* Ensure navbar items are properly spaced */ +.navbar__items { + margin: 0 auto; + max-width: var(--ifm-container-width); + padding: 0 var(--ifm-spacing-horizontal); + width: 100%; } [data-theme="dark"] .navbar { diff --git a/src/pages/index.tsx b/src/pages/index.tsx index b59a4c9..9c57718 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -3,6 +3,7 @@ import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; import Layout from "@theme/Layout"; import { useEffect, useRef } from 'react'; import { createNoise3D } from 'simplex-noise'; +import { useColorMode } from '@docusaurus/theme-common'; import cashuLogo from '@site/static/img/Cashume.png'; import tsLogo from '@site/static/img/tslogo.png'; import npubcashLogo from '@site/static/img/npubcash.png'; @@ -10,13 +11,16 @@ import bwcLogo from '@site/static/img/bwc.png'; import vpnstrLogo from '@site/static/img/vpnstr.png'; import ndklogo from '@site/static/img/ndk.png'; -export default function Home(): JSX.Element { +function HomeContent(): JSX.Element { + const { colorMode } = useColorMode(); const { siteConfig } = useDocusaurusContext(); const docsLink = useBaseUrl("docs/Introduction/getting_started"); const canvasRef = useRef(null); const animationFrameRef = useRef(); - const backgroundColor = 'hsla(260,40%,5%,1)'; + const backgroundColor = colorMode === 'dark' + ? 'hsla(260,40%,5%,1)' + : 'hsla(260,40%,97%,1)'; useEffect(() => { console.log('Effect running'); @@ -26,7 +30,6 @@ export default function Home(): JSX.Element { return; } - // Create two canvases (one for drawing, one for display) const canvasA = document.createElement('canvas'); const canvasB = canvasRef.current; if (!canvasB) { @@ -43,11 +46,9 @@ export default function Home(): JSX.Element { console.log('Canvas setup complete'); - // Make sure canvasA is also added to the DOM canvasA.style.display = 'none'; container.appendChild(canvasA); - // Constants const particleCount = 300; const particlePropCount = 9; const particlePropsLength = particleCount * particlePropCount; @@ -58,7 +59,7 @@ export default function Home(): JSX.Element { const rangeSpeed = 0.5; const baseRadius = 0.3; const rangeRadius = 1; - const baseHue = 260; + const baseHue = colorMode === 'dark' ? 260 : 230; const rangeHue = 40; const noiseSteps = 6; const xOff = 0.00125; @@ -73,25 +74,22 @@ export default function Home(): JSX.Element { const logoImage = new Image(); logoImage.src = cashuLogo; const logoSize = 16; - let logoParticleIndex = 0; // Track which particle is the logo + let logoParticleIndex = 0; - // Initialize particles const initParticle = (i: number) => { if (i === logoParticleIndex) { - // Special initialization for logo particle let x = rand(canvasA.width); let y = center[1] + randRange(rangeY); let vx = 0; let vy = 0; let life = 0; let ttl = Infinity; - let speed = baseSpeed * 1.2; // Normal speed + let speed = baseSpeed * 1.2; let radius = baseRadius; let hue = baseHue; particleProps.set([x, y, vx, vy, life, ttl, speed, radius, hue], i); } else { - // Original initialization for regular particles let x = rand(canvasA.width); let y = center[1] + randRange(rangeY); let vx = 0; @@ -119,7 +117,7 @@ export default function Home(): JSX.Element { ctxA.save(); if (index === logoParticleIndex) { - const opacity = 0.04; + const opacity = colorMode === 'dark' ? 0.04 : 0.03; ctxA.globalAlpha = opacity; const angle = Math.atan2(y2 - y, x2 - x); ctxA.translate(x, y); @@ -128,7 +126,10 @@ export default function Home(): JSX.Element { } else { ctxA.lineCap = 'round'; ctxA.lineWidth = radius; - ctxA.strokeStyle = `hsla(${hue},85%,65%,${fadeInOut(life, ttl) * 0.5})`; + const saturation = colorMode === 'dark' ? '85%' : '70%'; + const lightness = colorMode === 'dark' ? '65%' : '60%'; + const opacity = colorMode === 'dark' ? 0.5 : 0.4; + ctxA.strokeStyle = `hsla(${hue},${saturation},${lightness},${fadeInOut(life, ttl) * opacity})`; ctxA.beginPath(); ctxA.moveTo(x, y); ctxA.lineTo(x2, y2); @@ -147,7 +148,6 @@ export default function Home(): JSX.Element { y = particleProps[i2]; if (i === logoParticleIndex) { - // Regular noise movement but with reduced range n = simplex(x * xOff, y * yOff, tick * zOff) * (noiseSteps * 0.4) * TAU; } else { n = simplex(x * xOff, y * yOff, tick * zOff) * noiseSteps * TAU; @@ -173,7 +173,6 @@ export default function Home(): JSX.Element { particleProps[i4] = vy; particleProps[i5] = life; - // Handle screen boundaries for logo particle if (i === logoParticleIndex) { if (x2 < 0) particleProps[i] = canvasA.width; if (x2 > canvasA.width) particleProps[i] = 0; @@ -219,7 +218,6 @@ export default function Home(): JSX.Element { ctxB.restore(); }; - // Initialize resize(); particleProps = new Float32Array(particlePropsLength); @@ -261,13 +259,10 @@ export default function Home(): JSX.Element { window.removeEventListener('resize', resize); container.removeChild(canvasA); }; - }, []); + }, [colorMode]); return ( - + <>
-
+
-

+

Cashu TS

-

- A powerful toolkit for Cashu development. + +

+ A powerful toolkit for Cashu development.

-

- Build secure, scalable Cashu applications with confidence.

+

+ Build secure, scalable Cashu applications with confidence.
We handle complexity, you ship.

-
-                $ 
-                npm i @cashu/cashu-ts
+              
+                $ 
+                npm i @cashu/cashu-ts
               
@@ -332,100 +345,149 @@ export default function Home(): JSX.Element {
-
+

- + Made with Cashu TS - - Simplifying the process of building Cashu applications. + + Simplifying the process of building Cashu applications.

{/* Cashu.me */} -
+
Cashu.me logo
-

Cashu.me

+

+ Cashu.me +

-

+

A modern web wallet built with Quasar and Vue.js, leveraging TypeScript for enhanced reliability. Experience seamless eCash transactions in a user-friendly interface.

{/* VPNSTR */} -
+
VPNSTR logo
-

VPNSTR

+

+ VPNSTR +

-

+

A privacy-focused VPN service accepting Bitcoin Lightning and Cashu payments. Designed for users who prioritize anonymity and secure internet access.

{/* NostrDevKit */} -
+
NDK logo
-

NostrDevKit (NDK)

+

+ NostrDevKit (NDK) +

-

+

A comprehensive development kit for building Nostr applications. NDK simplifies the creation of relays, clients, and other Nostr-based solutions with robust tooling.

{/* Boardwalk Cash */} -
+
Boardwalk Cash logo
-

Boardwalk Cash

+

+ Boardwalk Cash +

-

+

A dollar-based CashuBTC wallet integrating Bitcoin and Nostr. Offering a seamless experience for managing digital cash with built-in social features.

{/* Npubcash */} -
+
Npubcash logo
-

Npubcash

+

+ Npubcash +

-

+

An innovative LNURL service that generates and manages tokens for received payments, enabling seamless offline-to-online transaction experiences.

@@ -435,7 +497,10 @@ export default function Home(): JSX.Element {
-