Compare commits
24 Commits
32e621df14
...
9a55dc7f81
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9a55dc7f81 | ||
|
|
3ac7c7a5b3 | ||
|
|
96d7ae5747 | ||
|
|
f7b7eaeaff | ||
|
|
9c7e564f6f | ||
|
|
3e83dcfa15 | ||
|
|
b0ec4fd4b7 | ||
|
|
e0e0551a83 | ||
|
|
97c600df14 | ||
|
|
6c47cdbd83 | ||
|
|
bd6007f299 | ||
|
|
689cfa18cf | ||
|
|
4029cd660d | ||
|
|
b754af20e6 | ||
|
|
3f31d6f5bb | ||
|
|
8eff9106f5 | ||
|
|
af30449071 | ||
|
|
98c3ebb96c | ||
|
|
9e2040cefc | ||
|
|
719071345e | ||
|
|
efafd38b1a | ||
|
|
5c70b26508 | ||
|
|
ede591c89e | ||
|
|
2defd7a4a9 |
@@ -3,7 +3,9 @@ import { getBookReviews } from '@/lib/directus';
|
|||||||
import { checkRateLimit, getClientIp } from '@/lib/auth';
|
import { checkRateLimit, getClientIp } from '@/lib/auth';
|
||||||
|
|
||||||
export const runtime = 'nodejs';
|
export const runtime = 'nodejs';
|
||||||
export const dynamic = 'force-dynamic';
|
export const revalidate = 300;
|
||||||
|
|
||||||
|
const CACHE_TTL = 300; // 5 minutes
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GET /api/book-reviews
|
* GET /api/book-reviews
|
||||||
@@ -31,25 +33,23 @@ export async function GET(request: NextRequest) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (reviews && reviews.length > 0) {
|
if (reviews && reviews.length > 0) {
|
||||||
return NextResponse.json({
|
return NextResponse.json(
|
||||||
bookReviews: reviews,
|
{ bookReviews: reviews, source: 'directus' },
|
||||||
source: 'directus'
|
{ headers: { 'Cache-Control': `public, s-maxage=${CACHE_TTL}, stale-while-revalidate=${CACHE_TTL * 2}` } }
|
||||||
});
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return NextResponse.json({
|
return NextResponse.json(
|
||||||
bookReviews: null,
|
{ bookReviews: null, source: 'fallback' },
|
||||||
source: 'fallback'
|
{ headers: { 'Cache-Control': `public, s-maxage=${CACHE_TTL}, stale-while-revalidate=${CACHE_TTL * 2}` } }
|
||||||
});
|
);
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error loading book reviews:', error);
|
if (process.env.NODE_ENV === 'development') {
|
||||||
|
console.error('Error loading book reviews:', error);
|
||||||
|
}
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{
|
{ bookReviews: null, error: 'Failed to load book reviews', source: 'error' },
|
||||||
bookReviews: null,
|
|
||||||
error: 'Failed to load book reviews',
|
|
||||||
source: 'error'
|
|
||||||
},
|
|
||||||
{ status: 500 }
|
{ status: 500 }
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ import { NextRequest, NextResponse } from "next/server";
|
|||||||
import { getContentByKey } from "@/lib/content";
|
import { getContentByKey } from "@/lib/content";
|
||||||
import { getContentPage } from "@/lib/directus";
|
import { getContentPage } from "@/lib/directus";
|
||||||
|
|
||||||
|
const CACHE_TTL = 300; // 5 minutes
|
||||||
|
|
||||||
export async function GET(request: NextRequest) {
|
export async function GET(request: NextRequest) {
|
||||||
const { searchParams } = new URL(request.url);
|
const { searchParams } = new URL(request.url);
|
||||||
const key = searchParams.get("key");
|
const key = searchParams.get("key");
|
||||||
@@ -15,21 +17,32 @@ export async function GET(request: NextRequest) {
|
|||||||
// 1) Try Directus first
|
// 1) Try Directus first
|
||||||
const directusPage = await getContentPage(key, locale);
|
const directusPage = await getContentPage(key, locale);
|
||||||
if (directusPage) {
|
if (directusPage) {
|
||||||
return NextResponse.json({
|
return NextResponse.json(
|
||||||
content: {
|
{
|
||||||
title: directusPage.title,
|
content: {
|
||||||
slug: directusPage.slug,
|
title: directusPage.title,
|
||||||
locale: directusPage.locale || locale,
|
slug: directusPage.slug,
|
||||||
content: directusPage.content,
|
locale: directusPage.locale || locale,
|
||||||
|
content: directusPage.content,
|
||||||
|
},
|
||||||
|
source: "directus",
|
||||||
},
|
},
|
||||||
source: "directus",
|
{ headers: { "Cache-Control": `public, s-maxage=${CACHE_TTL}, stale-while-revalidate=${CACHE_TTL * 2}` } }
|
||||||
});
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2) Fallback: PostgreSQL
|
// 2) Fallback: PostgreSQL
|
||||||
const translation = await getContentByKey({ key, locale });
|
const translation = await getContentByKey({ key, locale });
|
||||||
if (!translation) return NextResponse.json({ content: null });
|
if (!translation) {
|
||||||
return NextResponse.json({ content: translation, source: "postgresql" });
|
return NextResponse.json(
|
||||||
|
{ content: null },
|
||||||
|
{ headers: { "Cache-Control": `public, s-maxage=${CACHE_TTL}, stale-while-revalidate=${CACHE_TTL * 2}` } }
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return NextResponse.json(
|
||||||
|
{ content: translation, source: "postgresql" },
|
||||||
|
{ headers: { "Cache-Control": `public, s-maxage=${CACHE_TTL}, stale-while-revalidate=${CACHE_TTL * 2}` } }
|
||||||
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// If DB isn't migrated/available, fail soft so the UI can fall back to next-intl strings.
|
// If DB isn't migrated/available, fail soft so the UI can fall back to next-intl strings.
|
||||||
if (process.env.NODE_ENV === "development") {
|
if (process.env.NODE_ENV === "development") {
|
||||||
|
|||||||
@@ -3,7 +3,9 @@ import { getHobbies } from '@/lib/directus';
|
|||||||
import { checkRateLimit, getClientIp } from '@/lib/auth';
|
import { checkRateLimit, getClientIp } from '@/lib/auth';
|
||||||
|
|
||||||
export const runtime = 'nodejs';
|
export const runtime = 'nodejs';
|
||||||
export const dynamic = 'force-dynamic';
|
export const revalidate = 300;
|
||||||
|
|
||||||
|
const CACHE_TTL = 300; // 5 minutes
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GET /api/hobbies
|
* GET /api/hobbies
|
||||||
@@ -28,26 +30,24 @@ export async function GET(request: NextRequest) {
|
|||||||
const hobbies = await getHobbies(locale);
|
const hobbies = await getHobbies(locale);
|
||||||
|
|
||||||
if (hobbies && hobbies.length > 0) {
|
if (hobbies && hobbies.length > 0) {
|
||||||
return NextResponse.json({
|
return NextResponse.json(
|
||||||
hobbies,
|
{ hobbies, source: 'directus' },
|
||||||
source: 'directus'
|
{ headers: { 'Cache-Control': `public, s-maxage=${CACHE_TTL}, stale-while-revalidate=${CACHE_TTL * 2}` } }
|
||||||
});
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fallback: return empty (component will use hardcoded fallback)
|
// Fallback: return empty (component will use hardcoded fallback)
|
||||||
return NextResponse.json({
|
return NextResponse.json(
|
||||||
hobbies: null,
|
{ hobbies: null, source: 'fallback' },
|
||||||
source: 'fallback'
|
{ headers: { 'Cache-Control': `public, s-maxage=${CACHE_TTL}, stale-while-revalidate=${CACHE_TTL * 2}` } }
|
||||||
});
|
);
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error loading hobbies:', error);
|
if (process.env.NODE_ENV === 'development') {
|
||||||
|
console.error('Error loading hobbies:', error);
|
||||||
|
}
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{
|
{ hobbies: null, error: 'Failed to load hobbies', source: 'error' },
|
||||||
hobbies: null,
|
|
||||||
error: 'Failed to load hobbies',
|
|
||||||
source: 'error'
|
|
||||||
},
|
|
||||||
{ status: 500 }
|
{ status: 500 }
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,18 @@
|
|||||||
import { NextRequest, NextResponse } from "next/server";
|
import { NextRequest, NextResponse } from "next/server";
|
||||||
import { getMessages } from "@/lib/directus";
|
import { getMessages } from "@/lib/directus";
|
||||||
|
|
||||||
|
const CACHE_TTL = 300; // 5 minutes
|
||||||
|
|
||||||
export async function GET(request: NextRequest) {
|
export async function GET(request: NextRequest) {
|
||||||
const { searchParams } = new URL(request.url);
|
const { searchParams } = new URL(request.url);
|
||||||
const locale = searchParams.get("locale") || "en";
|
const locale = searchParams.get("locale") || "en";
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const messages = await getMessages(locale);
|
const messages = await getMessages(locale);
|
||||||
return NextResponse.json({ messages });
|
return NextResponse.json(
|
||||||
|
{ messages },
|
||||||
|
{ headers: { "Cache-Control": `public, s-maxage=${CACHE_TTL}, stale-while-revalidate=${CACHE_TTL * 2}` } }
|
||||||
|
);
|
||||||
} catch {
|
} catch {
|
||||||
return NextResponse.json({ messages: {} }, { status: 500 });
|
return NextResponse.json({ messages: {} }, { status: 500 });
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import { NextRequest, NextResponse } from 'next/server';
|
import { NextRequest, NextResponse } from 'next/server';
|
||||||
import { getSnippets } from '@/lib/directus';
|
import { getSnippets } from '@/lib/directus';
|
||||||
|
|
||||||
|
const CACHE_TTL = 300; // 5 minutes
|
||||||
|
|
||||||
export async function GET(request: NextRequest) {
|
export async function GET(request: NextRequest) {
|
||||||
try {
|
try {
|
||||||
const { searchParams } = new URL(request.url);
|
const { searchParams } = new URL(request.url);
|
||||||
@@ -9,9 +11,10 @@ export async function GET(request: NextRequest) {
|
|||||||
|
|
||||||
const snippets = await getSnippets(limit, featured);
|
const snippets = await getSnippets(limit, featured);
|
||||||
|
|
||||||
return NextResponse.json({
|
return NextResponse.json(
|
||||||
snippets: snippets || []
|
{ snippets: snippets || [] },
|
||||||
});
|
{ headers: { 'Cache-Control': `public, s-maxage=${CACHE_TTL}, stale-while-revalidate=${CACHE_TTL * 2}` } }
|
||||||
|
);
|
||||||
} catch (_error) {
|
} catch (_error) {
|
||||||
return NextResponse.json({ error: 'Failed to fetch snippets' }, { status: 500 });
|
return NextResponse.json({ error: 'Failed to fetch snippets' }, { status: 500 });
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,9 @@ import { getTechStack } from '@/lib/directus';
|
|||||||
import { checkRateLimit, getClientIp } from '@/lib/auth';
|
import { checkRateLimit, getClientIp } from '@/lib/auth';
|
||||||
|
|
||||||
export const runtime = 'nodejs';
|
export const runtime = 'nodejs';
|
||||||
export const dynamic = 'force-dynamic';
|
export const revalidate = 300;
|
||||||
|
|
||||||
|
const CACHE_TTL = 300; // 5 minutes
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GET /api/tech-stack
|
* GET /api/tech-stack
|
||||||
@@ -28,26 +30,24 @@ export async function GET(request: NextRequest) {
|
|||||||
const techStack = await getTechStack(locale);
|
const techStack = await getTechStack(locale);
|
||||||
|
|
||||||
if (techStack && techStack.length > 0) {
|
if (techStack && techStack.length > 0) {
|
||||||
return NextResponse.json({
|
return NextResponse.json(
|
||||||
techStack,
|
{ techStack, source: 'directus' },
|
||||||
source: 'directus'
|
{ headers: { 'Cache-Control': `public, s-maxage=${CACHE_TTL}, stale-while-revalidate=${CACHE_TTL * 2}` } }
|
||||||
});
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fallback: return empty (component will use hardcoded fallback)
|
// Fallback: return empty (component will use hardcoded fallback)
|
||||||
return NextResponse.json({
|
return NextResponse.json(
|
||||||
techStack: null,
|
{ techStack: null, source: 'fallback' },
|
||||||
source: 'fallback'
|
{ headers: { 'Cache-Control': `public, s-maxage=${CACHE_TTL}, stale-while-revalidate=${CACHE_TTL * 2}` } }
|
||||||
});
|
);
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error loading tech stack:', error);
|
if (process.env.NODE_ENV === 'development') {
|
||||||
|
console.error('Error loading tech stack:', error);
|
||||||
|
}
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{
|
{ techStack: null, error: 'Failed to load tech stack', source: 'error' },
|
||||||
techStack: null,
|
|
||||||
error: 'Failed to load tech stack',
|
|
||||||
source: 'error'
|
|
||||||
},
|
|
||||||
{ status: 500 }
|
{ status: 500 }
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,12 +34,11 @@ const About = () => {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
try {
|
try {
|
||||||
const [cmsRes, techRes, hobbiesRes, msgRes, booksRes, snippetsRes] = await Promise.all([
|
const [cmsRes, techRes, hobbiesRes, msgRes, snippetsRes] = await Promise.all([
|
||||||
fetch(`/api/content/page?key=home-about&locale=${locale}`),
|
fetch(`/api/content/page?key=home-about&locale=${locale}`),
|
||||||
fetch(`/api/tech-stack?locale=${locale}`),
|
fetch(`/api/tech-stack?locale=${locale}`),
|
||||||
fetch(`/api/hobbies?locale=${locale}`),
|
fetch(`/api/hobbies?locale=${locale}`),
|
||||||
fetch(`/api/messages?locale=${locale}`),
|
fetch(`/api/messages?locale=${locale}`),
|
||||||
fetch(`/api/book-reviews?locale=${locale}`),
|
|
||||||
fetch(`/api/snippets?limit=3&featured=true`)
|
fetch(`/api/snippets?limit=3&featured=true`)
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@@ -57,9 +56,6 @@ const About = () => {
|
|||||||
|
|
||||||
const snippetsData = await snippetsRes.json();
|
const snippetsData = await snippetsRes.json();
|
||||||
if (snippetsData?.snippets) setSnippets(snippetsData.snippets);
|
if (snippetsData?.snippets) setSnippets(snippetsData.snippets);
|
||||||
|
|
||||||
await booksRes.json();
|
|
||||||
// Books data is available but we don't need to track count anymore
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("About data fetch failed:", error);
|
console.error("About data fetch failed:", error);
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import { useEffect, useState } from "react";
|
|||||||
import { motion, AnimatePresence } from "framer-motion";
|
import { motion, AnimatePresence } from "framer-motion";
|
||||||
import { Disc3, Gamepad2, Zap, Quote as QuoteIcon } from "lucide-react";
|
import { Disc3, Gamepad2, Zap, Quote as QuoteIcon } from "lucide-react";
|
||||||
import { useTranslations } from "next-intl";
|
import { useTranslations } from "next-intl";
|
||||||
|
import Image from "next/image";
|
||||||
|
|
||||||
interface CustomActivity {
|
interface CustomActivity {
|
||||||
[key: string]: unknown;
|
[key: string]: unknown;
|
||||||
@@ -172,7 +173,7 @@ export default function ActivityFeed({
|
|||||||
<div className="flex gap-4">
|
<div className="flex gap-4">
|
||||||
{data.gaming.image && (
|
{data.gaming.image && (
|
||||||
<div className="w-12 h-12 rounded-xl overflow-hidden shrink-0 shadow-lg relative">
|
<div className="w-12 h-12 rounded-xl overflow-hidden shrink-0 shadow-lg relative">
|
||||||
<img src={data.gaming.image} alt={data.gaming.name} className="w-full h-full object-cover" />
|
<Image src={data.gaming.image} alt={data.gaming.name} fill className="object-cover" sizes="48px" unoptimized />
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div className="min-w-0 flex flex-col justify-center">
|
<div className="min-w-0 flex flex-col justify-center">
|
||||||
@@ -215,10 +216,12 @@ export default function ActivityFeed({
|
|||||||
</div>
|
</div>
|
||||||
<div className="flex gap-4 relative z-10">
|
<div className="flex gap-4 relative z-10">
|
||||||
<div className="w-16 h-16 rounded-lg overflow-hidden shrink-0 shadow-md relative group-hover:shadow-xl transition-shadow duration-500">
|
<div className="w-16 h-16 rounded-lg overflow-hidden shrink-0 shadow-md relative group-hover:shadow-xl transition-shadow duration-500">
|
||||||
<img
|
<Image
|
||||||
src={data.music.albumArt}
|
src={data.music.albumArt}
|
||||||
alt="Album Art"
|
alt="Album Art"
|
||||||
className="w-full h-full object-cover transition-transform duration-700 group-hover:scale-110"
|
fill
|
||||||
|
className="object-cover transition-transform duration-700 group-hover:scale-110"
|
||||||
|
sizes="64px"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="min-w-0 flex flex-col justify-center">
|
<div className="min-w-0 flex flex-col justify-center">
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ export default function BentoChat() {
|
|||||||
placeholder="Ask me..."
|
placeholder="Ask me..."
|
||||||
className="w-full bg-white dark:bg-stone-800 border border-stone-200 dark:border-stone-700 rounded-2xl py-3 pl-4 pr-12 text-sm focus:outline-none focus:ring-2 focus:ring-liquid-purple/30 transition-all shadow-inner dark:text-white"
|
className="w-full bg-white dark:bg-stone-800 border border-stone-200 dark:border-stone-700 rounded-2xl py-3 pl-4 pr-12 text-sm focus:outline-none focus:ring-2 focus:ring-liquid-purple/30 transition-all shadow-inner dark:text-white"
|
||||||
/>
|
/>
|
||||||
<button onClick={handleSend} className="absolute right-2 top-1/2 -translate-y-1/2 p-2 text-liquid-purple hover:scale-110 transition-transform">
|
<button onClick={handleSend} aria-label="Send message" className="absolute right-2 top-1/2 -translate-y-1/2 p-2 text-liquid-purple hover:scale-110 transition-transform">
|
||||||
<Send size={18} />
|
<Send size={18} />
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ const Contact = () => {
|
|||||||
<div className="bg-white dark:bg-stone-900 rounded-2xl sm:rounded-[2.5rem] md:rounded-[3rem] p-6 sm:p-8 md:p-10 border border-stone-200/60 dark:border-stone-800/60 shadow-sm flex-1 flex flex-col justify-between relative overflow-hidden group">
|
<div className="bg-white dark:bg-stone-900 rounded-2xl sm:rounded-[2.5rem] md:rounded-[3rem] p-6 sm:p-8 md:p-10 border border-stone-200/60 dark:border-stone-800/60 shadow-sm flex-1 flex flex-col justify-between relative overflow-hidden group">
|
||||||
<div className="relative z-10">
|
<div className="relative z-10">
|
||||||
<div className="flex justify-between items-center mb-6 sm:mb-8 md:mb-12">
|
<div className="flex justify-between items-center mb-6 sm:mb-8 md:mb-12">
|
||||||
<h4 className="text-[10px] font-black uppercase tracking-[0.2em] text-stone-400">Connect</h4>
|
<p className="text-[10px] font-black uppercase tracking-[0.2em] text-stone-400">Connect</p>
|
||||||
<div className="flex items-center gap-2 px-3 py-1 bg-emerald-500/10 rounded-full border border-emerald-500/20">
|
<div className="flex items-center gap-2 px-3 py-1 bg-emerald-500/10 rounded-full border border-emerald-500/20">
|
||||||
<span className="w-1.5 h-1.5 rounded-full bg-emerald-500 animate-pulse" />
|
<span className="w-1.5 h-1.5 rounded-full bg-emerald-500 animate-pulse" />
|
||||||
<span className="text-[10px] font-black uppercase tracking-widest text-emerald-600 dark:text-emerald-400">Online</span>
|
<span className="text-[10px] font-black uppercase tracking-widest text-emerald-600 dark:text-emerald-400">Online</span>
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ const Hero = () => {
|
|||||||
>
|
>
|
||||||
<div className="absolute inset-0 bg-gradient-to-tr from-liquid-mint to-liquid-purple rounded-[3rem] sm:rounded-[4rem] lg:rounded-[5rem] rotate-12 scale-90 opacity-20 blur-3xl" />
|
<div className="absolute inset-0 bg-gradient-to-tr from-liquid-mint to-liquid-purple rounded-[3rem] sm:rounded-[4rem] lg:rounded-[5rem] rotate-12 scale-90 opacity-20 blur-3xl" />
|
||||||
<div className="relative w-full h-full rounded-[2.5rem] sm:rounded-[3rem] lg:rounded-[4rem] overflow-hidden border-[12px] sm:border-[16px] lg:border-[24px] border-white dark:border-stone-900 shadow-[0_30px_60px_-15px_rgba(0,0,0,0.3)] sm:shadow-[0_50px_100px_-20px_rgba(0,0,0,0.4)]">
|
<div className="relative w-full h-full rounded-[2.5rem] sm:rounded-[3rem] lg:rounded-[4rem] overflow-hidden border-[12px] sm:border-[16px] lg:border-[24px] border-white dark:border-stone-900 shadow-[0_30px_60px_-15px_rgba(0,0,0,0.3)] sm:shadow-[0_50px_100px_-20px_rgba(0,0,0,0.4)]">
|
||||||
<Image src="/images/me.jpg" alt="Dennis Konkol" fill className="object-cover" priority />
|
<Image src="/images/me.jpg" alt="Dennis Konkol" fill className="object-cover" priority sizes="(max-width: 640px) 208px, (max-width: 768px) 256px, (max-width: 1024px) 320px, 500px" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="absolute -bottom-4 -left-4 sm:-bottom-6 sm:-left-6 bg-white dark:bg-stone-800 px-5 py-3 sm:px-8 sm:py-4 rounded-xl sm:rounded-[2rem] shadow-2xl border border-stone-100 dark:border-stone-700">
|
<div className="absolute -bottom-4 -left-4 sm:-bottom-6 sm:-left-6 bg-white dark:bg-stone-800 px-5 py-3 sm:px-8 sm:py-4 rounded-xl sm:rounded-[2rem] shadow-2xl border border-stone-100 dark:border-stone-700">
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ const ShaderGradientBackground = () => {
|
|||||||
<ShaderGradient
|
<ShaderGradient
|
||||||
control="props"
|
control="props"
|
||||||
type="sphere"
|
type="sphere"
|
||||||
animate="on"
|
animate="off"
|
||||||
brightness={1.3}
|
brightness={1.3}
|
||||||
cAzimuthAngle={180}
|
cAzimuthAngle={180}
|
||||||
cDistance={3.6}
|
cDistance={3.6}
|
||||||
@@ -57,7 +57,7 @@ const ShaderGradientBackground = () => {
|
|||||||
<ShaderGradient
|
<ShaderGradient
|
||||||
control="props"
|
control="props"
|
||||||
type="sphere"
|
type="sphere"
|
||||||
animate="on"
|
animate="off"
|
||||||
brightness={1.25}
|
brightness={1.25}
|
||||||
cAzimuthAngle={180}
|
cAzimuthAngle={180}
|
||||||
cDistance={3.6}
|
cDistance={3.6}
|
||||||
@@ -83,7 +83,7 @@ const ShaderGradientBackground = () => {
|
|||||||
<ShaderGradient
|
<ShaderGradient
|
||||||
control="props"
|
control="props"
|
||||||
type="sphere"
|
type="sphere"
|
||||||
animate="on"
|
animate="off"
|
||||||
brightness={1.2}
|
brightness={1.2}
|
||||||
cAzimuthAngle={180}
|
cAzimuthAngle={180}
|
||||||
cDistance={3.6}
|
cDistance={3.6}
|
||||||
|
|||||||
@@ -2,10 +2,15 @@ import "./globals.css";
|
|||||||
import { Metadata } from "next";
|
import { Metadata } from "next";
|
||||||
import { Inter, Playfair_Display } from "next/font/google";
|
import { Inter, Playfair_Display } from "next/font/google";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
import dynamic from "next/dynamic";
|
||||||
import ClientProviders from "./components/ClientProviders";
|
import ClientProviders from "./components/ClientProviders";
|
||||||
import { cookies } from "next/headers";
|
import { cookies } from "next/headers";
|
||||||
import { getBaseUrl } from "@/lib/seo";
|
import { getBaseUrl } from "@/lib/seo";
|
||||||
import ShaderGradientBackground from "./components/ShaderGradientBackground";
|
|
||||||
|
const ShaderGradientBackground = dynamic(
|
||||||
|
() => import("./components/ShaderGradientBackground"),
|
||||||
|
{ ssr: false, loading: () => null }
|
||||||
|
);
|
||||||
|
|
||||||
const inter = Inter({
|
const inter = Inter({
|
||||||
variable: "--font-inter",
|
variable: "--font-inter",
|
||||||
@@ -32,6 +37,7 @@ export default async function RootLayout({
|
|||||||
<html lang={locale} suppressHydrationWarning>
|
<html lang={locale} suppressHydrationWarning>
|
||||||
<head>
|
<head>
|
||||||
<meta charSet="utf-8" />
|
<meta charSet="utf-8" />
|
||||||
|
<link rel="preconnect" href="https://i.scdn.co" crossOrigin="anonymous" />
|
||||||
</head>
|
</head>
|
||||||
<body className={`${inter.variable} ${playfair.variable}`} suppressHydrationWarning>
|
<body className={`${inter.variable} ${playfair.variable}`} suppressHydrationWarning>
|
||||||
<div className="grain-overlay" aria-hidden="true" />
|
<div className="grain-overlay" aria-hidden="true" />
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ const nextConfig: NextConfig = {
|
|||||||
// Image optimization
|
// Image optimization
|
||||||
images: {
|
images: {
|
||||||
formats: ["image/webp", "image/avif"],
|
formats: ["image/webp", "image/avif"],
|
||||||
minimumCacheTTL: 60,
|
minimumCacheTTL: 2592000,
|
||||||
remotePatterns: [
|
remotePatterns: [
|
||||||
{
|
{
|
||||||
protocol: "https",
|
protocol: "https",
|
||||||
@@ -169,7 +169,35 @@ const nextConfig: NextConfig = {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
source: "/api/(.*)",
|
// Only prevent caching for real-time/sensitive API routes
|
||||||
|
source: "/api/n8n/(.*)",
|
||||||
|
headers: [
|
||||||
|
{
|
||||||
|
key: "Cache-Control",
|
||||||
|
value: "no-store, no-cache, must-revalidate, proxy-revalidate",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: "/api/auth/(.*)",
|
||||||
|
headers: [
|
||||||
|
{
|
||||||
|
key: "Cache-Control",
|
||||||
|
value: "no-store, no-cache, must-revalidate, proxy-revalidate",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: "/api/email/(.*)",
|
||||||
|
headers: [
|
||||||
|
{
|
||||||
|
key: "Cache-Control",
|
||||||
|
value: "no-store, no-cache, must-revalidate, proxy-revalidate",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: "/api/contacts/(.*)",
|
||||||
headers: [
|
headers: [
|
||||||
{
|
{
|
||||||
key: "Cache-Control",
|
key: "Cache-Control",
|
||||||
|
|||||||
@@ -115,5 +115,11 @@
|
|||||||
"tsx": "^4.20.5",
|
"tsx": "^4.20.5",
|
||||||
"typescript": "5.9.3",
|
"typescript": "5.9.3",
|
||||||
"whatwg-fetch": "^3.6.20"
|
"whatwg-fetch": "^3.6.20"
|
||||||
}
|
},
|
||||||
|
"browserslist": [
|
||||||
|
"chrome >= 100",
|
||||||
|
"firefox >= 100",
|
||||||
|
"safari >= 15",
|
||||||
|
"edge >= 100"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user