-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAboutPage.jsx
More file actions
186 lines (172 loc) · 6.55 KB
/
AboutPage.jsx
File metadata and controls
186 lines (172 loc) · 6.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
import React, { useEffect } from 'react';
import { motion, AnimatePresence } from 'framer-motion';
import { Link, useParams, Navigate } from 'react-router-dom';
import {
ArrowLeftIcon,
TreeStructureIcon,
GraphIcon,
TerminalIcon,
ArticleIcon,
BugIcon,
HandHeartIcon,
BookBookmarkIcon,
IdentificationCardIcon,
} from '@phosphor-icons/react';
import NeuromancerHUD from './about-views/NeuromancerHUD';
import SystemArchitecture from './about-views/SystemArchitecture';
import MindMapConstellation from './about-views/MindMapConstellation';
import ClassifiedDossier from './about-views/ClassifiedDossier';
import Brutalist from './about-views/Brutalist';
import SkillDeck from './about-views/SkillDeck';
import LuxeAboutView from './about-views/LuxeAboutView';
import { useAchievements } from '../context/AchievementContext';
import Seo from '../components/Seo';
const ViewSwitcher = ({ currentView }) => {
const views = [
{ id: 'luxe', icon: IdentificationCardIcon, label: 'Luxe' },
{ id: 'brutalist', icon: BugIcon, label: 'Brutalist' },
{ id: 'skills', icon: IdentificationCardIcon, label: 'Skill Deck' },
{ id: 'dossier', icon: ArticleIcon, label: 'Dossier' },
{ id: 'hud', icon: TerminalIcon, label: 'The Terminal' },
{ id: 'blueprint', icon: TreeStructureIcon, label: 'Blueprint' },
{ id: 'map', icon: GraphIcon, label: 'Mind Map' },
];
return (
<div className="fixed bottom-8 left-1/2 -translate-x-1/2 z-50 bg-black/50 backdrop-blur-md p-2 rounded-full border border-white/10 shadow-2xl flex gap-2">
{views.map((view) => (
<Link
key={view.id}
to={`/about/${view.id}`}
className={`relative px-4 py-2 rounded-full flex items-center gap-2 transition-all ${
currentView === view.id
? 'bg-white text-black font-bold shadow-lg'
: 'text-white/60 hover:text-white hover:bg-white/10'
}`}
>
<view.icon size={20} />
<span className="text-sm hidden md:inline">{view.label}</span>
{currentView === view.id && (
<motion.div
layoutId="view-pill"
className="absolute inset-0 bg-white rounded-full mix-blend-difference -z-10"
/>
)}
</Link>
))}
</div>
);
};
const AboutPage = () => {
const { viewId } = useParams();
const validViews = [
'luxe',
'dossier',
'hud',
'blueprint',
'map',
'brutalist',
'skills',
];
const { unlockAchievement } = useAchievements();
useEffect(() => {
unlockAchievement('curious_soul');
}, [unlockAchievement]);
if (!validViews.includes(viewId)) {
return <Navigate to="/404" replace />;
}
const view = viewId;
const getButtonStyle = (currentView) => {
switch (currentView) {
case 'luxe':
return 'bg-white/80 text-black border-black/10 border font-outfit uppercase tracking-widest text-[10px] hover:bg-black hover:text-white rounded-full shadow-sm backdrop-blur-md';
case 'dossier':
return 'bg-white text-black border-black border-2 font-mono uppercase tracking-widest text-xs hover:bg-[#4a0404] hover:text-white hover:border-[#4a0404] rounded-none shadow-none';
case 'brutalist':
case 'skills':
return 'bg-black text-white border-white border-2 font-mono uppercase tracking-widest text-xs hover:bg-white hover:text-black rounded-none';
case 'hud':
return 'bg-black text-green-500 border-green-500 border font-mono tracking-wider hover:bg-green-500 hover:text-black shadow-[0_0_10px_rgba(0,255,0,0.3)] rounded-sm';
case 'blueprint':
return 'bg-[#002b5c]/90 text-cyan-300 border-cyan-400 border-2 font-mono uppercase text-xs tracking-wider hover:bg-cyan-400 hover:text-[#001e40] rounded-none';
case 'map':
return 'bg-gray-900/60 text-purple-200 border-purple-500/50 border hover:bg-purple-600 hover:text-white hover:border-purple-600 rounded-full shadow-lg backdrop-blur-xl';
default:
return 'bg-black/50 text-white border-white/10 hover:bg-white hover:text-black rounded-full font-bold';
}
};
return (
<div className="min-h-screen bg-black relative">
<Seo
title="Fezcodex | About"
description="Learn more about the creator of Fezcodex."
keywords={[
'Fezcodex',
'blog',
'portfolio',
'developer',
'software engineer',
'about',
]}
/>
{/* Global Navigation */}
<motion.div
initial={{ opacity: 0, x: -20 }}
animate={{ opacity: 1, x: 0 }}
className="fixed top-6 left-6 z-50 flex flex-col items-start gap-3"
>
<Link
to="/"
className={`group flex items-center gap-2 px-4 py-2 transition-all duration-300 ${getButtonStyle(view)}`}
>
<ArrowLeftIcon
weight="bold"
className="group-hover:-translate-x-1 transition-transform"
/>
<span className="hidden sm:inline">Back to Reality</span>
</Link>
<Link
to="/about/friends"
className={`group flex items-center gap-2 px-4 py-2 transition-all duration-300 ${getButtonStyle(view)}`}
>
<HandHeartIcon
weight="bold"
className="group-hover:scale-110 transition-transform"
/>
<span className="hidden sm:inline">Friends of the Show</span>
</Link>
<Link
to="/reading"
className={`group flex items-center gap-2 px-4 py-2 transition-all duration-300 ${getButtonStyle(view)}`}
>
<BookBookmarkIcon
weight="bold"
className="group-hover:scale-110 transition-transform"
/>
<span className="hidden sm:inline">Reading</span>
</Link>
</motion.div>
{/* View Container */}
<AnimatePresence mode="wait">
<motion.div
key={view}
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
exit={{ opacity: 0 }}
transition={{ duration: 0.5 }}
className="w-full h-full"
>
{view === 'luxe' && <LuxeAboutView />}
{view === 'hud' && <NeuromancerHUD />}
{view === 'blueprint' && <SystemArchitecture />}
{view === 'map' && <MindMapConstellation />}
{view === 'dossier' && <ClassifiedDossier />}
{view === 'brutalist' && <Brutalist />}
{view === 'skills' && <SkillDeck />}
</motion.div>
</AnimatePresence>
{/* Switcher Controls */}
<ViewSwitcher currentView={view} />
</div>
);
};
export default AboutPage;