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

68 lines
1.6 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>
2020-04-19 17:56:50 +08:00
<github-button
href="https://github.com/scrumpy/tiptap"
data-show-count="true"
aria-label="Star scrumpy/tiptap on GitHub"
/>
2020-04-17 23:06:55 +08:00
</header>
<div class="app__content">
2020-04-23 03:23:24 +08:00
<div class="app__sidebar-wrapper">
<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-19 04:35:29 +08:00
</div>
2020-04-23 03:23:24 +08:00
</nav>
</div>
2020-04-19 04:35:29 +08:00
<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 01:50:06 +08:00
import PageNavigation from '@/components/PageNavigation'
2020-04-19 17:56:50 +08:00
import GithubButton from 'vue-github-button'
2020-04-18 18:48:20 +08:00
export default {
2020-04-19 01:50:06 +08:00
components: {
PageNavigation,
2020-04-19 17:56:50 +08:00
GithubButton,
2020-04-19 01:50:06 +08:00
},
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>