mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
commit
20df6b4ebe
3 changed files with 22 additions and 10 deletions
|
@ -26,3 +26,6 @@
|
|||
|
||||
.doc-description
|
||||
list-style-type: none
|
||||
|
||||
.codeBlock
|
||||
list-style-type: none
|
|
@ -7,27 +7,36 @@ block content
|
|||
ul.nav.nav-list.list-group.nano-content
|
||||
for component in components
|
||||
a.doc-name(href="##{component.get('name')}")
|
||||
li= component.get('name')
|
||||
li.list-group-item= component.get('name')
|
||||
ul
|
||||
// .list-group for different layout
|
||||
each doc in component.attributes.propertyDocumentation
|
||||
a(href="##{component.get('name')}#{doc.name}")
|
||||
li
|
||||
li.list-group-item
|
||||
| #{doc.name}
|
||||
.col-xs-9.documentation-column.nano
|
||||
ul.nano-content
|
||||
for component in components
|
||||
li(id="#{component.get('name')}")
|
||||
| #{component.get('name')}
|
||||
div(id="#{component.get('name')}" class="panel panel-defalt")
|
||||
div(class="panel-heading")
|
||||
| #{component.get('name')}
|
||||
div(class="panel-body")
|
||||
| #{component.get('description')}
|
||||
ul
|
||||
li.doc-description
|
||||
| #{component.get('description')}
|
||||
ul
|
||||
each doc in component.attributes.propertyDocumentation
|
||||
li(id="#{component.get('name')}#{doc.name}")
|
||||
li.list-group-item(id="#{component.get('name')}#{doc.name}")
|
||||
| #{doc.name}
|
||||
ul.specialList
|
||||
if doc.description[language]
|
||||
li!=marked(doc.description[language])
|
||||
else
|
||||
li!=marked(doc.description)
|
||||
|
||||
li.panel-heading
|
||||
a.codeBlock(data-toggle="collapse" data-parent="##{component.get('name')}" href="##{component.get('name')}Code")
|
||||
| Code
|
||||
div(id="#{component.get('name')}Code" class="panel-collapse collapse")
|
||||
div.panel-body
|
||||
pre
|
||||
| #{component.attributes.code}
|
||||
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ CocoCollection = require 'collections/CocoCollection'
|
|||
LevelComponent = require 'models/LevelComponent'
|
||||
|
||||
class ComponentDocsCollection extends CocoCollection
|
||||
url: '/db/level.component?project=name,description,dependencies,propertyDocumentation'
|
||||
url: '/db/level.component?project=name,description,dependencies,propertyDocumentation,code'
|
||||
model: LevelComponent
|
||||
|
||||
module.exports = class UnnamedView extends RootView
|
||||
|
|
Loading…
Reference in a new issue