Skip to content

Commit

Permalink
feat(client): custom layouting
Browse files Browse the repository at this point in the history
  • Loading branch information
kazupon committed Oct 26, 2020
1 parent 1f8fa2e commit e0d5416
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/client/theme-default/Layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,17 @@
<!-- TODO: make this button accessible -->
<div class="sidebar-mask" @click="toggleSidebar(false)" />
<main class="home" aria-labelledby="main-title" v-if="enableHome">
<Home />
<Home>
<template #hero>
<slot name="home-hero" />
</template>
<template #features>
<slot name="home-features" />
</template>
<template #footer>
<slot name="home-footer" />
</template>
</Home>
</main>
<main v-else>
<Page>
Expand Down
3 changes: 3 additions & 0 deletions src/client/theme-default/components/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
>
<NavBarLink :item="actionLink" />
</p>
<slot name="hero" />
</header>

<div
Expand All @@ -40,13 +41,15 @@
<h2>{{ feature.title }}</h2>
<p>{{ feature.details }}</p>
</div>
<slot name="features" />
</div>

<div
v-if="data.footer"
class="footer"
>
{{ data.footer }}
<slot name="footer" />
</div>
</template>

Expand Down

0 comments on commit e0d5416

Please sign in to comment.