tiptap/docs/src/layouts/App/index.vue

64 lines
1.4 KiB
Vue
Raw Normal View History

2020-04-17 23:06:55 +08:00
<template>
<div class="app">
<header class="app__header">
2020-04-19 04:35:29 +08:00
<g-link class="app__logo" to="/">
{{ $static.metadata.siteName }}
</g-link>
<g-link to="https://github.com/scrumpy/tiptap">
<icon name="github" />
</g-link>
2020-04-17 23:06:55 +08:00
</header>
<div class="app__content">
2020-04-19 04:35:29 +08:00
<nav class="app__sidebar">
<div class="app__link-group" v-for="(linkGroup, i) in linkGroups" :key="i">
<div class="app__link-group-title">
{{ linkGroup.title }}
</div>
<ul>
<li v-for="(item, j) in linkGroup.items" :key="j">
<g-link class="app__link" :to="item.link">
{{ item.title }}
</g-link>
</li>
</ul>
2020-04-17 23:06:55 +08:00
</div>
2020-04-19 04:35:29 +08:00
</nav>
<main class="app__main">
<slot/>
<page-navigation />
</main>
2020-04-17 23:06:55 +08:00
</div>
</div>
</template>
<static-query>
query {
metadata {
siteName
}
2020-04-18 18:48:20 +08:00
}
</static-query>
<script>
import linkGroups from '@/data/links.yaml'
2020-04-19 04:35:29 +08:00
import Icon from '@/components/Icon'
2020-04-19 01:50:06 +08:00
import PageNavigation from '@/components/PageNavigation'
2020-04-18 18:48:20 +08:00
export default {
2020-04-19 01:50:06 +08:00
components: {
2020-04-19 04:35:29 +08:00
Icon,
2020-04-19 01:50:06 +08:00
PageNavigation,
},
2020-04-18 18:48:20 +08:00
data() {
return {
2020-04-19 01:50:06 +08:00
linkGroups,
2020-04-17 23:06:55 +08:00
}
2020-04-19 01:50:06 +08:00
},
2020-04-17 23:06:55 +08:00
}
2020-04-18 18:48:20 +08:00
</script>
2020-04-17 23:06:55 +08:00
2020-04-18 05:18:18 +08:00
<style lang="scss" src="./fonts.scss"></style>
2020-04-18 18:48:20 +08:00
<style lang="scss" src="./base.scss"></style>
2020-04-18 05:35:07 +08:00
<style lang="scss" src="./prism.scss"></style>
2020-04-18 18:48:20 +08:00
<style lang="scss" src="./style.scss" scoped></style>