gitbook-plugin-theme-cuav
Version:
CUAV theme for GitBook
101 lines (91 loc) • 3.81 kB
HTML
{###
Modified By 黄伟枞<weicong@cuav.net>
Modify:
1. 新增 bootstrap_js block
2. body block 新增 {% include "./includes/navbar.html" %}
3. 在 book-summary 的 div 前增加 {% include "website/header.html" %}
4. 将 {% include "website/header.html" %} 从 book_inner block 中移到
book_inner block 之后
###}
{% extends "./layout.html" %}
{% block title %}{{ page.title }} · {{ super() }}{% endblock %}
{% block description %}{{ page.description }}{% endblock %}
{% block head %}
{{ super() }}
{% if page.next and page.next.path %}
<link rel="next" href="{{ page.next.path|resolveFile }}" />
{% endif %}
{% if page.previous and page.previous.path %}
<link rel="prev" href="{{ page.previous.path|resolveFile }}" />
{% endif %}
{% endblock %}
{% block javascript %}
{% block bootstrap_js %}
<script src="{{ "jquery.slim.min.js"|resolveAsset }}"></script>
<script src="{{ "tether.min.js"|resolveAsset }}"></script>
<script src="{{ "bootstrap.min.js"|resolveAsset }}"></script>
{% endblock %}
<script src="{{ "gitbook.js"|resolveAsset }}"></script>
<script src="{{ "theme.js"|resolveAsset }}"></script>
{% for resource in plugins.resources.js %}
{% if resource.url %}
<script src="{{ resource.url }}"></script>
{% else %}
<script src="{{ resource.path|resolveAsset }}"></script>
{% endif %}
{% endfor %}
{% endblock %}
{% block body %}
{% include "./includes/navbar.html" %}
<div class="book">
{% include "website/header.html" %}
<div class="book-summary">
{% block book_sidebar %}
{% block search_input %}{% endblock %}
{% block book_summary %}
<nav role="navigation">
{% include "website/summary.html" %}
</nav>
{% endblock %}
{% endblock %}
</div>
<div class="book-body">
{% block book_body %}
<div class="body-inner">
{% block book_inner %}
<div class="page-wrapper" tabindex="-1" role="main">
<div class="page-inner">
{% block search_results %}
<section class="normal markdown-section">
{% block page %}
{{ page.content|safe }}
{% endblock %}
</section>
{% endblock %}
</div>
</div>
{% endblock %}
{% include "./includes/footer.html" %}
</div>
{% block book_navigation %}
{% if page.previous and page.previous.path %}
<a href="{{ page.previous.path|resolveFile }}{{ page.previous.anchor }}" class="navigation navigation-prev {% if not (page.next and page.next.path) %}navigation-unique{% endif %}" aria-label="Previous page: {{ page.previous.title }}">
<i class="fa fa-angle-left"></i>
</a>
{% endif %}
{% if page.next and page.next.path %}
<a href="{{ page.next.path|resolveFile }}{{ page.next.anchor }}" class="navigation navigation-next {% if not (page.previous and page.previous.path) %}navigation-unique{% endif %}" aria-label="Next page: {{ page.next.title }}">
<i class="fa fa-angle-right"></i>
</a>
{% endif %}
{% endblock %}
{% endblock %}
</div>
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({{ template.getJSContext()|dump|safe }});
});
</script>
</div>
{% endblock %}