Files
gitbook/theme/templates/page.html
T
2014-04-04 17:40:37 -07:00

65 lines
1.9 KiB
HTML

{% extends "layout.html" %}
{% block title %}{{ title }}{% endblock %}
{% block style %}
{% parent %}
<link rel="stylesheet" href="{{ staticBase }}/print.css">
{% endblock %}
{% block content %}
{# Cover #}
<section id="cover">
<h1>{{ title }}</h1>
<h2>By <a href="{{ githubHost }}{{ githubAuthor }}">@{{ githubAuthor }}</a></h2>
</section>
{# Summary #}
<section id="summary">
<h1>Summary</h1>
<ul class="summary">
<li>
<a href="#README.md">Introduction</a>
</li>
{% for item in summary.chapters %}
<li>
<a href="#{{ item.path }}">{{ item.level }}) {{ item.title }}</a>
{% if item.articles.length > 0 %}
<ul>
{% for article in item.articles %}
<li>
<a href="#{{ article.path }}">{{ article.level }}) {{ article.title }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>
</section>
{# Pages content #}
{% for item in summary.chapters %}
{% if item.articles.length > 0 %}
<section>
<article class="new-chapter">
<h1>{{ item.title }}</h1>
</article>
{% for article in item.articles %}
<article id="{{ article.path }}">
{% for section in pages[article.path].content %}
{% if section.type == "normal" %}
{% autoescape false %}{{ section.content }}{% endautoescape %}
{% endif %}
{% endfor %}
</article>
{% endfor %}
</section>
{% endif %}
{% endfor %}
{% endblock %}
{% block javascript %}{% endblock %}