From 5f5156561fe58b5d842e5505a2293bc94a732a72 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 15 Jul 2018 18:28:08 +0900 Subject: ドキュメントをMarkdownで書くように MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/docs/api/endpoints/style.styl | 21 +++++++++++++++++++++ src/docs/api/endpoints/view.pug | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 src/docs/api/endpoints/style.styl create mode 100644 src/docs/api/endpoints/view.pug (limited to 'src/docs/api/endpoints') diff --git a/src/docs/api/endpoints/style.styl b/src/docs/api/endpoints/style.styl new file mode 100644 index 0000000000..2af9fe9a77 --- /dev/null +++ b/src/docs/api/endpoints/style.styl @@ -0,0 +1,21 @@ +@import "../style" + +#url + padding 8px 12px 8px 8px + font-family Consolas, 'Courier New', Courier, Monaco, monospace + color #fff + background #222e40 + border-radius 4px + + > .method + display inline-block + margin 0 8px 0 0 + padding 0 6px + color #f4fcff + background #17afc7 + border-radius 4px + user-select none + pointer-events none + + > .host + opacity 0.7 diff --git a/src/docs/api/endpoints/view.pug b/src/docs/api/endpoints/view.pug new file mode 100644 index 0000000000..e046b3fc33 --- /dev/null +++ b/src/docs/api/endpoints/view.pug @@ -0,0 +1,38 @@ +extends ../../layout.pug +include ../mixins + +block meta + link(rel="stylesheet" href="/docs/assets/api/endpoints/style.css") + +block main + h1= endpoint + + p#url + span.method POST + span.host + = url.host + | / + span.path= url.path + + p#desc= desc[lang] || desc['ja'] + + section + h2= i18n('docs.api.endpoints.params') + +propTable(params) + + if paramDefs + each paramDef in paramDefs + section(id= paramDef.name) + h3= paramDef.name + +propTable(paramDef.params) + + if res + section + h2= i18n('docs.api.endpoints.res') + +propTable(res) + + if resDefs + each resDef in resDefs + section(id= resDef.name) + h3= resDef.name + +propTable(resDef.props) -- cgit v1.2.3-freya