Skip to content

Commit

Permalink
feat(pages): add releases page
Browse files Browse the repository at this point in the history
  • Loading branch information
shadow81627 committed Dec 8, 2019
1 parent 6f6f5c2 commit 38abac8
Show file tree
Hide file tree
Showing 6 changed files with 119 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/layout/the-footer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<span>Version: {{ version }}</span>
<span>|</span>
<span>Commit: </span>
<nuxt-link to="#">
<nuxt-link to="releases">
<span> {{ commit | shortHash }}</span>
</nuxt-link>
</v-card-text>
Expand Down
1 change: 1 addition & 0 deletions nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ module.exports = {
'@nuxtjs/pwa',
// Doc: https://github.com/nuxt-community/dotenv-module
'@nuxtjs/dotenv',
'@nuxtjs/markdownit',
'@nuxtjs/vuetify',
'nuxt-i18n',
[
Expand Down
75 changes: 75 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,14 @@
"dependencies": {
"@nuxtjs/axios": "5.8.0",
"@nuxtjs/dotenv": "1.4.1",
"@nuxtjs/markdownit": "1.2.7",
"@nuxtjs/pwa": "3.0.0-beta.19",
"bootstrap": "4.4.1",
"bootstrap-vue": "2.1.0",
"bootswatch": "4.4.1",
"cloudinary-core": "2.8.0",
"cross-env": "6.0.3",
"github-markdown-css": "3.0.1",
"koa": "2.11.0",
"nuxt": "2.10.2",
"nuxt-i18n": "6.4.1",
Expand Down
3 changes: 2 additions & 1 deletion pages/_slug.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ export default {
});
},
validate({ params, query, store }) {
return params.slug !== '404.html';
const routeBlacklist = ['404.html'];
return !(params.slug in routeBlacklist);
},
};
</script>
38 changes: 38 additions & 0 deletions pages/releases.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<template>
<div class="container bg-light">
<!-- eslint-disable-next-line -->
<div class="markdown-body" v-html="content()" />
</div>
</template>

<script>
import 'github-markdown-css/github-markdown.css';
import content from '@/CHANGELOG.md';
export default {
methods: {
content() {
return content;
},
},
};
</script>

<style>
.markdown-body {
box-sizing: border-box;
min-width: 200px;
max-width: 980px;
margin: 0 auto;
padding: 45px;
/* color: inherit; */
}
@media (max-width: 767px) {
.markdown-body {
padding: 15px;
}
}
</style>

0 comments on commit 38abac8

Please sign in to comment.