mirror of
https://github.com/ArthurDanjou/artsite.git
synced 2026-01-30 01:28:15 +01:00
Refactor app.vue and [slug].vue: add scoped styles and optimize i18n usage
This commit is contained in:
@@ -17,7 +17,7 @@ useHead({
|
|||||||
</UApp>
|
</UApp>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style>
|
<style scoped>
|
||||||
body {
|
body {
|
||||||
font-family: 'DM Sans', sans-serif;
|
font-family: 'DM Sans', sans-serif;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
@import "tailwindcss";
|
@import "tailwindcss";
|
||||||
@import "@nuxt/ui";
|
@import "@nuxt/ui";
|
||||||
|
|
||||||
@plugin "@tailwindcss/typography";
|
@plugin "@tailwindcss/typography";
|
||||||
|
|
||||||
|
body {
|
||||||
|
@apply bg-white dark:bg-neutral-950;
|
||||||
|
}
|
||||||
@@ -8,8 +8,7 @@ const {
|
|||||||
refresh,
|
refresh,
|
||||||
} = await useAsyncData(`writings/${route.params.slug}/db`, () => $fetch(`/api/posts/${route.params.slug}`, { method: 'POST' }))
|
} = await useAsyncData(`writings/${route.params.slug}/db`, () => $fetch(`/api/posts/${route.params.slug}`, { method: 'POST' }))
|
||||||
|
|
||||||
const { locale } = useI18n()
|
const { t, locale } = useI18n({
|
||||||
const { t } = useI18n({
|
|
||||||
useScope: 'local',
|
useScope: 'local',
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user