Skip to content

Commit

Permalink
Merge pull request #239 from ecency/feature/entry-page-loading-state
Browse files Browse the repository at this point in the history
Added loading screen for entry pages
  • Loading branch information
feruzm authored Jan 26, 2025
2 parents 1aecdf1 + ae1a7ef commit 7778ff1
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 26 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export * from "./deleted-post-screen";
export * from "./distance-detector";
export * from "./entry-page-loading-screen";
export * from "./similar-entries";
export * from "./md-handler";
export * from "./entry-read-time";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
export default function Loading() {
return (
<div className="app-content entry-page">
<div className="the-entry">
<div className="w-[80%] mb-[22px] mt-4 rounded-full animate-pulse h-[57px] bg-blue-dark-sky-040 dark:bg-blue-dark-grey" />
<div className="flex items-center gap-4">
<div className="w-[54px] rounded-full animate-pulse h-[54px] bg-blue-dark-sky-040 dark:bg-blue-dark-grey" />
<div className="flex flex-col gap-1">
<div className="w-[203px] rounded-full animate-pulse h-[28px] bg-blue-dark-sky-040 dark:bg-blue-dark-grey" />
<div className="w-[203px] rounded-full animate-pulse h-[22px] bg-blue-dark-sky-040 dark:bg-blue-dark-grey" />
</div>
</div>
<div className="mt-4 border-y border-[--border-color] py-2 flex justify-between">
<div className="w-[140px] rounded-full animate-pulse h-[32px] bg-blue-dark-sky-040 dark:bg-blue-dark-grey" />
<div className="w-[110px] rounded-full animate-pulse h-[32px] bg-blue-dark-sky-040 dark:bg-blue-dark-grey" />
</div>

<div className="w-full mt-10 rounded-full animate-pulse h-[24px] bg-blue-dark-sky-040 dark:bg-blue-dark-grey" />
<div className="w-full mt-2 rounded-full animate-pulse h-[24px] bg-blue-dark-sky-040 dark:bg-blue-dark-grey" />
<div className="w-full mt-2 rounded-2xl animate-pulse h-[300px] bg-blue-dark-sky-040 dark:bg-blue-dark-grey" />
<div className="w-full mt-2 rounded-full animate-pulse h-[24px] bg-blue-dark-sky-040 dark:bg-blue-dark-grey" />
<div className="w-full mt-2 rounded-full animate-pulse h-[24px] bg-blue-dark-sky-040 dark:bg-blue-dark-grey" />
<div className="w-full mt-2 rounded-full animate-pulse h-[24px] bg-blue-dark-sky-040 dark:bg-blue-dark-grey" />
<div className="w-full mt-2 rounded-full animate-pulse h-[24px] bg-blue-dark-sky-040 dark:bg-blue-dark-grey" />
<div className="w-full mt-2 rounded-full animate-pulse h-[24px] bg-blue-dark-sky-040 dark:bg-blue-dark-grey" />
</div>
</div>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
EntryPageContextProvider,
EntryPageCrossPostHeader,
EntryPageEditHistory,
EntryPageLoadingScreen,
MdHandler,
ReadTime
} from "./_components";
Expand Down Expand Up @@ -61,7 +60,6 @@ export default async function EntryPage({ params, searchParams }: Props) {
<MdHandler />

<div className="app-content entry-page">
<EntryPageLoadingScreen />
<ReadTime entry={entry} />

<div className="the-entry">
Expand Down

0 comments on commit 7778ff1

Please sign in to comment.