paricafe/src/client/pages/docs.vue

43 lines
802 B
Vue
Raw Normal View History

2020-02-07 04:15:08 -06:00
<template>
<div>
<portal to="icon"><fa :icon="faQuestionCircle"/></portal>
2020-07-24 11:36:39 -05:00
<portal to="title" v-t="'help'"></portal>
2020-02-07 04:15:08 -06:00
<main class="_card">
<div class="_content">
2020-02-07 04:43:37 -06:00
<ul>
<li v-for="doc in docs" :key="doc.path">
<router-link :to="`/docs/${doc.path}`">{{ doc.title }}</router-link>
</li>
</ul>
2020-02-07 04:15:08 -06:00
</div>
</main>
</div>
</template>
<script lang="ts">
import Vue from 'vue';
import { faQuestionCircle } from '@fortawesome/free-solid-svg-icons'
2020-02-07 04:43:37 -06:00
import { url, lang } from '../config';
2020-02-07 04:15:08 -06:00
export default Vue.extend({
metaInfo() {
return {
title: this.$t('help') as string,
};
},
data() {
return {
2020-02-07 04:43:37 -06:00
docs: [],
2020-02-07 04:15:08 -06:00
faQuestionCircle
}
},
2020-02-07 04:43:37 -06:00
created() {
fetch(`${url}/docs.json?lang=${lang}`).then(res => res.json()).then(docs => {
this.docs = docs;
});
},
2020-02-07 04:15:08 -06:00
});
</script>