This commit is contained in:
2025-05-12 05:38:44 +09:00
parent dced21c3f8
commit 6d78bfa46e
8120 changed files with 1161564 additions and 0 deletions

View 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 %}

View 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 %}

View 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 %}

View 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 %}

View 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>