Skip to content

Commit

Permalink
feat(theme): add doc-footer-before slot (#1050) (#1052)
Browse files Browse the repository at this point in the history
Co-authored-by: Divyansh Singh <40380293+brc-dd@users.noreply.github.com>
  • Loading branch information
Charles7c and brc-dd committed Aug 1, 2022
1 parent 8e6665b commit 60c515c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/guide/theme-introduction.md
Expand Up @@ -188,6 +188,7 @@ export default {
Full list of slots available in the default theme layout:

- When `layout: 'doc'` (default) is enabled via frontmatter:
- `doc-footer-before`
- `doc-before`
- `doc-after`
- `aside-top`
Expand Down
1 change: 1 addition & 0 deletions src/client/theme-default/Layout.vue
Expand Up @@ -46,6 +46,7 @@ provide('close-sidebar', closeSidebar)
<template #home-features-before><slot name="home-features-before" /></template>
<template #home-features-after><slot name="home-features-after" /></template>

<template #doc-footer-before><slot name="doc-footer-before" /></template>
<template #doc-before><slot name="doc-before" /></template>
<template #doc-after><slot name="doc-after" /></template>

Expand Down
1 change: 1 addition & 0 deletions src/client/theme-default/components/VPContent.vue
Expand Up @@ -35,6 +35,7 @@ useCopyCode()
</VPHome>

<VPDoc v-else>
<template #doc-footer-before><slot name="doc-footer-before" /></template>
<template #doc-before><slot name="doc-before" /></template>
<template #doc-after><slot name="doc-after" /></template>

Expand Down
4 changes: 1 addition & 3 deletions src/client/theme-default/components/VPDoc.vue
Expand Up @@ -38,13 +38,11 @@ const pageName = computed(() =>
<div class="content">
<div class="content-container">
<slot name="doc-before" />

<main class="main">
<Content class="vp-doc" :class="pageName" />
</main>

<slot name="doc-footer-before" />
<VPDocFooter />

<slot name="doc-after" />
</div>
</div>
Expand Down

0 comments on commit 60c515c

Please sign in to comment.