123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128 |
- {% 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 %}
- <noscript>
- <style>
- .honkit-cloak {
- display: block !important;
- }
- </style>
- </noscript>
- <script>
- // Restore sidebar state as critical path for prevent layout shift
- function __init__getSidebarState(defaultValue){
- var baseKey = "";
- var key = baseKey + ":sidebar";
- try {
- var value = localStorage[key];
- if (value === undefined) {
- return defaultValue;
- }
- var parsed = JSON.parse(value);
- return parsed == null ? defaultValue : parsed;
- } catch (e) {
- return defaultValue;
- }
- }
- function __init__restoreLastSidebarState() {
- var isMobile = window.matchMedia("(max-width: 600px)").matches;
- if (isMobile) {
- // Init last state if not mobile
- return;
- }
- var sidebarState = __init__getSidebarState(true);
- var book = document.querySelector(".book");
- // Show sidebar if it enabled
- if (sidebarState && book) {
- book.classList.add("without-animation", "with-summary");
- }
- }
- try {
- __init__restoreLastSidebarState();
- } finally {
- var book = document.querySelector(".book");
- book.classList.remove("honkit-cloak");
- }
- </script>
- <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 %}
- <div class="book honkit-cloak">
- <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 %}
- {% include "website/header.html" %}
- <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 %}
- </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 %}
|