Skip to content

Commit 07bf145

Browse files
authored
feat(theme-default): home slot for customizing the entire homepage easily (#314)
1 parent 389e863 commit 07bf145

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

Diff for: src/client/theme-default/Layout.vue

+16-11
Original file line numberDiff line numberDiff line change
@@ -107,17 +107,22 @@ const pageClasses = computed(() => {
107107

108108
<Content v-if="isCustomLayout" />
109109

110-
<Home v-else-if="enableHome">
111-
<template #hero>
112-
<slot name="home-hero" />
113-
</template>
114-
<template #features>
115-
<slot name="home-features" />
116-
</template>
117-
<template #footer>
118-
<slot name="home-footer" />
119-
</template>
120-
</Home>
110+
<template v-else-if="enableHome">
111+
<!-- A slot for customizing the entire homepage easily -->
112+
<slot name="home">
113+
<Home>
114+
<template #hero>
115+
<slot name="home-hero" />
116+
</template>
117+
<template #features>
118+
<slot name="home-features" />
119+
</template>
120+
<template #footer>
121+
<slot name="home-footer" />
122+
</template>
123+
</Home>
124+
</slot>
125+
</template>
121126

122127
<Page v-else>
123128
<template #top>

0 commit comments

Comments
 (0)