diff --git a/src/app/loading.tsx b/src/app/loading.tsx
new file mode 100644
index 0000000..170fdb5
--- /dev/null
+++ b/src/app/loading.tsx
@@ -0,0 +1,44 @@
+"use client";
+
+import { useEffect, useState } from "react";
+
+const SHOW_DELAY_MS = 140;
+
+export default function AppLoading() {
+ const [isVisible, setIsVisible] = useState(false);
+
+ useEffect(() => {
+ const timeoutId = window.setTimeout(() => {
+ setIsVisible(true);
+ }, SHOW_DELAY_MS);
+
+ return () => window.clearTimeout(timeoutId);
+ }, []);
+
+ return (
+
+
+
+
+ StripStream
+
+
Chargement de votre bibliotheque...
+
+
+
+
+
+
+
+
+
+
+
+ );
+}
diff --git a/src/components/home/HomeContent.tsx b/src/components/home/HomeContent.tsx
index 8670512..e2ce7b2 100644
--- a/src/components/home/HomeContent.tsx
+++ b/src/components/home/HomeContent.tsx
@@ -31,13 +31,12 @@ export function HomeContent({ data }: HomeContentProps) {
return (
{data.ongoingBooks && data.ongoingBooks.length > 0 && (
-
-
-
+
)}
{data.ongoing && data.ongoing.length > 0 && (
diff --git a/src/components/home/MediaRow.tsx b/src/components/home/MediaRow.tsx
index 99b7a7a..4f13863 100644
--- a/src/components/home/MediaRow.tsx
+++ b/src/components/home/MediaRow.tsx
@@ -41,6 +41,7 @@ interface MediaRowProps {
titleKey: string;
items: (OptimizedSeries | OptimizedBook)[];
iconName?: string;
+ featuredHeader?: boolean;
}
const iconMap = {
@@ -51,7 +52,7 @@ const iconMap = {
History,
};
-export function MediaRow({ titleKey, items, iconName }: MediaRowProps) {
+export function MediaRow({ titleKey, items, iconName, featuredHeader = false }: MediaRowProps) {
const router = useRouter();
const { t } = useTranslate();
const icon = iconName ? iconMap[iconName as keyof typeof iconMap] : undefined;
@@ -68,7 +69,13 @@ export function MediaRow({ titleKey, items, iconName }: MediaRowProps) {
title={t(titleKey)}
icon={icon}
className="space-y-5"
- headerClassName="border-b border-border/50 pb-2"
+ headerClassName={cn("border-b border-border/50 pb-2", featuredHeader && "border-primary/25")}
+ titleClassName={
+ featuredHeader
+ ? "bg-gradient-to-r from-primary via-cyan-500 to-fuchsia-500 bg-clip-text text-transparent"
+ : undefined
+ }
+ iconClassName={featuredHeader ? "text-primary" : undefined}
>
{
description?: string;
actions?: React.ReactNode;
headerClassName?: string;
+ titleClassName?: string;
+ iconClassName?: string;
}
const Section = React.forwardRef(
(
- { title, icon: Icon, description, actions, children, className, headerClassName, ...props },
+ {
+ title,
+ icon: Icon,
+ description,
+ actions,
+ children,
+ className,
+ headerClassName,
+ titleClassName,
+ iconClassName,
+ ...props
+ },
ref
) => {
return (
@@ -21,9 +34,9 @@ const Section = React.forwardRef(
{title && (
- {Icon &&
}
+ {Icon &&
}
-
{title}
+
{title}
{description && (
{description}
)}
diff --git a/src/styles/globals.css b/src/styles/globals.css
index 9b58e53..800f674 100644
--- a/src/styles/globals.css
+++ b/src/styles/globals.css
@@ -164,4 +164,17 @@ body.no-pinch-zoom * {
.animate-fade-in {
animation: fade-in 0.3s ease-in forwards;
}
+
+ @keyframes loader-slide {
+ 0% {
+ transform: translateX(-120%);
+ }
+ 100% {
+ transform: translateX(320%);
+ }
+ }
+
+ .animate-loader-slide {
+ animation: loader-slide 1.25s ease-in-out infinite;
+ }
}