Skip to content

Commit

Permalink
feat(blog): add blog pages transitions
Browse files Browse the repository at this point in the history
  • Loading branch information
bitterteriyaki committed Sep 8, 2024
1 parent b8e33ef commit a28ebc2
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ logs
!.env.example

.husky/_/
.vscode/
1 change: 0 additions & 1 deletion app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<NuxtLayout>
<NuxtPage />
<SpeedInsights />

<UNotifications />
</NuxtLayout>
</template>
Expand Down
21 changes: 21 additions & 0 deletions assets/css/main.sass
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
.dark
@apply bg-slate-950
@apply text-slate-100

.page-enter-active,
.page-leave-active
@apply transition-all
@apply duration-300

.page-leave-to,
.page-enter-from
@apply opacity-0

.page-enter-active
@apply ease-out

.page-leave-active
@apply ease-in

.page-leave-to
@apply -translate-y-6

.page-enter-from
@apply translate-y-6
5 changes: 2 additions & 3 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ export default defineNuxtConfig({
{ path: '@/components/content', pathPrefix: true },
],
app: {
head: {
htmlAttrs: { lang: 'en' },
},
head: { htmlAttrs: { lang: 'en' } },
pageTransition: { name: 'page', mode: 'out-in' },
},
modules: [
'@nuxt/ui',
Expand Down

0 comments on commit a28ebc2

Please sign in to comment.