forked from slab/quill
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docs.html
121 lines (115 loc) · 3.87 KB
/
docs.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
---
layout: default
---
<!-- head -->
<link href="https://fonts.googleapis.com/css?family=Inconsolata">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.css">
<!-- head -->
{% if page.permalink contains '/docs' %}
{% assign items = site.data.docs %}
{% assign category = "Documentation" %}
{% else %}
{% assign category = "Guides" %}
{% assign items = site.data.guides %}
{% endif %}
{% assign flattenedItems = "" | split: "" %}
{% assign parts = "" | split: "" %}
{% for item in items %}
{% assign flattenedItems = flattenedItems | push: item %}
{% if item.children != null %}
{% for child in item.children %}
{% unless child.url contains '#' %}
{% assign flattenedItems = flattenedItems | push: child %}
{% if child.url == page.permalink %}
{% assign parts = parts | push: item.title | push: child.title %}
{% endif %}
{% endunless %}
{% endfor %}
{% endif %}
{% if item.url == page.permalink %}
{% assign parts = parts | push: item.title %}
{% endif %}
{% endfor %}
<div id="docs-wrapper" class="container">
<div class="row">
<div id="sidebar-container" class="three columns">
<button class="sidebar-button">Document Navigation</button>
<ul class="sidebar-list">
<li class="search-item"><input type="text"></li>
{% include sidebar.html items=items %}
</ul>
</div>
<div id="docs-container" class="nine columns">
<div class="row">
<span class="breadcrumb">
<span>{{ category }}:</span>
<span>{{ parts | join: ' / ' }}</span>
</span>
<a class="edit-link" href="{{site.github}}/{{page.path}}" target="_blank" title="Edit on Github">
{% include svg/octocat.svg %}
<span>Edit on Github</span>
</a>
</div>
<hr>
<div id="content-container">
{% if page.stability == "review" %}
<div class="alert alert-warning">This page needs to be reviewed.</div>
{% elsif page.stability == "incomplete" %}
<div class="alert alert-warning">This page is incomplete.</div>
{% endif %}
<h1 id="{{ page.title | handelize | downcase }}">{{ page.title }}</h1>
{{ content }}
</div>
<div class="row" id="pagination-container">
{% for item in flattenedItems %}
{% if page.permalink == item.url %}
{% assign next = flattenedItems[forloop.index] %}
{% unless forloop.first %}
<a class="prev" href="{{ prev.url }}">
<span class="label">{{ prev.title }}</span>
<span class="arrow">
<span class="tip"></span>
<span class="shaft"></span>
</span>
</a>
{% endunless %}
{% unless forloop.last %}
<a class="next" href="{{ next.url }}">
<span class="label">{{ next.title }}</span>
<span class="arrow">
<span class="tip"></span>
<span class="shaft"></span>
</span>
</a>
{% endunless %}
{% endif %}
{% assign prev = item %}
{% endfor %}
</div>
</div>
</div>
<div class="row">
<hr>
</div>
{% include open-source.html %}
</div>
<!-- script -->
<script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('h1, h2, h3, h4', $('#docs-container')).each(function(i, h) {
if (!h.id) return;
$('<a class="anchor" href="#' + h.id + '"></a>').prependTo($(h));
});
$('#sidebar-container .sidebar-button').click(function() {
$('#sidebar-container').toggleClass('active');
});
docsearch({
apiKey: '281facf513620e95600126795a00ab6c',
indexName: 'quilljs',
inputSelector: '.search-item input',
debug: false
});
});
</script>
<!-- script -->