Skip to content

Commit

Permalink
Adjust layout classes to fix unintentional section scroll on homepage.
Browse files Browse the repository at this point in the history
  • Loading branch information
dannon committed Feb 18, 2025
1 parent 2692459 commit ce47170
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions website/layouts/default.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup lang="ts">
import { computed, useSlots } from "vue";
import { computed, useSlots, type Slots } from "vue";
const slots = useSlots();
const slots: Slots = useSlots();
const hasHero = computed(() => {
return !!slots.hero;
Expand All @@ -15,16 +15,16 @@ const hasRightSidebar = computed(() => {
});
</script>
<template>
<div :class="hasHero ? 'overflow-y-auto w-full' : 'overflow-hidden w-full'">
<div class="w-full" :class="hasHero ? 'overflow-y-auto' : 'overflow-hidden'">
<!-- Hero -->
<slot name="hero"></slot>
<div class="flex w-full h-full">
<div class="flex">
<!-- Left sidebar -->
<div v-if="hasLeftSidebar" class="w-1/4 p-4 overflow-y-auto">
<slot name="leftSidebar"></slot>
</div>
<!-- content -->
<div class="flex-1 p-4 overflow-y-auto">
<div class="flex-1 p-4" :class="{ 'overflow-y-auto': !hasHero }">
<slot name="content"></slot>
</div>
<!-- Right sidebar -->
Expand Down

0 comments on commit ce47170

Please sign in to comment.