2
|
|
|
|
|
|
|
|
2
|
1 outputs.
|
3
|
|
|
|
|
|
def jade(body):
lines = body.splitlines(True)
if body.startswith("```"):
lines.pop(0)
if body.rstrip().endswith("```"):
lines.pop()
return __import__("pyjade").process("".join(lines))
|
|
7
|
1 outputs.
|
4
|
|
|
|
|
|
shape =\
```jade
main
head
section(role="feed")
article(aria-posinset=1, aria-setsize=12)
form(id, aria)
fieldset(name=cell)
legend input
label(for="cell-input")
div.source(id="cell-input", contenteditable="false", role="textbox").
some code that we will
compute with
fieldset(name="commands", form)
legend commands
button ⏪
button ⏹️
button ▶️
button ⏩
fieldset(name="metadata", form)
legend information
label in
input(type="number", disabled="", value=2)
label start
input(type="time", disabled="", value="14:32")
label stop
input(type="time", disabled="", value="14:33")
fieldset(name="tags")
legend tags
label slide
fieldset(name="outputs", form)
legend outputs
fieldset.stderr
label ⚠
output.warning
samp warning
fieldset.stderr
label ✘
output.error
samp error
fieldset.stdout
label ☑
output.stdout
samp "hello world"
fieldset.display-data
fieldset(name="metadata")
label out
input(type="number", disabled="", value=2)
output(markdown="true").
# some markdown
to remember
```
...
{% set html = jade(shape) %}
```html
{{html}}
```
{{html}}
|
|
62
|
1 outputs.
|