codecombat/app/templates/docs/components-documentation-view.jade

45 lines
1.9 KiB
Text
Raw Normal View History

.container
.pull-right
button.btn.btn-primary#toggle-all-component-code Toggle all code
.clearfix
.row
.col-xs-3.index-column.nano
ul.nav.nav-list.list-group.nano-content
for component in components
2014-07-14 14:18:17 -04:00
a.doc-name(href="##{component.get('name')}")
li.list-group-item= component.get('system') + '.' + component.get('name')
2014-07-14 14:18:17 -04:00
ul
2014-07-20 19:23:01 -04:00
// .list-group for different layout
2014-09-18 19:39:50 -04:00
each doc in (component.attributes.propertyDocumentation ? component.attributes.propertyDocumentation : [])
2014-07-14 14:18:17 -04:00
a(href="##{component.get('name')}#{doc.name}")
2014-07-20 19:23:01 -04:00
li.list-group-item
2014-07-14 14:18:17 -04:00
| #{doc.name}
.col-xs-9.documentation-column.nano
ul.nano-content
for component in components
2014-07-20 19:23:01 -04:00
div(id="#{component.get('name')}" class="panel panel-defalt")
div(class="panel-heading")
strong= component.get('system') + '.' + component.get('name')
2014-07-20 19:23:01 -04:00
div(class="panel-body")
| #{component.get('description')}
2014-07-14 14:18:17 -04:00
ul
2014-09-18 19:39:50 -04:00
each doc in (component.attributes.propertyDocumentation ? component.attributes.propertyDocumentation : [])
2014-07-20 19:23:01 -04:00
li.list-group-item(id="#{component.get('name')}#{doc.name}")
2014-07-14 14:18:17 -04:00
| #{doc.name}
ul.special-list
if doc.description[codeLanguage]
li!=marked(doc.description[codeLanguage])
2014-07-16 20:18:06 -04:00
else
2014-07-20 19:23:01 -04:00
li!=marked(doc.description)
li.panel-heading
a.code-block(data-toggle="collapse" data-parent="##{component.get('name')}" href="##{component.get('name')}Code")
2014-07-20 19:23:01 -04:00
| Code
div(id="#{component.get('name')}Code" class="panel-collapse collapse")
div.panel-body
pre
| #{component.attributes.code}
.clearfix
.clearfix
.clearfix