Improve docs

This commit is contained in:
syuilo
2018-07-16 06:19:19 +09:00
parent 1e921a9fd5
commit 168d13d6e6
5 changed files with 26 additions and 11 deletions

View File

@ -5,7 +5,7 @@ block meta
link(rel="stylesheet" href="/docs/assets/api/endpoints/style.css")
block main
h1= endpoint
h1= title
p#url
span.method POST
@ -14,10 +14,13 @@ block main
| /
span.path= url.path
if desc
p#desc= desc[lang] || desc['ja']
if endpoint.desc
p#desc= endpoint.desc[lang] || endpoint.desc['ja']
if params
if endpoint.requireCredential
div.ui.info: p= i18n('docs.api.endpoints.require-credential')
if params && Object.keys(params).length > 0
section
h2= i18n('docs.api.endpoints.params')
+propTable(params)
@ -27,6 +30,10 @@ block main
section(id= paramDef.name)
h3= paramDef.name
+propTable(paramDef.params)
if params && Object.keys(params).length == 0
section
h2= i18n('docs.api.endpoints.params')
p= i18n('docs.api.endpoints.no-params')
if res
section

View File

@ -7,7 +7,7 @@ body
word-break break-word
main
margin 0 0 0 300px
margin 0 0 0 330px
padding 64px
width 100%
max-width 800px
@ -53,7 +53,7 @@ nav
z-index 10000
top 0
left 0
width 300px
width 330px
height 100%
overflow auto
padding 32px