Skip to content

Commit

Permalink
💄 add some loading transition
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-unterberg committed Jan 2, 2024
1 parent 8a17d02 commit e765de4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion layouts/LayoutDefault.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const LayoutDefault = ({
<div className="max-w-4xl m-auto text-light">
<div className="relative container px-5 mx-auto text-white text-base">
<Header />
<div>{children}</div>
<div className="page-portal">{children}</div>
<Footer />
</div>
</div>
Expand Down
10 changes: 10 additions & 0 deletions layouts/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,14 @@

body {
background-color: var(--tw-dark);
}

.page-portal {
opacity: 1;
transition: opacity 0.5s ease-in-out;
}

body.page-is-transitioning .page-portal {
opacity: 0;
transition: opacity 0.5s ease-in-out;
}

0 comments on commit e765de4

Please sign in to comment.