Skip to content

Commit

Permalink
fix($theme-default): slots don't allow customization for Sidebar & Pa…
Browse files Browse the repository at this point in the history
…ge (close: #1950) (#1951)
  • Loading branch information
softwarewright authored and ulivz committed Oct 21, 2019
1 parent d2fef5d commit 890e85d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
28 changes: 12 additions & 16 deletions packages/@vuepress/theme-default/layouts/Layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,12 @@
:items="sidebarItems"
@toggle-sidebar="toggleSidebar"
>
<slot
name="sidebar-top"
#top
/>
<slot
name="sidebar-bottom"
#bottom
/>
<template #top>
<slot name="sidebar-top" />
</template>
<template #bottom>
<slot name="sidebar-bottom"/>
</template>
</Sidebar>

<Home v-if="$page.frontmatter.home"/>
Expand All @@ -35,14 +33,12 @@
v-else
:sidebar-items="sidebarItems"
>
<slot
name="page-top"
#top
/>
<slot
name="page-bottom"
#bottom
/>
<template #top>
<slot name="page-top"/>
</template>
<template #bottom>
<slot name="page-bottom"/>
</template>
</Page>
</div>
</template>
Expand Down
8 changes: 6 additions & 2 deletions packages/@vuepress/theme-vue/layouts/Layout.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
<template>
<ParentLayout>
<CarbonAds #sidebar-top/>
<BuySellAds #page-bottom/>
<template #sidebar-top>
<CarbonAds/>
</template>
<template #page-bottom>
<BuySellAds/>
</template>
</ParentLayout>
</template>

Expand Down

0 comments on commit 890e85d

Please sign in to comment.