Skip to content

Commit

Permalink
feat(theme-default): home slot for customizing the entire homepage ea…
Browse files Browse the repository at this point in the history
…sily (#314)
  • Loading branch information
soulsam480 authored Oct 7, 2021
1 parent 389e863 commit 07bf145
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions src/client/theme-default/Layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -107,17 +107,22 @@ const pageClasses = computed(() => {

<Content v-if="isCustomLayout" />

<Home v-else-if="enableHome">
<template #hero>
<slot name="home-hero" />
</template>
<template #features>
<slot name="home-features" />
</template>
<template #footer>
<slot name="home-footer" />
</template>
</Home>
<template v-else-if="enableHome">
<!-- A slot for customizing the entire homepage easily -->
<slot name="home">
<Home>
<template #hero>
<slot name="home-hero" />
</template>
<template #features>
<slot name="home-features" />
</template>
<template #footer>
<slot name="home-footer" />
</template>
</Home>
</slot>
</template>

<Page v-else>
<template #top>
Expand Down

0 comments on commit 07bf145

Please sign in to comment.