feat: complete editorial overhaul with CMS dynamic labels
Centralized UI labels in Directus, integrated AI Chat and Status into Bento grid, created standalone Books page, and redesigned project sub-pages for consistent high-end aesthetic.
This commit is contained in:
@@ -1,17 +1,34 @@
|
||||
"use client";
|
||||
|
||||
import { motion } from "framer-motion";
|
||||
import { ArrowDown, Github, Linkedin, Mail, Code, Zap, Globe } from "lucide-react";
|
||||
import { ArrowDown, Github, Linkedin, Mail, Code, Zap } from "lucide-react";
|
||||
import { useLocale, useTranslations } from "next-intl";
|
||||
import Image from "next/image";
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
const Hero = () => {
|
||||
const locale = useLocale();
|
||||
const t = useTranslations("home.hero");
|
||||
const [cmsMessages, setCmsMessages] = useState<Record<string, string>>({});
|
||||
|
||||
useEffect(() => {
|
||||
(async () => {
|
||||
try {
|
||||
const res = await fetch(`/api/messages?locale=${locale}`);
|
||||
if (res.ok) {
|
||||
const data = await res.json();
|
||||
setCmsMessages(data.messages || {});
|
||||
}
|
||||
} catch {}
|
||||
})();
|
||||
}, [locale]);
|
||||
|
||||
// Helper to get CMS text or fallback
|
||||
const getLabel = (key: string, fallback: string) => cmsMessages[key] || fallback;
|
||||
|
||||
return (
|
||||
<section className="relative min-h-screen flex flex-col items-center justify-center overflow-hidden bg-stone-50 dark:bg-stone-950 px-6 transition-colors duration-500">
|
||||
{/* Background Decor */}
|
||||
{/* Liquid Ambient Background */}
|
||||
<div className="absolute inset-0 pointer-events-none">
|
||||
<motion.div
|
||||
animate={{ scale: [1, 1.1, 1], opacity: [0.15, 0.25, 0.15] }}
|
||||
@@ -29,33 +46,33 @@ const Hero = () => {
|
||||
<div className="flex flex-col lg:flex-row items-center gap-12 lg:gap-24">
|
||||
|
||||
{/* Left: Text Content */}
|
||||
<div className="flex-1 text-center lg:text-left space-y-8">
|
||||
<div className="flex-1 text-center lg:text-left space-y-10">
|
||||
<motion.div
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ duration: 0.5 }}
|
||||
className="inline-flex items-center gap-3 px-4 py-2 rounded-full bg-white dark:bg-stone-900 border border-stone-200 dark:border-stone-800 shadow-sm"
|
||||
className="inline-flex items-center gap-3 px-5 py-2.5 rounded-full bg-white dark:bg-stone-900 border border-stone-200 dark:border-stone-800 shadow-sm"
|
||||
>
|
||||
<span className="w-2 h-2 bg-green-500 rounded-full animate-pulse" />
|
||||
<span className="font-mono text-[10px] font-bold uppercase tracking-[0.2em] text-stone-500">Student & Self-Hoster</span>
|
||||
<span className="w-2.5 h-2.5 bg-green-500 rounded-full animate-pulse" />
|
||||
<span className="font-mono text-[10px] font-black uppercase tracking-[0.3em] text-stone-500">{getLabel("hero.badge", "Student & Self-Hoster")}</span>
|
||||
</motion.div>
|
||||
|
||||
<h1 className="text-5xl md:text-8xl font-black tracking-tighter leading-[0.85] text-stone-900 dark:text-stone-50">
|
||||
<h1 className="text-6xl md:text-[9.5rem] font-black tracking-tighter leading-[0.8] text-stone-900 dark:text-stone-50 uppercase">
|
||||
<motion.span
|
||||
initial={{ opacity: 0, x: -50 }}
|
||||
animate={{ opacity: 1, x: 0 }}
|
||||
transition={{ duration: 0.8, delay: 0.1 }}
|
||||
className="block"
|
||||
>
|
||||
Building Stuff.
|
||||
{getLabel("hero.line1", "Building")}
|
||||
</motion.span>
|
||||
<motion.span
|
||||
initial={{ opacity: 0, x: -50 }}
|
||||
animate={{ opacity: 1, x: 0 }}
|
||||
transition={{ duration: 0.8, delay: 0.2 }}
|
||||
className="block text-transparent bg-clip-text bg-gradient-to-r from-liquid-mint via-liquid-sky to-liquid-purple"
|
||||
className="block text-transparent bg-clip-text bg-gradient-to-r from-liquid-mint via-liquid-sky to-liquid-purple pb-4"
|
||||
>
|
||||
Running Servers.
|
||||
{getLabel("hero.line2", "Stuff.")}
|
||||
</motion.span>
|
||||
</h1>
|
||||
|
||||
@@ -63,7 +80,7 @@ const Hero = () => {
|
||||
initial={{ opacity: 0 }}
|
||||
animate={{ opacity: 1 }}
|
||||
transition={{ duration: 1, delay: 0.4 }}
|
||||
className="text-lg md:text-xl text-stone-600 dark:text-stone-400 max-w-xl mx-auto lg:mx-0 font-light leading-relaxed"
|
||||
className="text-xl md:text-2xl text-stone-600 dark:text-stone-400 max-w-xl mx-auto lg:mx-0 font-light leading-relaxed tracking-tight"
|
||||
>
|
||||
{t("description")}
|
||||
</motion.p>
|
||||
@@ -72,10 +89,11 @@ const Hero = () => {
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ duration: 0.6, delay: 0.6 }}
|
||||
className="flex flex-col sm:flex-row items-center gap-6 justify-center lg:justify-start pt-4"
|
||||
className="flex flex-col sm:flex-row items-center gap-8 justify-center lg:justify-start pt-4"
|
||||
>
|
||||
<a href="#projects" className="px-10 py-4 bg-stone-900 dark:bg-stone-50 text-white dark:text-stone-900 rounded-2xl font-black text-sm tracking-widest hover:scale-105 active:scale-95 transition-all shadow-xl">
|
||||
{t("ctaWork").toUpperCase()}
|
||||
<a href="#projects" className="group relative px-12 py-5 bg-stone-900 dark:bg-stone-50 text-white dark:text-stone-900 rounded-3xl font-black text-xs uppercase tracking-[0.2em] hover:scale-105 active:scale-95 transition-all shadow-2xl">
|
||||
<div className="absolute inset-0 bg-white/10 -translate-x-full group-hover:translate-x-full transition-transform duration-1000" />
|
||||
{t("ctaWork")}
|
||||
</a>
|
||||
<div className="flex gap-4">
|
||||
{[
|
||||
@@ -83,48 +101,40 @@ const Hero = () => {
|
||||
{ icon: Linkedin, href: "https://linkedin.com/in/dkonkol" },
|
||||
{ icon: Mail, href: "mailto:contact@dk0.dev" }
|
||||
].map((social, i) => (
|
||||
<a key={i} href={social.href} className="p-4 bg-white dark:bg-stone-900 border border-stone-200 dark:border-stone-800 rounded-2xl text-stone-400 hover:text-stone-900 dark:hover:text-stone-100 transition-all shadow-sm">
|
||||
<social.icon size={20} />
|
||||
<a key={i} href={social.href} target="_blank" rel="noopener noreferrer" className="p-5 bg-white dark:bg-stone-900 border border-stone-200 dark:border-stone-800 rounded-[1.5rem] text-stone-400 hover:text-stone-900 dark:hover:text-white transition-all shadow-sm hover:shadow-xl">
|
||||
<social.icon size={22} />
|
||||
</a>
|
||||
))}
|
||||
</div>
|
||||
</motion.div>
|
||||
</div>
|
||||
|
||||
{/* Right: The Photo (Visible Immediately) */}
|
||||
{/* Right: The Photo */}
|
||||
<motion.div
|
||||
initial={{ opacity: 0, scale: 0.8, rotate: 5 }}
|
||||
animate={{ opacity: 1, scale: 1, rotate: 0 }}
|
||||
transition={{ duration: 1, ease: [0.25, 0.1, 0.25, 1] }}
|
||||
className="relative w-72 h-72 md:w-[450px] md:h-[450px] shrink-0"
|
||||
className="relative w-72 h-72 md:w-[500px] md:h-[500px] shrink-0 mt-12 lg:mt-0"
|
||||
>
|
||||
<div className="absolute inset-0 bg-gradient-to-tr from-liquid-mint to-liquid-purple rounded-[4rem] rotate-6 scale-95 opacity-20 blur-2xl animate-pulse" />
|
||||
<div className="relative w-full h-full rounded-[3.5rem] overflow-hidden border-[12px] border-white dark:border-stone-900 shadow-[0_40px_80px_-15px_rgba(0,0,0,0.3)]">
|
||||
<Image
|
||||
src="/images/me.jpg"
|
||||
alt="Dennis Konkol"
|
||||
fill
|
||||
className="object-cover"
|
||||
priority
|
||||
/>
|
||||
<div className="absolute inset-0 bg-gradient-to-tr from-liquid-mint to-liquid-purple rounded-[5rem] rotate-12 scale-90 opacity-20 blur-3xl animate-pulse" />
|
||||
<div className="relative w-full h-full rounded-[4rem] overflow-hidden border-[16px] border-white dark:border-stone-900 shadow-[0_50px_100px_-20px_rgba(0,0,0,0.4)]">
|
||||
<Image src="/images/me.jpg" alt="Dennis Konkol" fill className="object-cover" priority />
|
||||
</div>
|
||||
|
||||
{/* Minimal Badge */}
|
||||
<div className="absolute -bottom-4 -left-4 bg-white dark:bg-stone-800 px-6 py-3 rounded-2xl shadow-2xl border border-stone-100 dark:border-stone-700">
|
||||
<span className="font-mono text-xs font-black tracking-tighter">dk<span className="text-red-500">0</span>.dev</span>
|
||||
<div className="absolute -bottom-6 -left-6 bg-white dark:bg-stone-800 px-8 py-4 rounded-[2rem] shadow-2xl border border-stone-100 dark:border-stone-700">
|
||||
<span className="font-mono text-sm font-black tracking-tighter uppercase">dk<span className="text-red-500">0</span>.dev</span>
|
||||
</div>
|
||||
</motion.div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Scroll Down */}
|
||||
<motion.div
|
||||
animate={{ y: [0, 10, 0] }}
|
||||
animate={{ y: [0, 15, 0] }}
|
||||
transition={{ duration: 2, repeat: Infinity }}
|
||||
className="absolute bottom-10 left-1/2 -translate-x-1/2 hidden md:block"
|
||||
className="absolute bottom-10 left-1/2 -translate-x-1/2 hidden md:flex flex-col items-center gap-4"
|
||||
>
|
||||
<ArrowDown size={20} className="text-stone-300" />
|
||||
<div className="w-px h-16 bg-gradient-to-b from-stone-300 dark:from-stone-700 to-transparent" />
|
||||
</motion.div>
|
||||
</section>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user