mirror of
https://github.com/ichsankurnia/hats-app.git
synced 2026-12-06 16:36:29 +00:00
initial commit for new hats app
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import { cn } from "@/lib/utils";
|
||||
import { Loader2 } from "lucide-react";
|
||||
|
||||
export default function FallbackAvatar({ className }: { className?: string }) {
|
||||
return (
|
||||
<div className={cn("h-9 w-9 sm:h-10 sm:w-10 rounded-full bg-zinc-200 dark:bg-zinc-700 animate-pulse flex items-center justify-center", className)} >
|
||||
<Loader2 className="m-auto h-4 w-4 text-zinc-600 dark:text-zinc-400 animate-spin" />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { FC } from "react";
|
||||
|
||||
const LazyLoading: FC = () => {
|
||||
return (
|
||||
<div className='w-full h-32 rounded-2xl z-20 flex justify-center items-center flex-row space-x-3 font-medium'>
|
||||
<span className="relative inset-0 inline-flex h-4 w-4 animate-spin items-center justify-center rounded-full border-2 border-zinc-500 dark:border-zinc-400 after:absolute after:h-6 after:w-6 after:rounded-full after:border-2 after:border-y-his dark:after:border-y-his after:border-x-transparent"></span>
|
||||
<span className="animate-pulse">Loading...</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default LazyLoading
|
||||
@@ -0,0 +1,28 @@
|
||||
import { FC } from "react";
|
||||
import Image from "next/image";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
type Props = {
|
||||
title?: string
|
||||
className?: string
|
||||
}
|
||||
|
||||
const PageLoading: FC<Props> = ({ title, className }) => {
|
||||
return (
|
||||
<div className={cn('absolute inset-0 w-full h-full bg-soft dark:bg-zinc-950 bg-opacity-40 backdrop-blur-sm rounded-2xl z-50 flex justify-center items-center flex-col', className)}>
|
||||
{/* <img alt="anim" loading="lazy" src="/assets/LOGO_HIS_NI_ANIM_400px.gif" className="w-16 h-16 md:w-28 md:h-28 2xl:w-44 2xl:h-44" /> */}
|
||||
<Image alt='anim' src="/assets/LOGO_HIS_NI_ANIM_400px.gif" width={0} height={0} className="w-16 h-16 md:w-28 md:h-28 2xl:w-44 2xl:h-44" unoptimized />
|
||||
{/* <span className="relative inset-0 inline-flex h-8 w-8 animate-spin items-center justify-center rounded-full border-4 border-zinc-500 dark:border-zinc-400 after:absolute after:h-11 after:w-11 after:rounded-full after:border-4 after:border-y-his dark:after:border-y-his after:border-x-transparent"></span> */}
|
||||
<span className="animate-pulse text-sm md:text-base 2xl:text-xl font-semibold text-muted-foreground">{title || 'Please wait..'}</span>
|
||||
{/* <div className="rounded-full border border-border p-2">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" className="icon icon-tabler icon-tabler-terminal animate-pulse" width="36" height="36" viewBox="0 0 24 24" strokeWidth="2" stroke="currentColor" fill="none" strokeLinecap="round" strokeLinejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
||||
<path d="M5 7l5 5l-5 5"></path>
|
||||
<path d="M12 19l7 0"></path>
|
||||
</svg>
|
||||
</div> */}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default PageLoading
|
||||
@@ -0,0 +1,23 @@
|
||||
import { FC } from "react";
|
||||
|
||||
export const WindowsLoading: FC = () => {
|
||||
return (
|
||||
<div className='absolute inset-0 w-full h-full bg-white dark:bg-zinc-950 rounded-2xl z-10 flex justify-center items-center flex-col'>
|
||||
<div className="[&>span]:before:animate-fadeIn relative h-10 w-10 [&>span]:absolute [&>span]:inset-0 [&>span]:inline-flex [&>span]:h-full [&>span]:w-full [&>span]:before:h-2 [&>span]:before:w-2 [&>span]:before:rounded-full dark:[&>span]:before:bg-white [&>span]:before:bg-zinc-800">
|
||||
<span className=""></span>
|
||||
<span className="before:!animation-delay-[-1.1s] rotate-30deg"></span>
|
||||
<span className="before:!animation-delay-[-1s] rotate-60deg"></span>
|
||||
<span className="before:!animation-delay-[-0.9s] rotate-90deg"></span>
|
||||
<span className="before:!animation-delay-[-0.8s] rotate-120deg"></span>
|
||||
<span className="before:!animation-delay-[-0.7s] rotate-150deg"></span>
|
||||
<span className="before:!animation-delay-[-0.6s] rotate-180deg"></span>
|
||||
<span className="before:!animation-delay-[-0.5s] rotate-210deg"></span>
|
||||
<span className="before:!animation-delay-[-0.4s] rotate-240deg"></span>
|
||||
<span className="before:!animation-delay-[-0.3s] rotate-270deg"></span>
|
||||
<span className="before:!animation-delay-[-0.2s] rotate-300deg"></span>
|
||||
<span className="before:!animation-delay-[-0.1s] rotate-330deg"></span>
|
||||
</div>
|
||||
<span className="animate-pulse mt-5 text-sm font-medium">Please wait..</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user