fix
This commit is contained in:
36
book/node_modules/@honkit/honkit-plugin-theme-default/_layouts/ebook/page.html
generated
vendored
Normal file
36
book/node_modules/@honkit/honkit-plugin-theme-default/_layouts/ebook/page.html
generated
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
{% extends "layout.html" %}
|
||||
|
||||
{% block title %}{{ page.title }}{% endblock %}
|
||||
{% block description %}{{ page.description }}{% endblock %}
|
||||
|
||||
{% block style %}
|
||||
{### Include theme css before plugins css ###}
|
||||
{% if not fileExists(config.styles.print) %}
|
||||
{% if options.format %}
|
||||
<link rel="stylesheet" href="{{ (options.format + ".css")|resolveAsset }}">
|
||||
{% else %}
|
||||
<link rel="stylesheet" href="{{ "ebook.css"|resolveAsset }}">
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{{ super() }}
|
||||
|
||||
{### Custom stylesheets for the book ###}
|
||||
|
||||
{% for type, style in config.styles %}
|
||||
{% if fileExists(style) and (type == "ebook" or type == "print" or type == options.format) %}
|
||||
<link rel="stylesheet" href="{{ style|resolveFile }}">
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="page">
|
||||
{% block page %}
|
||||
<h1 class="book-chapter book-chapter-{{ page.depth }}">{{ page.title }}</h1>
|
||||
<div class="section">
|
||||
{{ page.content|safe }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% endblock %}
|
8
book/node_modules/@honkit/honkit-plugin-theme-default/_layouts/ebook/pdf_footer.html
generated
vendored
Normal file
8
book/node_modules/@honkit/honkit-plugin-theme-default/_layouts/ebook/pdf_footer.html
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
{% extends "./page.html" %}
|
||||
|
||||
{% block body %}
|
||||
<div class="pdf-footer">
|
||||
<span>{{ page.section }}</span>
|
||||
<span class="footer-pages-count">{{ page.num }}</span>
|
||||
</div>
|
||||
{% endblock %}
|
7
book/node_modules/@honkit/honkit-plugin-theme-default/_layouts/ebook/pdf_header.html
generated
vendored
Normal file
7
book/node_modules/@honkit/honkit-plugin-theme-default/_layouts/ebook/pdf_header.html
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
{% extends "./page.html" %}
|
||||
|
||||
{% block body %}
|
||||
<div class="pdf-header">
|
||||
<span>{{ page.title }}</span>
|
||||
</div>
|
||||
{% endblock %}
|
58
book/node_modules/@honkit/honkit-plugin-theme-default/_layouts/ebook/summary.html
generated
vendored
Normal file
58
book/node_modules/@honkit/honkit-plugin-theme-default/_layouts/ebook/summary.html
generated
vendored
Normal file
@ -0,0 +1,58 @@
|
||||
{% extends "./page.html" %}
|
||||
|
||||
{% block title %}{{ "SUMMARY"|t }}{% endblock %}
|
||||
|
||||
{% macro articles(_articles) %}
|
||||
{% for article in _articles %}
|
||||
<li>
|
||||
<span class="inner">
|
||||
{% if article.path or article.url %}
|
||||
{% if article.path %}
|
||||
<a href="{{ article.path|contentURL }}{{ article.anchor }}">{{ article.title }}</a>
|
||||
{% else %}
|
||||
<a target="_blank" href="{{ article.url }}">{{ article.title }}</a>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<span>{{ article.title }}</span>
|
||||
{% endif %}
|
||||
{% if 1 %}
|
||||
<span class="page">{{ article.level }}</span>
|
||||
{% endif %}
|
||||
</span>
|
||||
{% if article.articles.length > 0 %}
|
||||
<ol>
|
||||
{{ articles(article.articles) }}
|
||||
</ol>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endmacro %}
|
||||
|
||||
{% block page %}
|
||||
<div class="section toc">
|
||||
<h1>{{ "SUMMARY"|t }}</h1>
|
||||
<ol>
|
||||
{% for part in summary.parts %}
|
||||
{% if part.title %}
|
||||
<li class="part-title">
|
||||
<h2>{{ part.title }}</h2>
|
||||
</li>
|
||||
{% endif %}
|
||||
{{ articles(part.articles) }}
|
||||
|
||||
{% if not loop.last %}
|
||||
<li class="divider"></li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if glossary.path %}
|
||||
<li>
|
||||
<span class="inner">
|
||||
<a href="{{ ('/' + glossary.path)|contentURL }}">{{ "GLOSSARY"|t }}</a>
|
||||
</span>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ol>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
26
book/node_modules/@honkit/honkit-plugin-theme-default/_layouts/layout.html
generated
vendored
Normal file
26
book/node_modules/@honkit/honkit-plugin-theme-default/_layouts/layout.html
generated
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="{{ config.language }}" {% if page.dir == "rtl" %}dir="rtl"{% endif %}>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>{% block title %}{{ config.title|d("HonKit", true) }}{% endblock %}</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="description" content="{% block description %}{% endblock %}">
|
||||
<meta name="generator" content="HonKit {{ gitbook.version }}">
|
||||
{% if config.author %}<meta name="author" content="{{ config.author }}">{% endif %}
|
||||
{% if config.isbn %}<meta name="identifier" content="{{ config.isbn }}" scheme="ISBN">{% endif %}
|
||||
{% block style %}
|
||||
{% for resource in plugins.resources.css %}
|
||||
{% if resource.url %}
|
||||
<link rel="stylesheet" href="{{ resource.url }}">
|
||||
{% else %}
|
||||
<link rel="stylesheet" href="{{ resource.path|resolveAsset }}">
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
{% block head %}{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
{% block body %}{% endblock %}
|
||||
{% block javascript %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
13
book/node_modules/@honkit/honkit-plugin-theme-default/_layouts/website/header.html
generated
vendored
Normal file
13
book/node_modules/@honkit/honkit-plugin-theme-default/_layouts/website/header.html
generated
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
{% block book_header %}
|
||||
<div class="book-header" role="navigation">
|
||||
{% if glossary.path %}
|
||||
<a href="{{ ('/' + glossary.path)|resolveFile }}" class="btn pull-left" aria-label="{{ "GLOSSARY_OPEN"|t }}"><i class="fa fa-sort-alpha-asc"></i></a>
|
||||
{% endif %}
|
||||
|
||||
<!-- Title -->
|
||||
<h1>
|
||||
<i class="fa fa-circle-o-notch fa-spin"></i>
|
||||
<a href="{{ "/"|resolveFile }}" >{{ page.title }}</a>
|
||||
</h1>
|
||||
</div>
|
||||
{% endblock %}
|
19
book/node_modules/@honkit/honkit-plugin-theme-default/_layouts/website/languages.html
generated
vendored
Normal file
19
book/node_modules/@honkit/honkit-plugin-theme-default/_layouts/website/languages.html
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
{% extends "./layout.html" %}
|
||||
|
||||
{% block title %}{{ "LANGS_CHOOSE"|t }} · {{ super() }}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="book-langs-index" role="navigation">
|
||||
<div class="inner">
|
||||
<h3>{{ "LANGS_CHOOSE"|t }}</h3>
|
||||
|
||||
<ul class="languages">
|
||||
{% for lang in languages.list %}
|
||||
<li>
|
||||
<a href="{{ (lang.id + "/README.md")|contentURL }}">{{ lang.title }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
28
book/node_modules/@honkit/honkit-plugin-theme-default/_layouts/website/layout.html
generated
vendored
Normal file
28
book/node_modules/@honkit/honkit-plugin-theme-default/_layouts/website/layout.html
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
{% extends "layout.html" %}
|
||||
|
||||
{% block head %}
|
||||
{{ super() }}
|
||||
<meta name="HandheldFriendly" content="true"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="{{ "images/apple-touch-icon-precomposed-152.png"|resolveAsset }}">
|
||||
<link rel="shortcut icon" href="{{ "images/favicon.ico"|resolveAsset }}" type="image/x-icon">
|
||||
{% endblock %}
|
||||
|
||||
{% block style %}
|
||||
{### Include theme css before plugins css ###}
|
||||
<link rel="stylesheet" href="{{ "style.css"|resolveAsset }}">
|
||||
|
||||
{{ super() }}
|
||||
|
||||
{### Custom stylesheets for the book ###}
|
||||
|
||||
{% for type, style in config.styles %}
|
||||
{% if fileExists(style) and type == "website" %}
|
||||
<link rel="stylesheet" href="{{ style|resolveFile }}">
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}{% endblock %}
|
128
book/node_modules/@honkit/honkit-plugin-theme-default/_layouts/website/page.html
generated
vendored
Normal file
128
book/node_modules/@honkit/honkit-plugin-theme-default/_layouts/website/page.html
generated
vendored
Normal file
@ -0,0 +1,128 @@
|
||||
{% 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 %}
|
61
book/node_modules/@honkit/honkit-plugin-theme-default/_layouts/website/summary.html
generated
vendored
Normal file
61
book/node_modules/@honkit/honkit-plugin-theme-default/_layouts/website/summary.html
generated
vendored
Normal file
@ -0,0 +1,61 @@
|
||||
{% macro articles(_articles) %}
|
||||
{% for article in _articles %}
|
||||
<li class="chapter {% if article.path == file.path and not article.anchor %}active{% endif %}" data-level="{{ article.level }}" {% if article.path %}data-path="{{ article.path|resolveFile }}"{% endif %}>
|
||||
{% if article.path and getPageByPath(article.path) %}
|
||||
<a href="{{ article.path|resolveFile }}{{ article.anchor }}">
|
||||
{% elif article.url %}
|
||||
<a target="_blank" href="{{ article.url }}">
|
||||
{% else %}
|
||||
<span>
|
||||
{% endif %}
|
||||
{% if article.level != "0" and config.pluginsConfig['theme-default'].showLevel %}
|
||||
<b>{{ article.level }}.</b>
|
||||
{% endif %}
|
||||
{{ article.title }}
|
||||
{% if article.path or article.url %}
|
||||
</a>
|
||||
{% else %}
|
||||
</span>
|
||||
{% endif %}
|
||||
|
||||
{% if article.articles.length > 0 %}
|
||||
<ul class="articles">
|
||||
{{ articles(article.articles, file, config) }}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endmacro %}
|
||||
|
||||
<ul class="summary">
|
||||
{% set _divider = false %}
|
||||
{% if config.links.sidebar %}
|
||||
{% for linkTitle, link in config.links.sidebar %}
|
||||
{% set _divider = true %}
|
||||
<li>
|
||||
<a href="{{ link }}" target="_blank" class="custom-link">{{ linkTitle }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if _divider %}
|
||||
<li class="divider"></li>
|
||||
{% endif %}
|
||||
|
||||
{% for part in summary.parts %}
|
||||
{% if part.title %}
|
||||
<li class="header">{{ part.title }}</li>
|
||||
{% elif not loop.first %}
|
||||
<li class="divider"></li>
|
||||
{% endif %}
|
||||
{{ articles(part.articles, file, config) }}
|
||||
{% endfor %}
|
||||
|
||||
<li class="divider"></li>
|
||||
|
||||
<li>
|
||||
<a href="https://github.com/honkit/honkit" target="blank" class="gitbook-link">
|
||||
{{ "GITBOOK_LINK"|t }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
Reference in New Issue
Block a user