feat: top and bottom slots for sidebar and page (#90)

pull/83/head
Eduardo San Martin Morote 4 years ago committed by GitHub
parent 725a04cdf0
commit 11060136c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -5,7 +5,14 @@
<ToggleSideBarButton @toggle="toggleSidebar" />
</header>
<aside :class="{ open }">
<SideBar/>
<SideBar>
<template #top>
<slot name="sidebar-top" />
</template>
<template #bottom>
<slot name="sidebar-bottom" />
</template>
</SideBar>
</aside>
<div
class="sidebar-mask"
@ -13,7 +20,14 @@
@click="toggleSidebar(false)"
/>
<main>
<Page />
<Page>
<template #top>
<slot name="page-top" />
</template>
<template #bottom>
<slot name="page-bottom" />
</template>
</Page>
</main>
</div>
<Debug />

@ -1,8 +1,10 @@
<template>
<div class="content">
<slot name="top" />
<Content />
<NextAndPrevLinks />
<PageEdit />
<slot name="bottom" />
</div>
</template>
@ -10,7 +12,7 @@
import NextAndPrevLinks from './NextAndPrevLinks.vue'
import PageEdit from './PageEdit.vue'
export default {
components:{ NextAndPrevLinks, PageEdit }
components: { NextAndPrevLinks, PageEdit }
}
</script>
@ -18,6 +20,7 @@ export default {
.content {
margin: 0 auto;
padding: 0.025rem 2.5rem 2rem;
/* if this is moved to a variable, add it to BuySellAds.vue */
max-width: 50rem;
}

@ -1,9 +1,13 @@
<template>
<NavBarLinks class="show-mobile" />
<slot name="top" />
<ul class="sidebar">
<SideBarItem v-for="item of items" :item="item" />
</ul>
<slot name="bottom" />
</template>
<script src="./SideBar"></script>

Loading…
Cancel
Save