-
-
Notifications
You must be signed in to change notification settings - Fork 668
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
86 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
<template> | ||
<BaseLayout | ||
v-bind="$attrs" | ||
v-on="$listeners"> | ||
<slot | ||
name="sidebar-top" | ||
slot="sidebar-top" | ||
/> | ||
<slot | ||
name="sidebar-bottom" | ||
slot="sidebar-bottom" | ||
/> | ||
<template | ||
slot="page-top"> | ||
<div class="content beta-doc-description"> | ||
<div class="warning custom-block"> | ||
<p class="custom-block-title">Note</p> | ||
<p>This is a documentation for version <code>{{docVersion}}</code>.<template v-if="hasNotYetBeenReleased"> Also, this documentation may contain content that has not yet been released.</template><br> | ||
To check version <code>6.2.2</code> <a :href="v6DocLink">go here</a>. | ||
To check previous releases <a href="https://github.com/vuejs/eslint-plugin-vue/releases">go here</a>.</p> | ||
</div> | ||
</div> | ||
<slot | ||
name="page-top" | ||
/> | ||
</template> | ||
<slot | ||
name="page-bottom" | ||
slot="page-bottom" | ||
/> | ||
</BaseLayout> | ||
</template> | ||
<script> | ||
/** | ||
* Layout definition to navigate to older versions of the document. | ||
*/ | ||
import BaseLayout from 'vuepress/lib/default-theme/Layout.vue' | ||
import semver from 'semver' | ||
const version = semver.parse(require('../../../package.json').version) | ||
export default { | ||
components: { | ||
BaseLayout | ||
}, | ||
computed: { | ||
docVersion () { | ||
if (version.major < 7) { | ||
return '7.x' | ||
} | ||
return version.raw | ||
}, | ||
hasNotYetBeenReleased () { | ||
if (version.major < 7) { | ||
return true | ||
} | ||
return false | ||
}, | ||
v6DocLink () { | ||
if (this.$page.path.endsWith('.html')) { | ||
return `https://github.com/vuejs/eslint-plugin-vue/blob/v6.2.2/docs${this.$page.path.replace(/\.html$/, '')}.md` | ||
} | ||
return `https://github.com/vuejs/eslint-plugin-vue/blob/v6.2.2/docs${this.$page.path}README.md` | ||
} | ||
} | ||
} | ||
</script> | ||
<style scoped> | ||
.beta-doc-description { | ||
padding-bottom: 0; | ||
} | ||
* ::v-deep .content ~ .content { | ||
padding-top: 0; | ||
} | ||
* ::v-deep .content:not(.custom) h1{ | ||
margin-top: -3.1rem; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters