summaryrefslogtreecommitdiffstats
path: root/theme
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2014-04-04 14:40:27 -0700
committerSamy Pessé <samypesse@gmail.com>2014-04-04 14:40:27 -0700
commitb3adedb468231e1a8497607ceb7455d58037c2c4 (patch)
tree44ef8c3e2ca6b82e18cd295f2da9368a22246ece /theme
parent026e4362d825f004c4eb9a6471dc5bb91bbac198 (diff)
downloadgitbook-b3adedb468231e1a8497607ceb7455d58037c2c4.zip
gitbook-b3adedb468231e1a8497607ceb7455d58037c2c4.tar.gz
gitbook-b3adedb468231e1a8497607ceb7455d58037c2c4.tar.bz2
Add base for generating single page html
Diffstat (limited to 'theme')
-rw-r--r--theme/templates/layout.html2
-rw-r--r--theme/templates/page.html18
2 files changed, 20 insertions, 0 deletions
diff --git a/theme/templates/layout.html b/theme/templates/layout.html
index dd319d0..3057f4b 100644
--- a/theme/templates/layout.html
+++ b/theme/templates/layout.html
@@ -37,9 +37,11 @@
</head>
<body>
{% block content %}{% endblock %}
+ {% block javascript %}
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.1.3/ace.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.1.3/mode-javascript.js"></script>
<script src="{{ staticBase }}/jsrepl/jsrepl.js" id="jsrepl-script"></script>
<script src="{{ staticBase }}/app.js"></script>
+ {% endblock %}
</body>
</html>
diff --git a/theme/templates/page.html b/theme/templates/page.html
new file mode 100644
index 0000000..8b1048d
--- /dev/null
+++ b/theme/templates/page.html
@@ -0,0 +1,18 @@
+{% extends "layout.html" %}
+
+{% block title %}{{ title }}{% endblock %}
+
+{% block content %}
+ {% for page in pages %}
+ <hr>
+ <article id="{{ page.path }}">
+ {% for section in page.content %}
+ {% if section.type == "normal" %}
+ {% autoescape false %}{{ section.content }}{% endautoescape %}
+ {% endif %}
+ {% endfor %}
+ </article>
+ {% endfor %}
+{% endblock %}
+
+{% block javascript %}{% endblock %} \ No newline at end of file