diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-12-15 00:23:45 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-12-15 00:23:45 +0900 |
| commit | d6ec5f2fe13bb1e3f4316f04591bf419f587c2bd (patch) | |
| tree | e6c027442f2cbc285391e34f927ab6d3f9eb2e1a /src/web/docs/api/mixins.pug | |
| parent | :v: (diff) | |
| download | sharkey-d6ec5f2fe13bb1e3f4316f04591bf419f587c2bd.tar.gz sharkey-d6ec5f2fe13bb1e3f4316f04591bf419f587c2bd.tar.bz2 sharkey-d6ec5f2fe13bb1e3f4316f04591bf419f587c2bd.zip | |
:v:
Diffstat (limited to 'src/web/docs/api/mixins.pug')
| -rw-r--r-- | src/web/docs/api/mixins.pug | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/web/docs/api/mixins.pug b/src/web/docs/api/mixins.pug new file mode 100644 index 0000000000..b302c78263 --- /dev/null +++ b/src/web/docs/api/mixins.pug @@ -0,0 +1,33 @@ +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 + | ( + a(href=`/docs/api/entities/${kebab(prop.entity)}`)= prop.entity + | ID) + else + | (ID) + else if prop.kind == 'entity' + | ( + a(href=`/docs/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= prop.optional.toString() + td.desc: +i18n(prop.desc) |