feat: improve book reviews, restore detailed privacy policy, fix header logo, add theme toggle, integrate boneyard-js
- Book reviews: add line-clamp for longer review text with expand/collapse per review - Privacy policy: restore full detailed DSGVO-compliant fallback content - Header (legal pages): change logo from 'dk' to 'dk0' in circle - Header (main page): add ThemeToggle for dark/light mode switching - Skeleton loading: integrate boneyard-js for ReadBooks, CurrentlyReading, Projects - Add boneyard.config.json and bones/registry.ts placeholder
This commit is contained in:
@@ -5,7 +5,7 @@ import { BookOpen } from "lucide-react";
|
||||
import { useEffect, useState } from "react";
|
||||
import { useTranslations } from "next-intl";
|
||||
import Image from "next/image";
|
||||
import { Skeleton } from "./ui/Skeleton";
|
||||
import { Skeleton } from "boneyard-js/react";
|
||||
|
||||
interface CurrentlyReading {
|
||||
title: string;
|
||||
@@ -55,31 +55,14 @@ const CurrentlyReading = () => {
|
||||
fetchCurrentlyReading();
|
||||
}, []); // Leeres Array = nur einmal beim Mount
|
||||
|
||||
if (loading) {
|
||||
return (
|
||||
<div className="space-y-4">
|
||||
<div className="flex flex-col sm:flex-row gap-4 items-start">
|
||||
<Skeleton className="w-24 h-36 sm:w-28 sm:h-40 rounded-lg shrink-0" />
|
||||
<div className="flex-1 space-y-3 w-full">
|
||||
<Skeleton className="h-6 w-3/4" />
|
||||
<Skeleton className="h-4 w-1/2" />
|
||||
<div className="space-y-2 pt-4">
|
||||
<Skeleton className="h-2 w-full" />
|
||||
<Skeleton className="h-2 w-full" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
// Zeige nichts wenn kein Buch gelesen wird oder noch geladen wird
|
||||
if (books.length === 0) {
|
||||
// Zeige nichts wenn kein Buch gelesen wird
|
||||
if (books.length === 0 && !loading) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="space-y-4">
|
||||
<Skeleton name="currently-reading" loading={loading} animate="shimmer" transition>
|
||||
<div className="space-y-4">
|
||||
{/* Header */}
|
||||
<div className="flex items-center gap-2 mb-4">
|
||||
<BookOpen size={18} className="text-stone-600 dark:text-stone-300 flex-shrink-0" />
|
||||
@@ -170,8 +153,9 @@ const CurrentlyReading = () => {
|
||||
</div>
|
||||
</div>
|
||||
</motion.div>
|
||||
))}
|
||||
))}
|
||||
</div>
|
||||
</Skeleton>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user