Compare commits
3 Commits
dev
...
aee811309b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aee811309b | ||
|
|
48a29cd872 | ||
|
|
c95fc3101b |
@@ -3,7 +3,7 @@ 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 revalidate = 300;
|
export const dynamic = 'force-dynamic';
|
||||||
|
|
||||||
const CACHE_TTL = 300; // 5 minutes
|
const CACHE_TTL = 300; // 5 minutes
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,9 @@ import { getContentByKey } from "@/lib/content";
|
|||||||
import { getContentPage } from "@/lib/directus";
|
import { getContentPage } from "@/lib/directus";
|
||||||
import { richTextToSafeHtml } from "@/lib/richtext";
|
import { richTextToSafeHtml } from "@/lib/richtext";
|
||||||
|
|
||||||
|
export const runtime = 'nodejs';
|
||||||
|
export const dynamic = 'force-dynamic';
|
||||||
|
|
||||||
const CACHE_TTL = 300; // 5 minutes
|
const CACHE_TTL = 300; // 5 minutes
|
||||||
|
|
||||||
export async function GET(request: NextRequest) {
|
export async function GET(request: NextRequest) {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { useState, useEffect } from "react";
|
import { useState, useEffect, useRef } from "react";
|
||||||
import { SiGithub, SiLinkedin } from "react-icons/si";
|
import { SiGithub, SiLinkedin } from "react-icons/si";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { usePathname, useSearchParams } from "next/navigation";
|
import { usePathname, useSearchParams } from "next/navigation";
|
||||||
@@ -27,6 +27,14 @@ export default function HeaderClient({ locale, translations }: HeaderClientProps
|
|||||||
const [scrolled, setScrolled] = useState(false);
|
const [scrolled, setScrolled] = useState(false);
|
||||||
const pathname = usePathname();
|
const pathname = usePathname();
|
||||||
const searchParams = useSearchParams();
|
const searchParams = useSearchParams();
|
||||||
|
const prevLocale = useRef(locale);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (prevLocale.current !== locale) {
|
||||||
|
window.scrollTo({ top: 0, behavior: "instant" });
|
||||||
|
prevLocale.current = locale;
|
||||||
|
}
|
||||||
|
}, [locale]);
|
||||||
|
|
||||||
const isHome = pathname === `/${locale}` || pathname === `/${locale}/`;
|
const isHome = pathname === `/${locale}` || pathname === `/${locale}/`;
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ interface HeroProps {
|
|||||||
locale: string;
|
locale: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default async function Hero({ locale: _locale }: HeroProps) {
|
export default async function Hero({ locale }: HeroProps) {
|
||||||
const t = await getTranslations("home.hero");
|
const t = await getTranslations({ locale, namespace: "home.hero" });
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section className="relative min-h-screen flex flex-col items-center justify-center bg-stone-50 dark:bg-stone-950 px-6 transition-colors duration-500">
|
<section className="relative min-h-screen flex flex-col items-center justify-center bg-stone-50 dark:bg-stone-950 px-6 transition-colors duration-500">
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
"f2": "Docker Swarm & CI/CD",
|
"f2": "Docker Swarm & CI/CD",
|
||||||
"f3": "Self-Hosted Infrastruktur"
|
"f3": "Self-Hosted Infrastruktur"
|
||||||
},
|
},
|
||||||
"description": "Ich bin Dennis – Student aus Osnabrück und leidenschaftlicher Self-Hoster. Ich entwickle Full-Stack Apps und sorge am liebsten selbst dafür, dass sie auf meiner eigenen Infrastruktur perfekt laufen.",
|
"description": "Ich bin Dennis, Student aus Osnabrück und leidenschaftlicher Selfhoster. Ich entwickle Fullstack Apps und sorge am liebsten selbst dafür, dass sie auf meiner eigenen Infrastruktur perfekt laufen.",
|
||||||
"ctaWork": "Meine Projekte",
|
"ctaWork": "Meine Projekte",
|
||||||
"ctaContact": "Kontakt"
|
"ctaContact": "Kontakt"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
"f2": "Docker Swarm & CI/CD",
|
"f2": "Docker Swarm & CI/CD",
|
||||||
"f3": "Self-Hosted Infrastructure"
|
"f3": "Self-Hosted Infrastructure"
|
||||||
},
|
},
|
||||||
"description": "I'm Dennis – a student from Germany and a passionate self-hoster. I build full-stack applications and love the challenge of managing the infrastructure they run on.",
|
"description": "I'm Dennis, a student from Germany and a passionate selfhoster. I build fullstack applications and love the challenge of managing the infrastructure they run on.",
|
||||||
"ctaWork": "View Projects",
|
"ctaWork": "View Projects",
|
||||||
"ctaContact": "Get in touch"
|
"ctaContact": "Get in touch"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user