mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-24 13:09:07 +01:00
38 lines
1.1 KiB
Plaintext
38 lines
1.1 KiB
Plaintext
mixin propTable(props)
|
|
table.props
|
|
thead: tr
|
|
th= common.i18n[lang]['docs']['api']['props']['name']
|
|
th= common.i18n[lang]['docs']['api']['props']['type']
|
|
th= common.i18n[lang]['docs']['api']['props']['optional']
|
|
th= common.i18n[lang]['docs']['api']['props']['description']
|
|
tbody
|
|
each prop in props
|
|
tr
|
|
td.name= prop.name
|
|
td.type
|
|
i= prop.type
|
|
if prop.kind == 'id'
|
|
if prop.entity
|
|
| (
|
|
a(href=`/${lang}/api/entities/${kebab(prop.entity)}`)= prop.entity
|
|
| ID)
|
|
else
|
|
| (ID)
|
|
else if prop.kind == 'entity'
|
|
| (
|
|
a(href=`/${lang}/api/entities/${kebab(prop.entity)}`)= prop.entity
|
|
| )
|
|
else if prop.kind == 'object'
|
|
if prop.def
|
|
| (
|
|
a(href=`#${prop.defName}`)= prop.defName
|
|
| )
|
|
else if prop.kind == 'date'
|
|
| (Date)
|
|
td.optional
|
|
if prop.optional
|
|
= common.i18n[lang]['docs']['api']['props']['yes']
|
|
else
|
|
= common.i18n[lang]['docs']['api']['props']['no']
|
|
td.desc!= prop.desc[lang] || prop.desc['ja']
|