From 4dada4a6f8753b7cf2888d5e76a706d8ba0c1c45 Mon Sep 17 00:00:00 2001 From: v0 Date: Sat, 7 Mar 2026 14:48:57 +0000 Subject: [PATCH] feat: add cyberpunk navigation effects Update site navigation title and remove top icon, add random glitch effects. Co-authored-by: Simon <85533298+handsomezhuzhu@users.noreply.github.com> --- components/site-navigation.tsx | 73 +++++++++++++++++++++++++++------- 1 file changed, 59 insertions(+), 14 deletions(-) diff --git a/components/site-navigation.tsx b/components/site-navigation.tsx index 43fcd89..b13da1a 100644 --- a/components/site-navigation.tsx +++ b/components/site-navigation.tsx @@ -2,8 +2,8 @@ import type React from "react" -import { useState } from "react" -import { ExternalLink, Globe, Server, Mail, Zap, Shield, Code, FileText, Search } from "lucide-react" +import { useState, useEffect } from "react" +import { ExternalLink, Server, Mail, Zap, Shield, Code, FileText, Search } from "lucide-react" interface Site { domain: string @@ -373,6 +373,43 @@ function getServerBadgeStyle(server: string) { export function SiteNavigation() { const [searchQuery, setSearchQuery] = useState("") + const [displayText, setDisplayText] = useState("") + const [glitchActive, setGlitchActive] = useState(false) + const fullText = "SIMON站点导航" + + useEffect(() => { + const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*_-+=<>?/\\|~" + let frame = 0 + const totalFrames = fullText.length * 5 + + const interval = setInterval(() => { + let output = "" + for (let i = 0; i < fullText.length; i++) { + if (i < Math.floor(frame / 5)) { + output += fullText[i] + } else { + output += chars[Math.floor(Math.random() * chars.length)] + } + } + setDisplayText(output) + frame++ + if (frame > totalFrames) { + clearInterval(interval) + setDisplayText(fullText) + } + }, 40) + + // Periodic glitch effect + const glitchInterval = setInterval(() => { + setGlitchActive(true) + setTimeout(() => setGlitchActive(false), 150) + }, 4000) + + return () => { + clearInterval(interval) + clearInterval(glitchInterval) + } + }, []) const filteredCategories = categories .map((category) => ({ @@ -393,19 +430,27 @@ export function SiteNavigation() {
{/* Header - 居中设计 */}
-
-
- -
-
-

- 站点导航 +

+ {displayText || "SIMON站点导航"}

-

- zhuzihan.com - | - 全部站点与服务管理 -

+
+ +

+ zhuzihan.com + | + 全部站点与服务管理 +

+ +
{/* Search - 居中设计 */}