vuepress-theme-reco/components/Sidebar.vue

66 lines
1.4 KiB
Vue
Raw Normal View History

2019-04-15 10:35:40 +08:00
<template>
<aside class="sidebar">
<PersonalInfo/>
2019-04-15 10:35:40 +08:00
<NavLinks/>
<slot name="top"/>
<SidebarLinks :depth="0" :items="items"/>
<slot name="bottom"/>
</aside>
</template>
<script>
import SidebarLinks from '@theme/components/SidebarLinks'
import PersonalInfo from '@theme/components/PersonalInfo'
import NavLinks from '@theme/components/NavLinks'
2019-04-15 10:35:40 +08:00
export default {
name: 'Sidebar',
components: { SidebarLinks, NavLinks, PersonalInfo },
2019-04-15 10:35:40 +08:00
props: ['items']
}
</script>
<style lang="stylus">
.sidebar
.personal-info-wrapper
display none
2019-04-15 10:35:40 +08:00
ul
padding 0
margin 0
list-style-type none
a
display inline-block
.nav-links
display none
border-bottom 1px solid var(--border-color)
2019-04-15 10:35:40 +08:00
padding 0.5rem 0 0.75rem 0
a
font-weight 600
.nav-item, .repo-link
display block
line-height 1.25rem
font-size 1.1em
padding 0.5rem 0 0.5rem 1.5rem
& > .sidebar-links
padding 1.5rem 0
& > li > a.sidebar-link
font-size 1.1em
line-height 1.7
font-weight bold
& > li:not(:first-child)
margin-top .75rem
@media (max-width: $MQMobile)
.sidebar
.personal-info-wrapper
display block
2019-04-15 10:35:40 +08:00
.nav-links
display block
.dropdown-wrapper .nav-dropdown .dropdown-item a.router-link-active::after
top calc(1rem - 2px)
& > .sidebar-links
padding 1rem 0
</style>