mirror of
				https://github.com/em-squared/5e-drs.git
				synced 2025-10-30 21:24:18 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			45 lines
		
	
	
	
		
			739 B
		
	
	
	
		
			Vue
		
	
	
	
	
	
			
		
		
	
	
			45 lines
		
	
	
	
		
			739 B
		
	
	
	
		
			Vue
		
	
	
	
	
	
| <template>
 | |
|   <div>
 | |
|     <Home v-if="$page.frontmatter.home" />
 | |
| 
 | |
|     <Page
 | |
|       v-else
 | |
|       :sidebar-items="sidebarItems"
 | |
|     >
 | |
|       <template #top>
 | |
|         <slot name="page-top" />
 | |
|       </template>
 | |
|       <template #bottom>
 | |
|         <slot name="page-bottom" />
 | |
|       </template>
 | |
|     </Page>
 | |
|   </div>
 | |
| </template>
 | |
| 
 | |
| <script>
 | |
| import Home from '@theme/components/Home.vue'
 | |
| import Page from '@theme/components/Page.vue'
 | |
| import { resolveSidebarItems } from '../util'
 | |
| 
 | |
| export default {
 | |
|   name: 'Layout',
 | |
| 
 | |
|   components: {
 | |
|     Home,
 | |
|     Page
 | |
|   },
 | |
| 
 | |
|   computed: {
 | |
| 
 | |
|     sidebarItems () {
 | |
|       return resolveSidebarItems(
 | |
|         this.$page,
 | |
|         this.$page.regularPath,
 | |
|         this.$site,
 | |
|         this.$localePath
 | |
|       )
 | |
|     },
 | |
| 
 | |
|   }
 | |
| }
 | |
| </script>
 | 
