Templates for homepage and markdown posts.
Signed-off-by: HE, Tao <sighingnow@gmail.com>
This commit is contained in:
33
_includes/body.html
Normal file
33
_includes/body.html
Normal file
@@ -0,0 +1,33 @@
|
||||
<div class="body-inner">
|
||||
<div class="book-header" role="navigation">
|
||||
<!-- Title -->
|
||||
<h1>
|
||||
<i class="fa fa-circle-o-notch fa-spin"></i>
|
||||
{% if page.title %}
|
||||
<a href="." >{{ page.title | escape }}</a>
|
||||
{% else %}
|
||||
<a href="." >{{ site.title | escape }}</a>
|
||||
{% endif %}
|
||||
</h1>
|
||||
</div>
|
||||
<div class="page-wrapper" tabindex="-1" role="main">
|
||||
<div class="page-inner">
|
||||
<div id="book-search-results">
|
||||
<div class="search-noresults">
|
||||
<section class="normal markdown-section">
|
||||
|
||||
{% if page.title %}
|
||||
<h1 id="{{ page.id }}">{{ page.title | escape }}</h1>
|
||||
{% else %}
|
||||
<h1 id="{{ page.id }}">{{ site.title | escape }}</h1>
|
||||
{% endif %}
|
||||
|
||||
{{ content }}
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<!-- {%- include search.html -%} -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
10
_includes/footer.html
Normal file
10
_includes/footer.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<script src="{{site.url}}/gitbook/gitbook.js"></script>
|
||||
<script src="{{site.url}}/gitbook/theme.js"></script>
|
||||
|
||||
<script src="{{site.url}}/gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
|
||||
<script src="{{site.url}}/gitbook/gitbook-plugin-sharing/buttons.js"></script>
|
||||
|
||||
<!-- <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
|
||||
<script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
|
||||
<script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
|
||||
<script src="../gitbook/gitbook-plugin-search/search.js"></script> -->
|
34
_includes/head.html
Normal file
34
_includes/head.html
Normal file
@@ -0,0 +1,34 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
||||
|
||||
{%- if page.title -%}
|
||||
<title>{{ page.title | escape }} · {{ site.title | escape }}</title>
|
||||
{%- else -%}
|
||||
<title>{{ site.title | escape }}</title>
|
||||
{%- endif -%}
|
||||
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="description" content="{{site.description}}">
|
||||
|
||||
{%- if site.gitbook_version -%}
|
||||
<meta name="generator" content="Jekyll (using style of GitBook {{ site.gitbook_version | escape }})">
|
||||
{%- else -%}
|
||||
<meta name="generator" content="Jekyll (using style of GitBook)">
|
||||
{%- endif -%}
|
||||
|
||||
{%- if site.author -%}
|
||||
<meta name="author" content="{{ site.author | escape }}">
|
||||
{%- endif -%}
|
||||
|
||||
<link rel="stylesheet" href="{{site.url}}/gitbook/style.css">
|
||||
<link rel="stylesheet" href="{{site.url}}/gitbook/gitbook-plugin-fontsettings/website.css">
|
||||
<!-- <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css"> -->
|
||||
|
||||
<link rel="stylesheet" href="{{site.url}}/gitbook/rouge-highlight-colorful.css">
|
||||
|
||||
<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="{{site.url}}/gitbook/images/apple-touch-icon-precomposed-152.png">
|
||||
<link rel="shortcut icon" href="{{site.url}}/gitbook/images/favicon.ico" type="image/x-icon">
|
22
_includes/metadata-home.json.tpl
Normal file
22
_includes/metadata-home.json.tpl
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"page": {
|
||||
"title": "Introduction",
|
||||
"level": "1.1",
|
||||
"depth": 1,
|
||||
{% assign reversed_posts = site.posts | reverse %}
|
||||
|
||||
{% if reversed_posts %}
|
||||
"next": {
|
||||
"title": "{{reversed_posts.first.title}}",
|
||||
"level": "1.2",
|
||||
"depth": 1,
|
||||
"path": "{{reversed_posts.first.path}}",
|
||||
"ref": "{{reversed_posts.first.path}}",
|
||||
"articles": []
|
||||
},
|
||||
{% endif %}
|
||||
"dir": "ltr"
|
||||
},
|
||||
|
||||
{%- include metadata.json.tpl -%}
|
||||
}
|
20
_includes/metadata-post.json.tpl
Normal file
20
_includes/metadata-post.json.tpl
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"page": {
|
||||
"title": "Introduction",
|
||||
"level": "1.1",
|
||||
"depth": 1,
|
||||
{% if page.next %}
|
||||
"next": {
|
||||
"title": "{{page.next.title}}",
|
||||
"level": "1.2",
|
||||
"depth": 1,
|
||||
"path": "{{page.next.path}}",
|
||||
"ref": "{{page.next.path}}",
|
||||
"articles": []
|
||||
},
|
||||
{% endif %}
|
||||
"dir": "ltr"
|
||||
},
|
||||
|
||||
{%- include metadata.json.tpl -%}
|
||||
}
|
82
_includes/metadata.json.tpl
Normal file
82
_includes/metadata.json.tpl
Normal file
@@ -0,0 +1,82 @@
|
||||
"config": {
|
||||
"plugins": ["fontsettings", "highlight", "livereload", "lunr", "search", "sharing", "theme-default", "livereload"],
|
||||
"styles": {
|
||||
"ebook": "styles/ebook.css",
|
||||
"epub": "styles/epub.css",
|
||||
"mobi": "styles/mobi.css",
|
||||
"pdf": "styles/pdf.css",
|
||||
"print": "styles/print.css",
|
||||
"website": "styles/website.css"
|
||||
},
|
||||
"pluginsConfig": {
|
||||
"fontsettings": {
|
||||
"family": "sans",
|
||||
"size": 2,
|
||||
"theme": "white"
|
||||
},
|
||||
"highlight": {},
|
||||
"livereload": {},
|
||||
"lunr": {
|
||||
"ignoreSpecialCharacters": false,
|
||||
"maxIndexSize": 1000000
|
||||
},
|
||||
"search": {},
|
||||
"sharing": {
|
||||
"all": ["facebook", "google", "twitter", "weibo", "instapaper"],
|
||||
"facebook": true,
|
||||
"google": false,
|
||||
"instapaper": false,
|
||||
"twitter": true,
|
||||
"vk": false,
|
||||
"weibo": false
|
||||
},
|
||||
"theme-default": {
|
||||
"showLevel": false,
|
||||
"styles": {
|
||||
"ebook": "styles/ebook.css",
|
||||
"epub": "styles/epub.css",
|
||||
"mobi": "styles/mobi.css",
|
||||
"pdf": "styles/pdf.css",
|
||||
"print": "styles/print.css",
|
||||
"website": "styles/website.css"
|
||||
}
|
||||
}
|
||||
},
|
||||
"theme": "default",
|
||||
"author": "Tao He",
|
||||
"pdf": {
|
||||
"pageNumbers": true,
|
||||
"fontSize": 12,
|
||||
"fontFamily": "Arial",
|
||||
"paperSize": "a4",
|
||||
"chapterMark": "pagebreak",
|
||||
"pageBreaksBefore": "/",
|
||||
"margin": {
|
||||
"right": 62,
|
||||
"left": 62,
|
||||
"top": 56,
|
||||
"bottom": 56
|
||||
}
|
||||
},
|
||||
"structure": {
|
||||
"langs": "LANGS.md",
|
||||
"readme": "README.md",
|
||||
},
|
||||
"variables": {},
|
||||
"title": "{{site.title}}",
|
||||
"language": "en",
|
||||
"gitbook": "*"
|
||||
},
|
||||
"file": {
|
||||
"path": "{{ page.path }}",
|
||||
"mtime": "{{ page.date }}",
|
||||
"type": "markdown"
|
||||
},
|
||||
"gitbook": {
|
||||
"version": "{{site.url}}",
|
||||
"time": "{{site.time}}"
|
||||
},
|
||||
"basePath": "{{site.url}}",
|
||||
"book": {
|
||||
"language": ""
|
||||
}
|
9
_includes/search.html
Normal file
9
_includes/search.html
Normal file
@@ -0,0 +1,9 @@
|
||||
<div class="search-results">
|
||||
<div class="has-results">
|
||||
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
|
||||
<ul class="search-results-list"></ul>
|
||||
</div>
|
||||
<div class="no-results">
|
||||
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
|
||||
</div>
|
||||
</div>
|
42
_includes/toc-date.html
Normal file
42
_includes/toc-date.html
Normal file
@@ -0,0 +1,42 @@
|
||||
<div class="book-summary">
|
||||
<div id="book-search-input" role="search">
|
||||
<input type="text" placeholder="Type to search" />
|
||||
</div>
|
||||
<nav role="navigation">
|
||||
<ul class="summary">
|
||||
{% if page.url == "/index.html" or page.url == "/" %}
|
||||
<li class="chapter active" data-level="1.1" data-path="{{site.url}}">
|
||||
{% else %}
|
||||
<li class="chapter" data-level="1.1" data-path="{{site.url}}">
|
||||
{% endif %}
|
||||
<a href="{{site.url}}">
|
||||
{{ site.title | escape }}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="divider"></li>
|
||||
|
||||
{% assign reversed_posts = site.posts | reverse %}
|
||||
|
||||
{% for post in reversed_posts %}
|
||||
{% if page.url == post.url %}
|
||||
<li class="chapter active" data-level="1.2" data-path="{{post.url}}">
|
||||
{% else %}
|
||||
<li class="chapter" data-level="1.1" data-path="{{post.url}}">
|
||||
{% endif %}
|
||||
<a href="{{post.url}}">
|
||||
{{ post.title | escape }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
|
||||
<li class="divider"></li>
|
||||
|
||||
<li>
|
||||
<a href="https://github.com/sighingnow/jekyll-gitbook" target="blank" class="gitbook-link">
|
||||
Fork it Now!
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
Reference in New Issue
Block a user