Skip to content

Commit

Permalink
page loading
Browse files Browse the repository at this point in the history
  • Loading branch information
JayJay1024 committed Sep 23, 2023
1 parent 5befbe3 commit 0c986c7
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 0 deletions.
15 changes: 15 additions & 0 deletions packages/apps/src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,21 @@ body {
background: linear-gradient(180deg, #02061f 0%, #1c1837 100%);
}

.loading-bar {
background: linear-gradient(90deg, #ffffff 35%, #00b2ff 50%, #ffffff 65%);
background-position: 100% 50%;
background-size: 40% 100%;
animation: bar-loading 2.4s linear infinite;
}
@keyframes bar-loading {
0% {
background-position: 0% 50%;
}
100% {
background-position: 100% 50%;
}
}

.refresh-countdown {
animation: countdown-dash 9.3s linear infinite;
animation-delay: 0.7s;
Expand Down
9 changes: 9 additions & 0 deletions packages/apps/src/app/loading.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import CountLoading from "@/ui/count-loading";

export default function Loading() {
return (
<div className="app-main flex items-center justify-center">
<CountLoading size="large" />
</div>
);
}
7 changes: 7 additions & 0 deletions packages/apps/src/app/records/[id]/loading.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default function Loading() {
return (
<main className="app-main">
<div className="loading-bar fixed left-0 top-0 z-50 h-[2px] w-full" />
</main>
);
}
7 changes: 7 additions & 0 deletions packages/apps/src/app/records/loading.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default function Loading() {
return (
<main className="app-main">
<div className="loading-bar fixed left-0 top-0 z-50 h-[2px] w-full" />
</main>
);
}

0 comments on commit 0c986c7

Please sign in to comment.