fix: resolve 'full black' page — unstuck MultiStepLoader overlay, add dark-mode depth
Root cause of the all-black view: the gallery demo hardcoded <MultiStepLoader loading /> (loading=true forever), which renders a fixed inset-0 z-[100] backdrop-blur overlay over the entire viewport. Replace with an interactive demo (button triggers loader, auto-resets after 4s). Also soften flat-black dark backgrounds: - /ui page: dark:bg-black -> dark:bg-zinc-950 + subtle top radial gradient - home hero: dark:bg-black -> dark:bg-zinc-950 + white 6% radial gradient
This commit is contained in:
+1
-1
@@ -19,7 +19,7 @@ const SECTIONS = [
|
|||||||
|
|
||||||
export default function UiGalleryPage() {
|
export default function UiGalleryPage() {
|
||||||
return (
|
return (
|
||||||
<div className="flex w-full flex-col items-center bg-zinc-50 dark:bg-black">
|
<div className="flex w-full flex-col items-center bg-zinc-50 dark:bg-zinc-950 dark:bg-[radial-gradient(ellipse_at_top,rgba(255,255,255,0.04),transparent_55%)]">
|
||||||
<div className="w-full border-b border-zinc-200 bg-white/80 py-10 backdrop-blur-sm dark:border-zinc-800 dark:bg-zinc-950/80">
|
<div className="w-full border-b border-zinc-200 bg-white/80 py-10 backdrop-blur-sm dark:border-zinc-800 dark:bg-zinc-950/80">
|
||||||
<div className="mx-auto flex w-full max-w-6xl flex-col gap-3 px-6">
|
<div className="mx-auto flex w-full max-w-6xl flex-col gap-3 px-6">
|
||||||
<nav className="text-xs font-medium tracking-wide text-zinc-500 dark:text-zinc-400">
|
<nav className="text-xs font-medium tracking-wide text-zinc-500 dark:text-zinc-400">
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import { Spotlight } from "@/components/ui/spotlight";
|
|||||||
|
|
||||||
export function HomeHero() {
|
export function HomeHero() {
|
||||||
return (
|
return (
|
||||||
<div className="relative flex w-full flex-1 flex-col items-center justify-center overflow-hidden bg-zinc-50 antialiased dark:bg-black">
|
<div className="relative flex w-full flex-1 flex-col items-center justify-center overflow-hidden bg-zinc-50 antialiased dark:bg-zinc-950 dark:bg-[radial-gradient(ellipse_at_top,rgba(255,255,255,0.06),transparent_60%)]">
|
||||||
<div className="pointer-events-none absolute inset-0 z-0">
|
<div className="pointer-events-none absolute inset-0 z-0">
|
||||||
<Spotlight className="-top-40 left-0 md:-top-20 md:left-60" fill="white" />
|
<Spotlight className="-top-40 left-0 md:-top-20 md:left-60" fill="white" />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -63,6 +63,33 @@ import { MaskContainer } from "@/components/ui/svg-mask-effect";
|
|||||||
import { GoogleGeminiEffect } from "@/components/ui/google-gemini-effect";
|
import { GoogleGeminiEffect } from "@/components/ui/google-gemini-effect";
|
||||||
import { IconHome, IconUser, IconSettings, IconMoon, IconSun } from "@tabler/icons-react";
|
import { IconHome, IconUser, IconSettings, IconMoon, IconSun } from "@tabler/icons-react";
|
||||||
import { useScroll, useTransform, MotionValue } from "motion/react";
|
import { useScroll, useTransform, MotionValue } from "motion/react";
|
||||||
|
import { useState } from "react";
|
||||||
|
|
||||||
|
function MultiStepLoaderDemo() {
|
||||||
|
const [loading, setLoading] = useState(false);
|
||||||
|
return (
|
||||||
|
<div className="flex flex-col items-center gap-3">
|
||||||
|
<MultiStepLoader
|
||||||
|
loading={loading}
|
||||||
|
loadingStates={[
|
||||||
|
{ text: "Fetching" },
|
||||||
|
{ text: "Compiling" },
|
||||||
|
{ text: "Rendering" },
|
||||||
|
{ text: "Done" },
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
<button
|
||||||
|
onClick={() => {
|
||||||
|
setLoading(true);
|
||||||
|
setTimeout(() => setLoading(false), 4000);
|
||||||
|
}}
|
||||||
|
className="rounded-md border border-zinc-300 px-4 py-2 text-sm font-medium text-zinc-700 transition-colors hover:bg-zinc-100 dark:border-zinc-700 dark:text-zinc-200 dark:hover:bg-zinc-800"
|
||||||
|
>
|
||||||
|
{loading ? "Loading…" : "Run loader"}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
function Card({
|
function Card({
|
||||||
children,
|
children,
|
||||||
@@ -614,15 +641,7 @@ export function ShowcaseGallery() {
|
|||||||
</Tooltip>
|
</Tooltip>
|
||||||
</Card>
|
</Card>
|
||||||
<Card label="multi-step-loader">
|
<Card label="multi-step-loader">
|
||||||
<MultiStepLoader
|
<MultiStepLoaderDemo />
|
||||||
loading
|
|
||||||
loadingStates={[
|
|
||||||
{ text: "Fetching" },
|
|
||||||
{ text: "Compiling" },
|
|
||||||
{ text: "Rendering" },
|
|
||||||
{ text: "Done" },
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
</Card>
|
</Card>
|
||||||
<Card label="svg-mask-effect">
|
<Card label="svg-mask-effect">
|
||||||
<MaskContainer
|
<MaskContainer
|
||||||
|
|||||||
Reference in New Issue
Block a user