diff options
Diffstat (limited to 'src/docs')
| -rw-r--r-- | src/docs/api/endpoints/view.pug | 15 | ||||
| -rw-r--r-- | src/docs/style.styl | 4 |
2 files changed, 13 insertions, 6 deletions
diff --git a/src/docs/api/endpoints/view.pug b/src/docs/api/endpoints/view.pug index 809fc07204..e7bfba086e 100644 --- a/src/docs/api/endpoints/view.pug +++ b/src/docs/api/endpoints/view.pug @@ -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 diff --git a/src/docs/style.styl b/src/docs/style.styl index d31da7e8ee..95b5b0da52 100644 --- a/src/docs/style.styl +++ b/src/docs/style.styl @@ -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 |