2020-02-07 11:15:08 +01:00
|
|
|
<template>
|
2021-08-04 17:15:51 +02:00
|
|
|
<div class="vtaihdtm">
|
|
|
|
<div class="search">
|
|
|
|
<MkInput v-model:value="query" :debounce="true" type="search"><template #icon><i class="fas fa-search"></i></template><span>{{ $ts.search }}</span></MkInput>
|
|
|
|
</div>
|
|
|
|
<MkFolder>
|
|
|
|
<template #header>{{ $ts._docs.generalTopics }}</template>
|
|
|
|
<div class="docs">
|
|
|
|
<MkA v-for="doc in docs.filter(doc => doc.path.startsWith('general/'))" :key="doc.path" :to="`/docs/${doc.path}`" class="doc">
|
|
|
|
<div class="title">{{ doc.title }}</div>
|
|
|
|
<div class="summary">{{ doc.summary }}</div>
|
|
|
|
<div class="read">{{ $ts._docs.continueReading }}</div>
|
|
|
|
</MkA>
|
2020-02-07 11:15:08 +01:00
|
|
|
</div>
|
2021-08-04 17:15:51 +02:00
|
|
|
</MkFolder>
|
|
|
|
<MkFolder>
|
|
|
|
<template #header>{{ $ts._docs.features }}</template>
|
|
|
|
<div class="docs">
|
|
|
|
<MkA v-for="doc in docs.filter(doc => doc.path.startsWith('features/'))" :key="doc.path" :to="`/docs/${doc.path}`" class="doc">
|
|
|
|
<div class="title">{{ doc.title }}</div>
|
|
|
|
<div class="summary">{{ doc.summary }}</div>
|
|
|
|
<div class="read">{{ $ts._docs.continueReading }}</div>
|
|
|
|
</MkA>
|
|
|
|
</div>
|
|
|
|
</MkFolder>
|
|
|
|
<MkFolder>
|
|
|
|
<template #header>{{ $ts._docs.advancedTopics }}</template>
|
|
|
|
<div class="docs">
|
|
|
|
<MkA v-for="doc in docs.filter(doc => doc.path.startsWith('advanced/'))" :key="doc.path" :to="`/docs/${doc.path}`" class="doc">
|
|
|
|
<div class="title">{{ doc.title }}</div>
|
|
|
|
<div class="summary">{{ doc.summary }}</div>
|
|
|
|
<div class="read">{{ $ts._docs.continueReading }}</div>
|
|
|
|
</MkA>
|
|
|
|
</div>
|
|
|
|
</MkFolder>
|
2020-02-07 11:15:08 +01:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
2020-10-17 13:12:00 +02:00
|
|
|
import { defineComponent } from 'vue';
|
2021-03-23 09:30:14 +01:00
|
|
|
import { url, lang } from '@client/config';
|
2021-04-10 05:54:12 +02:00
|
|
|
import * as symbols from '@client/symbols';
|
2021-08-04 17:15:51 +02:00
|
|
|
import MkFolder from '@client/components/ui/folder.vue';
|
|
|
|
import MkInput from '@client/components/ui/input.vue';
|
2020-02-07 11:15:08 +01:00
|
|
|
|
2020-10-17 13:12:00 +02:00
|
|
|
export default defineComponent({
|
2021-08-04 17:15:51 +02:00
|
|
|
components: {
|
|
|
|
MkFolder,
|
|
|
|
MkInput,
|
|
|
|
},
|
|
|
|
|
2020-02-07 11:15:08 +01:00
|
|
|
data() {
|
|
|
|
return {
|
2021-04-10 05:54:12 +02:00
|
|
|
[symbols.PAGE_INFO]: {
|
2020-12-26 02:47:36 +01:00
|
|
|
title: this.$ts.help,
|
2021-04-20 16:22:59 +02:00
|
|
|
icon: 'fas fa-question-circle'
|
2020-10-17 13:12:00 +02:00
|
|
|
},
|
2020-02-07 11:43:37 +01:00
|
|
|
docs: [],
|
2021-08-04 17:15:51 +02:00
|
|
|
query: null,
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
watch: {
|
|
|
|
query() {
|
|
|
|
fetch(`${url}/docs.json?lang=${lang}&q=${this.query}`).then(res => res.json()).then(docs => {
|
|
|
|
this.docs = docs;
|
|
|
|
});
|
2020-02-07 11:15:08 +01:00
|
|
|
}
|
|
|
|
},
|
2020-02-07 11:43:37 +01:00
|
|
|
|
|
|
|
created() {
|
|
|
|
fetch(`${url}/docs.json?lang=${lang}`).then(res => res.json()).then(docs => {
|
|
|
|
this.docs = docs;
|
|
|
|
});
|
|
|
|
},
|
2020-02-07 11:15:08 +01:00
|
|
|
});
|
|
|
|
</script>
|
2021-08-04 17:15:51 +02:00
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.vtaihdtm {
|
|
|
|
background: var(--panel);
|
|
|
|
|
|
|
|
> .search {
|
|
|
|
padding: 8px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.docs {
|
|
|
|
display: grid;
|
|
|
|
grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
|
|
|
|
grid-gap: 12px;
|
|
|
|
margin: var(--margin);
|
|
|
|
|
|
|
|
> .doc {
|
|
|
|
display: inline-block;
|
|
|
|
padding: 16px;
|
|
|
|
border: solid 1px var(--divider);
|
|
|
|
border-radius: 6px;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
border: solid 1px var(--accent);
|
|
|
|
text-decoration: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .title {
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .summary {
|
|
|
|
white-space: nowrap;
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
font-size: 0.9em;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .read {
|
|
|
|
color: var(--link);
|
|
|
|
font-size: 0.9em;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|