summaryrefslogtreecommitdiff
path: root/src/client/pages/docs.vue
blob: e51528f83da6c150a79ca90b663ad7a27bd3596b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<template>
<div>
	<main class="_section">
		<div class="_content">
			<ul>
				<li v-for="doc in docs" :key="doc.path">
					<MkA :to="`/docs/${doc.path}`">{{ doc.title }}</MkA>
				</li>
			</ul>
		</div>
	</main>
</div>
</template>

<script lang="ts">
import { defineComponent } from 'vue';
import { url, lang } from '@client/config';
import * as symbols from '@client/symbols';

export default defineComponent({
	data() {
		return {
			[symbols.PAGE_INFO]: {
				title: this.$ts.help,
				icon: 'fas fa-question-circle'
			},
			docs: [],
		}
	},

	created() {
		fetch(`${url}/docs.json?lang=${lang}`).then(res => res.json()).then(docs => {
			this.docs = docs;
		});
	},
});
</script>