0
0

Improve doc page

This commit is contained in:
syuilo 2020-02-15 00:27:53 +09:00
parent c53b59914b
commit 84958af4ce
2 changed files with 13 additions and 0 deletions

View File

@ -396,6 +396,7 @@ disableAnimatedMfm: "動きのあるMFMを無効にする"
doing: "やっています" doing: "やっています"
category: "カテゴリ" category: "カテゴリ"
tags: "タグ" tags: "タグ"
docSource: "このドキュメントのソース"
_ago: _ago:
unknown: "謎" unknown: "謎"

View File

@ -3,9 +3,13 @@
<portal to="icon"><fa :icon="faFileAlt"/></portal> <portal to="icon"><fa :icon="faFileAlt"/></portal>
<portal to="title">{{ title }}</portal> <portal to="title">{{ title }}</portal>
<main class="_card"> <main class="_card">
<div class="_title"><fa :icon="faFileAlt"/> {{ title }}</div>
<div class="_content"> <div class="_content">
<div v-html="body" class="qyqbqfal"></div> <div v-html="body" class="qyqbqfal"></div>
</div> </div>
<div class="_footer">
<mk-link :url="`https://github.com/syuilo/misskey/blob/master/src/docs/${doc}.ja-JP.md`" class="at">{{ $t('docSource') }}</mk-link>
</div>
</main> </main>
</div> </div>
</template> </template>
@ -14,19 +18,27 @@
import Vue from 'vue'; import Vue from 'vue';
import { faFileAlt } from '@fortawesome/free-solid-svg-icons' import { faFileAlt } from '@fortawesome/free-solid-svg-icons'
import MarkdownIt from 'markdown-it'; import MarkdownIt from 'markdown-it';
import i18n from '../i18n';
import { url, lang } from '../config'; import { url, lang } from '../config';
import MkLink from '../components/link.vue';
const markdown = MarkdownIt({ const markdown = MarkdownIt({
html: true html: true
}); });
export default Vue.extend({ export default Vue.extend({
i18n,
metaInfo() { metaInfo() {
return { return {
title: this.title, title: this.title,
}; };
}, },
components: {
MkLink
},
props: { props: {
doc: { doc: {
type: String, type: String,