Skip to content

Commit

Permalink
fix: allow disable aside
Browse files Browse the repository at this point in the history
Signed-off-by: ZTL-UwU <[email protected]>
  • Loading branch information
ZTL-UwU committed Dec 9, 2024
1 parent 4a37753 commit 89b21e7
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@

<div v-if="route.path !== '/'" class="min-h-screen border-b">
<div
class="flex-1 items-start px-4 md:grid md:grid-cols-[220px_minmax(0,1fr)] md:gap-6 md:px-8 lg:grid-cols-[240px_minmax(0,1fr)] lg:gap-10"
:class="[config.main.padded && 'container']"
class="flex-1 items-start px-4 md:grid md:gap-6 md:px-8 lg:gap-10"
:class="[
config.main.padded && 'container',
(page.aside ?? true) && 'md:grid-cols-[220px_minmax(0,1fr)] lg:grid-cols-[240px_minmax(0,1fr)]',
]"
>
<aside class="fixed top-[102px] z-30 -ml-2 hidden h-[calc(100vh-3.5rem)] w-full shrink-0 overflow-y-auto md:sticky md:top-[60px] md:block">
<aside v-if="page.aside ?? true" class="fixed top-[102px] z-30 -ml-2 hidden h-[calc(100vh-3.5rem)] w-full shrink-0 overflow-y-auto md:sticky md:top-[60px] md:block">
<LayoutAside :is-mobile="false" />
</aside>
<NuxtPage />
Expand All @@ -23,6 +26,7 @@
<script setup lang="ts">
import Toaster from '@/components/ui/toast/Toaster.vue';
const { page } = useContent();
const config = useConfig();
const route = useRoute();
const { themeClass, radius } = useThemes();
Expand Down

0 comments on commit 89b21e7

Please sign in to comment.