iceshrimp-161sh/src/web/docs/api/mixins.pug

34 lines
783 B
Plaintext
Raw Normal View History

2017-12-14 16:23:45 +01:00
mixin propTable(props)
table.props
thead: tr
th Name
th Type
th Optional
th Description
tbody
each prop in props
tr
td.name= prop.name
td.type
i= prop.type
if prop.kind == 'id'
if prop.entity
| (
2017-12-16 17:41:22 +01:00
a(href=`/${lang}/api/entities/${kebab(prop.entity)}`)= prop.entity
2017-12-14 16:23:45 +01:00
| ID)
else
| (ID)
else if prop.kind == 'entity'
| (
2017-12-16 17:41:22 +01:00
a(href=`/${lang}/api/entities/${kebab(prop.entity)}`)= prop.entity
2017-12-14 16:23:45 +01:00
| )
else if prop.kind == 'object'
if prop.def
| (
a(href=`#${prop.defName}`)= prop.defName
| )
else if prop.kind == 'date'
| (Date)
td.optional= prop.optional.toString()
2017-12-14 22:41:57 +01:00
td.desc!= prop.desc[lang] || prop.desc['ja']