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-08-12 00:28:35 +08:00
|
|
|
<select name="" id="">
|
|
|
|
<option value="vue">Vue.js</option>
|
|
|
|
<option value="react">React</option>
|
|
|
|
</select>
|
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/>
|
2020-08-13 16:12:52 +08:00
|
|
|
<p>
|
|
|
|
<a :href="editLink" target="_blank">
|
|
|
|
<span>Edit this page on GitHub</span><br />
|
|
|
|
{{ currentPath }}<br />
|
|
|
|
{{ editLink }}
|
|
|
|
</a>
|
|
|
|
</p>
|
2020-04-19 04:35:29 +08:00
|
|
|
<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-08-13 16:12:52 +08:00
|
|
|
|
|
|
|
computed: {
|
|
|
|
currentPath () {
|
|
|
|
return this.$route.matched[0].path
|
|
|
|
},
|
|
|
|
editLink () {
|
|
|
|
let path = this.currentPath
|
|
|
|
|
|
|
|
if (path === '') {
|
|
|
|
path = 'docs/src/pages/Index.vue'
|
|
|
|
} else {
|
|
|
|
path = `docs/src/docPages${path}.md`
|
|
|
|
}
|
|
|
|
|
|
|
|
return `https://github.com/ueberdosis/tiptap-next/blob/main/${path}`
|
|
|
|
},
|
|
|
|
}
|
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>
|