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

91 lines
2.2 KiB
Vue
Raw Normal View History

2020-04-17 23:06:55 +08:00
<template>
<div class="app">
<header class="app__header">
2020-04-23 03:57:26 +08:00
<div class="app__header-inner">
<g-link class="app__logo" to="/">
{{ $static.metadata.siteName }}
</g-link>
2020-04-23 18:22:59 +08:00
<div>
2020-08-11 22:31:03 +08:00
Algolia Search |
Sponsor
2020-04-23 18:22:59 +08:00
<github-button
2020-08-11 22:35:13 +08:00
href="https://github.com/ueberdosis/tiptap"
2020-04-23 18:22:59 +08:00
data-show-count="true"
2020-08-11 22:35:13 +08:00
aria-label="Star ueberdosis/tiptap on GitHub"
2020-04-23 18:22:59 +08:00
/>
<button
class="app__menu-icon"
@click="menuIsVisible = true"
v-if="!menuIsVisible"
>
<icon name="menu" />
</button>
<button
class="app__close-icon"
@click="menuIsVisible = false"
v-if="menuIsVisible"
>
<icon name="close" />
</button>
</div>
2020-04-23 03:57:26 +08:00
</div>
2020-04-17 23:06:55 +08:00
</header>
<div class="app__content">
2020-04-23 18:22:59 +08:00
<div class="app__sidebar-wrapper" :class="{ 'is-mobile-visible': menuIsVisible }">
2020-04-23 03:23:24 +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-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>
2020-04-24 16:03:15 +08:00
import linkGroups from '@/links.yaml'
2020-04-23 18:22:59 +08:00
import Icon from '@/components/Icon'
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: {
2020-04-23 18:22:59 +08:00
Icon,
2020-04-19 01:50:06 +08:00
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-23 18:22:59 +08:00
menuIsVisible: false,
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>