Skip to content

Commit 282de08

Browse files
committed
GitHubIO Theme
1 parent 86d80ac commit 282de08

File tree

3 files changed

+262
-0
lines changed

3 files changed

+262
-0
lines changed

_includes/head.html

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<head>
2+
<meta charset="UTF-8">
3+
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
4+
5+
{% unless site.plugins contains "jekyll-seo-tag" %}
6+
{% if page.title %}
7+
<title>{{ page.title }} - {{ site.title }}</title>
8+
{% else %}
9+
<title>{{ site.title }}</title>
10+
{% endif %}
11+
12+
{% if page.description %}
13+
<meta name="Description" content="{{ page.description }}">
14+
{% endif %}
15+
{% endunless %}
16+
17+
<link rel="shortcut icon" href="{{ 'favicon.ico' | relative_url }}" type="image/x-icon">
18+
19+
<link rel="stylesheet" href="{{ '/assets/css/just-the-docs-default.css' | relative_url }}">
20+
21+
{% if site.ga_tracking != nil %}
22+
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.ga_tracking }}"></script>
23+
<script>
24+
window.dataLayer = window.dataLayer || [];
25+
function gtag(){dataLayer.push(arguments);}
26+
gtag('js', new Date());
27+
28+
gtag('config', '{{ site.ga_tracking }}'{% unless site.ga_tracking_anonymize_ip == nil %}, { 'anonymize_ip': true }{% endunless %});
29+
</script>
30+
{% endif %}
31+
32+
{% if site.ya_tracking != nil %}
33+
<!-- Yandex.Metrika counter -->
34+
<script type="text/javascript" >
35+
(function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
36+
m[i].l=1*new Date();k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)})
37+
(window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym");
38+
39+
ym({{ site.ya_tracking }}, "init", {
40+
clickmap:true,
41+
trackLinks:true,
42+
accurateTrackBounce:true
43+
});
44+
</script>
45+
<noscript><div><img src="https://mc.yandex.ru/watch/{{ site.ga_tracking }}" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
46+
<!-- /Yandex.Metrika counter -->
47+
{% endif %}
48+
49+
{% if site.search_enabled != false %}
50+
<script type="text/javascript" src="{{ '/assets/js/vendor/lunr.min.js' | relative_url }}"></script>
51+
{% endif %}
52+
<script type="text/javascript" src="{{ '/assets/js/just-the-docs.js' | relative_url }}"></script>
53+
54+
<meta name="viewport" content="width=device-width, initial-scale=1">
55+
56+
{% seo %}
57+
58+
{% include head_custom.html %}
59+
60+
</head>

_layouts/default.html

Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
---
2+
layout: table_wrappers
3+
---
4+
5+
<!DOCTYPE html>
6+
7+
<html lang="{{ site.lang | default: 'en-US' }}">
8+
{% include head.html %}
9+
<body>
10+
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
11+
<symbol id="svg-link" viewBox="0 0 24 24">
12+
<title>Link</title>
13+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link">
14+
<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>
15+
</svg>
16+
</symbol>
17+
<symbol id="svg-search" viewBox="0 0 24 24">
18+
<title>Search</title>
19+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search">
20+
<circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line>
21+
</svg>
22+
</symbol>
23+
<symbol id="svg-menu" viewBox="0 0 24 24">
24+
<title>Menu</title>
25+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu">
26+
<line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line>
27+
</svg>
28+
</symbol>
29+
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
30+
<title>Expand</title>
31+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right">
32+
<polyline points="9 18 15 12 9 6"></polyline>
33+
</svg>
34+
</symbol>
35+
<symbol id="svg-doc" viewBox="0 0 24 24">
36+
<title>Document</title>
37+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file">
38+
<path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline>
39+
</svg>
40+
</symbol>
41+
</svg>
42+
43+
<div class="side-bar">
44+
<div class="site-header">
45+
<a href="{{ '/' | absolute_url }}" class="site-title lh-tight">{% include title.html %}</a>
46+
<a href="#" id="menu-button" class="site-button">
47+
<svg viewBox="0 0 24 24" class="icon"><use xlink:href="#svg-menu"></use></svg>
48+
</a>
49+
</div>
50+
<nav role="navigation" aria-label="Main" id="site-nav" class="site-nav">
51+
{% if site.just_the_docs.collections %}
52+
{% assign collections_size = site.just_the_docs.collections | size %}
53+
{% for collection_entry in site.just_the_docs.collections %}
54+
{% assign collection_key = collection_entry[0] %}
55+
{% assign collection_value = collection_entry[1] %}
56+
{% assign collection = site[collection_key] %}
57+
{% if collection_value.nav_exclude != true %}
58+
{% if collections_size > 1 %}
59+
<div class="nav-category">{{ collection_value.name }}</div>
60+
{% endif %}
61+
{% include nav.html pages=collection %}
62+
{% endif %}
63+
{% endfor %}
64+
{% else %}
65+
{% include nav.html pages=site.html_pages %}
66+
{% endif %}
67+
</nav>
68+
<footer class="site-footer">
69+
</footer>
70+
</div>
71+
<div class="main" id="top">
72+
<div id="main-header" class="main-header">
73+
{% if site.search_enabled != false %}
74+
<div class="search">
75+
<div class="search-input-wrap">
76+
<input type="text" id="search-input" class="search-input" tabindex="0" placeholder="Search {{ site.title }}" aria-label="Search {{ site.title }}" autocomplete="off">
77+
<label for="search-input" class="search-label"><svg viewBox="0 0 24 24" class="search-icon"><use xlink:href="#svg-search"></use></svg></label>
78+
</div>
79+
<div id="search-results" class="search-results"></div>
80+
</div>
81+
{% endif %}
82+
{% include header_custom.html %}
83+
<nav aria-label="Auxiliary" class="aux-nav">
84+
<ul class="aux-nav-list">
85+
<li class="aux-nav-list-item">
86+
<a class="site-button" href="{{ site.github.repository_url }}">{{ site.title }} on GitHub</a>
87+
</li>
88+
</ul>
89+
</nav>
90+
</div>
91+
<div id="main-content-wrap" class="main-content-wrap">
92+
{% unless page.url == "/" %}
93+
{% if page.parent %}
94+
{%- for node in pages_list -%}
95+
{%- if node.parent == nil -%}
96+
{%- if page.parent == node.title or page.grand_parent == node.title -%}
97+
{%- assign first_level_url = node.url | absolute_url -%}
98+
{%- endif -%}
99+
{%- if node.has_children -%}
100+
{%- assign children_list = pages_list | where: "parent", node.title -%}
101+
{%- for child in children_list -%}
102+
{%- if page.url == child.url or page.parent == child.title -%}
103+
{%- assign second_level_url = child.url | absolute_url -%}
104+
{%- endif -%}
105+
{%- endfor -%}
106+
{%- endif -%}
107+
{%- endif -%}
108+
{%- endfor -%}
109+
<nav aria-label="Breadcrumb" class="breadcrumb-nav">
110+
<ol class="breadcrumb-nav-list">
111+
{% if page.grand_parent %}
112+
<li class="breadcrumb-nav-list-item"><a href="{{ first_level_url }}">{{ page.grand_parent }}</a></li>
113+
<li class="breadcrumb-nav-list-item"><a href="{{ second_level_url }}">{{ page.parent }}</a></li>
114+
{% else %}
115+
<li class="breadcrumb-nav-list-item"><a href="{{ first_level_url }}">{{ page.parent }}</a></li>
116+
{% endif %}
117+
<li class="breadcrumb-nav-list-item"><span>{{ page.title }}</span></li>
118+
</ol>
119+
</nav>
120+
{% endif %}
121+
{% endunless %}
122+
<div id="main-content" class="main-content" role="main">
123+
{% if site.heading_anchors != false %}
124+
{% include vendor/anchor_headings.html html=content beforeHeading="true" anchorBody="<svg viewBox=\"0 0 16 16\" aria-hidden=\"true\"><use xlink:href=\"#svg-link\"></use></svg>" anchorClass="anchor-heading" anchorAttrs="aria-labelledby=\"%html_id%\"" %}
125+
{% else %}
126+
{{ content }}
127+
{% endif %}
128+
129+
{% if page.has_children == true and page.has_toc != false %}
130+
<hr>
131+
<h2 class="text-delta">Table of contents</h2>
132+
<ul>
133+
{%- assign children_list = pages_list | where: "parent", page.title | where: "grand_parent", page.parent -%}
134+
{% for child in children_list %}
135+
<li>
136+
<a href="{{ child.url | absolute_url }}">{{ child.title }}</a>{% if child.summary %} - {{ child.summary }}{% endif %}
137+
</li>
138+
{% endfor %}
139+
</ul>
140+
{% endif %}
141+
142+
{% capture footer_custom %}
143+
{%- include footer_custom.html -%}
144+
{% endcapture %}
145+
{% if footer_custom != "" or site.last_edit_timestamp or site.gh_edit_link %}
146+
<hr>
147+
<footer>
148+
{% if site.back_to_top %}
149+
<p><a href="#top" id="back-to-top">{{ site.back_to_top_text }}</a></p>
150+
{% endif %}
151+
152+
{{ footer_custom }}
153+
154+
{% if site.last_edit_timestamp or site.gh_edit_link %}
155+
<div class="d-flex mt-2">
156+
{% if site.last_edit_timestamp and site.last_edit_time_format and page.last_modified_date %}
157+
<p class="text-small text-grey-dk-000 mb-0 mr-2">
158+
Page last modified: <span class="d-inline-block">{{ page.last_modified_date | date: site.last_edit_time_format }}</span>.
159+
</p>
160+
{% endif %}
161+
{% if
162+
site.gh_edit_link and
163+
site.gh_edit_link_text and
164+
site.gh_edit_repository and
165+
site.gh_edit_branch and
166+
site.gh_edit_view_mode
167+
%}
168+
<p class="text-small text-grey-dk-000 mb-0">
169+
<a href="{{ site.gh_edit_repository }}/{{ site.gh_edit_view_mode }}/{{ site.gh_edit_branch }}{% if site.gh_edit_source %}/{{ site.gh_edit_source }}{% endif %}/{{ page.path }}" id="edit-this-page">{{ site.gh_edit_link_text }}</a>
170+
</p>
171+
{% endif %}
172+
</div>
173+
{% endif %}
174+
</footer>
175+
{% endif %}
176+
177+
</div>
178+
</div>
179+
180+
{% if site.search_enabled != false %}
181+
{% if site.search.button %}
182+
<a href="#" id="search-button" class="search-button">
183+
<svg viewBox="0 0 24 24" class="icon"><use xlink:href="#svg-search"></use></svg>
184+
</a>
185+
{% endif %}
186+
187+
<div class="search-overlay"></div>
188+
{% endif %}
189+
</div>
190+
</body>
191+
</html>

_sass/custom/custom.scss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
h4,
2+
.text-delta {
3+
font-size: 16px !important;
4+
font-weight: 500;
5+
text-transform: none;
6+
letter-spacing: normal;
7+
}
8+
9+
.site-title {
10+
font-size: 18px !important;
11+
}

0 commit comments

Comments
 (0)