|
| 1 | +import React, { useState, useEffect } from 'react'; |
| 2 | +import { motion } from 'framer-motion'; |
| 3 | +import ReactMarkdown from 'react-markdown'; |
| 4 | +import remarkGfm from 'remark-gfm'; |
| 5 | +import rehypeRaw from 'rehype-raw'; |
| 6 | +import piml from 'piml'; |
| 7 | +import { |
| 8 | + ArrowUpRight, |
| 9 | + Globe, |
| 10 | + Feather, |
| 11 | + Sparkle, |
| 12 | + Compass, |
| 13 | +} from '@phosphor-icons/react'; |
| 14 | +import LuxeArt from '../../components/LuxeArt'; |
| 15 | + |
| 16 | +const LuxeLinkRenderer = ({ href, children }) => { |
| 17 | + const isExternal = href.startsWith('http') || href.startsWith('https'); |
| 18 | + return ( |
| 19 | + <a |
| 20 | + href={href} |
| 21 | + className="inline-flex items-center gap-1 font-outfit text-[#8D4004] hover:text-black transition-colors border-b border-[#8D4004]/20 hover:border-black" |
| 22 | + target={isExternal ? '_blank' : undefined} |
| 23 | + rel={isExternal ? 'noopener noreferrer' : undefined} |
| 24 | + > |
| 25 | + {children} |
| 26 | + {isExternal && <ArrowUpRight size={12} />} |
| 27 | + </a> |
| 28 | + ); |
| 29 | +}; |
| 30 | + |
| 31 | +const LuxeAboutView = () => { |
| 32 | + const [content, setContent] = useState(''); |
| 33 | + const [title, setTitle] = useState(''); |
| 34 | + const [loading, setLoading] = useState(true); |
| 35 | + |
| 36 | + useEffect(() => { |
| 37 | + const fetchAboutContent = async () => { |
| 38 | + try { |
| 39 | + const [metaResponse, contentResponse] = await Promise.all([ |
| 40 | + fetch('/about-me/about.piml'), |
| 41 | + fetch('/about-me/about.txt'), |
| 42 | + ]); |
| 43 | + |
| 44 | + let attributes = {}; |
| 45 | + if (metaResponse.ok) { |
| 46 | + const pimlText = await metaResponse.text(); |
| 47 | + attributes = piml.parse(pimlText); |
| 48 | + } |
| 49 | + |
| 50 | + let body = ''; |
| 51 | + if (contentResponse.ok) { |
| 52 | + body = await contentResponse.text(); |
| 53 | + } |
| 54 | + |
| 55 | + setTitle(attributes.title || 'Ahmed Samil Bulbul'); |
| 56 | + setContent(body); |
| 57 | + } catch (err) { |
| 58 | + console.error('Error fetching about page content:', err); |
| 59 | + } finally { |
| 60 | + setLoading(false); |
| 61 | + } |
| 62 | + }; |
| 63 | + |
| 64 | + fetchAboutContent(); |
| 65 | + }, []); |
| 66 | + |
| 67 | + if (loading) { |
| 68 | + return ( |
| 69 | + <div className="min-h-screen bg-[#F5F5F0] flex items-center justify-center font-outfit text-[#1A1A1A]/40 text-xs uppercase tracking-widest"> |
| 70 | + Opening The Archive... |
| 71 | + </div> |
| 72 | + ); |
| 73 | + } |
| 74 | + |
| 75 | + return ( |
| 76 | + <div className="min-h-screen bg-[#F5F5F0] text-[#1A1A1A] font-sans selection:bg-[#C0B298] selection:text-black pt-24 pb-20 overflow-x-hidden"> |
| 77 | + |
| 78 | + <div className="fixed inset-0 opacity-[0.02] pointer-events-none z-0"> |
| 79 | + <LuxeArt seed="Ahmed Samil Bulbul" className="w-full h-full mix-blend-multiply" /> |
| 80 | + </div> |
| 81 | + |
| 82 | + <div className="max-w-[1400px] mx-auto px-6 md:px-12 relative z-10"> |
| 83 | + |
| 84 | + {/* Decorative Header */} |
| 85 | + <header className="mb-32 pt-12 border-b border-black/10 pb-20 text-center"> |
| 86 | + <motion.div |
| 87 | + initial={{ opacity: 0, y: 20 }} |
| 88 | + animate={{ opacity: 1, y: 0 }} |
| 89 | + className="inline-flex items-center gap-3 px-4 py-2 border border-black/10 rounded-full bg-white/40 mb-8" |
| 90 | + > |
| 91 | + <Globe size={16} className="text-[#8D4004] animate-spin-slow" /> |
| 92 | + <span className="font-outfit text-[10px] uppercase tracking-[0.3em] text-black/60">Subject Identification: Core</span> |
| 93 | + </motion.div> |
| 94 | + |
| 95 | + <motion.h1 |
| 96 | + initial={{ opacity: 0 }} |
| 97 | + animate={{ opacity: 1 }} |
| 98 | + transition={{ delay: 0.2, duration: 1 }} |
| 99 | + className="font-playfairDisplay text-7xl md:text-9xl lg:text-[10rem] text-[#1A1A1A] leading-[0.8] mb-12 tracking-tighter" |
| 100 | + > |
| 101 | + {title.split(' ').map((word, i) => ( |
| 102 | + <span key={i} className={i % 2 === 1 ? "italic text-black/40 block" : "block"}> |
| 103 | + {word} |
| 104 | + </span> |
| 105 | + ))} |
| 106 | + </motion.h1> |
| 107 | + |
| 108 | + <div className="flex justify-center gap-12 text-[10px] font-outfit uppercase tracking-[0.4em] text-black/30"> |
| 109 | + <span className="flex items-center gap-2"><Feather size={14} /> Engineer</span> |
| 110 | + <span className="flex items-center gap-2"><Sparkle size={14} /> Creator</span> |
| 111 | + <span className="flex items-center gap-2"><Compass size={14} /> Explorer</span> |
| 112 | + </div> |
| 113 | + </header> |
| 114 | + |
| 115 | + <div className="grid grid-cols-1 lg:grid-cols-12 gap-16 md:gap-32"> |
| 116 | + |
| 117 | + {/* Content Column */} |
| 118 | + <div className="lg:col-span-7"> |
| 119 | + <article className="prose prose-stone prose-lg max-w-none |
| 120 | + prose-headings:font-playfairDisplay prose-headings:font-normal prose-headings:text-[#1A1A1A] |
| 121 | + prose-p:font-outfit prose-p:text-[#1A1A1A]/80 prose-p:leading-relaxed prose-p:mb-10 |
| 122 | + prose-strong:font-medium prose-strong:text-[#1A1A1A] |
| 123 | + prose-blockquote:border-l-[#8D4004] prose-blockquote:bg-white/40 prose-blockquote:backdrop-blur-sm prose-blockquote:py-8 prose-blockquote:px-10 prose-blockquote:not-italic prose-blockquote:font-playfairDisplay prose-blockquote:text-2xl prose-blockquote:italic |
| 124 | + prose-li:font-outfit prose-li:text-[#1A1A1A]/80 |
| 125 | + "> |
| 126 | + <ReactMarkdown |
| 127 | + remarkPlugins={[remarkGfm]} |
| 128 | + rehypePlugins={[rehypeRaw]} |
| 129 | + components={{ a: LuxeLinkRenderer }} |
| 130 | + > |
| 131 | + {content} |
| 132 | + </ReactMarkdown> |
| 133 | + </article> |
| 134 | + </div> |
| 135 | + |
| 136 | + {/* Sidebar Column */} |
| 137 | + <div className="lg:col-span-5"> |
| 138 | + <aside className="sticky top-32 space-y-16"> |
| 139 | + |
| 140 | + {/* Portrait Card */} |
| 141 | + <div className="relative aspect-[4/5] bg-white rounded-sm overflow-hidden border border-black/5 shadow-2xl p-4 group"> |
| 142 | + <div className="absolute inset-0 bg-[#EBEBEB] opacity-50 group-hover:opacity-30 transition-opacity duration-1000" /> |
| 143 | + <LuxeArt seed="Portrait" className="w-full h-full object-cover mix-blend-multiply opacity-80" /> |
| 144 | + <div className="absolute bottom-8 left-8 right-8"> |
| 145 | + <span className="font-outfit text-[9px] uppercase tracking-[0.5em] text-black/40 mb-2 block">Archive Specimen</span> |
| 146 | + <h3 className="font-playfairDisplay text-3xl italic text-black">A. S. Bulbul</h3> |
| 147 | + </div> |
| 148 | + </div> |
| 149 | + |
| 150 | + {/* Status Info */} |
| 151 | + <div className="space-y-8 p-10 border border-black/5 bg-white/40 backdrop-blur-md rounded-sm"> |
| 152 | + <h4 className="font-outfit text-[10px] uppercase tracking-[0.3em] text-black/30 border-b border-black/5 pb-4 mb-8">System Metrics</h4> |
| 153 | + |
| 154 | + <div className="space-y-6"> |
| 155 | + <div className="flex justify-between items-end"> |
| 156 | + <span className="font-outfit text-xs text-black/40 uppercase tracking-widest">Protocol</span> |
| 157 | + <span className="font-playfairDisplay text-xl italic">Luxe_Interface_v1</span> |
| 158 | + </div> |
| 159 | + <div className="flex justify-between items-end"> |
| 160 | + <span className="font-outfit text-xs text-black/40 uppercase tracking-widest">Integrity</span> |
| 161 | + <span className="font-playfairDisplay text-xl italic text-emerald-700">Verified</span> |
| 162 | + </div> |
| 163 | + <div className="flex justify-between items-end"> |
| 164 | + <span className="font-outfit text-xs text-black/40 uppercase tracking-widest">Origin</span> |
| 165 | + <span className="font-playfairDisplay text-xl italic">Digital_Expanse</span> |
| 166 | + </div> |
| 167 | + </div> |
| 168 | + </div> |
| 169 | + |
| 170 | + {/* Footer-ish quote */} |
| 171 | + <div className="pt-8 border-t border-black/5"> |
| 172 | + <p className="font-outfit text-[10px] uppercase tracking-[0.2em] leading-relaxed text-black/30 text-center italic"> |
| 173 | + "Every line of code is a brushstroke on the canvas of reality." |
| 174 | + </p> |
| 175 | + </div> |
| 176 | + |
| 177 | + </aside> |
| 178 | + </div> |
| 179 | + |
| 180 | + </div> |
| 181 | + |
| 182 | + <footer className="mt-48 pt-12 border-t border-black/10 flex flex-col md:flex-row justify-between items-center gap-8 font-outfit text-[10px] uppercase tracking-[0.3em] text-black/30"> |
| 183 | + <div className="flex items-center gap-4"> |
| 184 | + <span className="w-2 h-2 rounded-full bg-emerald-500 animate-pulse" /> |
| 185 | + <span>Synchronized with Mainframe</span> |
| 186 | + </div> |
| 187 | + <div className="text-right flex flex-col gap-2"> |
| 188 | + <span>Access Timestamp: {new Date().toLocaleDateString('en-US', { month: 'long', day: 'numeric', year: 'numeric' })}</span> |
| 189 | + <span className="text-black font-medium tracking-[0.5em]">FEZCODEX_PRIME</span> |
| 190 | + </div> |
| 191 | + </footer> |
| 192 | + |
| 193 | + </div> |
| 194 | + </div> |
| 195 | + ); |
| 196 | +}; |
| 197 | + |
| 198 | +export default LuxeAboutView; |
0 commit comments