Skip to content

Commit

Permalink
feat: allow page content to take the full width
Browse files Browse the repository at this point in the history
  • Loading branch information
MuhammadM1998 committed Jul 10, 2024
1 parent bf162f2 commit 9447ea5
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions app/pages/[...slug].vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script setup lang="ts">
const { page } = useContent()
const config = useConfig()
const { page } = useContent()
const isWidePage = computed(() => page.value?.wide ?? false)
useSeoMeta({
title: page.value?.title,
Expand All @@ -21,12 +22,13 @@
>
<LayoutAside :is-mobile="false" />
</aside>

<main
class="relative py-6"
:class="[
config.toc.enable &&
'lg:grid lg:grid-cols-[1fr_200px] lg:gap-10 lg:py-8',
]"
:class="{
'lg:grid lg:grid-cols-[1fr_200px] lg:gap-10 lg:py-8':
config.toc.enable && !isWidePage,
}"
>
<div class="mx-auto w-full min-w-0">
<LayoutBreadcrumb
Expand Down

0 comments on commit 9447ea5

Please sign in to comment.