jekyll-theme-cadre 0.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +319 -0
- data/_includes/about.html +23 -0
- data/_includes/archive-by-tagories.html +101 -0
- data/_includes/archive-by-years.html +36 -0
- data/_includes/back-to-top.html +6 -0
- data/_includes/categories.html +27 -0
- data/_includes/copyright.html +9 -0
- data/_includes/custom-head.html +6 -0
- data/_includes/disqus.html +17 -0
- data/_includes/footer.html +26 -0
- data/_includes/google-analytics.html +9 -0
- data/_includes/head.html +26 -0
- data/_includes/header.html +39 -0
- data/_includes/katex.html +15 -0
- data/_includes/mathjax.html +2 -0
- data/_includes/other-posts.html +33 -0
- data/_includes/paginator.html +25 -0
- data/_includes/post-cards.html +28 -0
- data/_includes/powered-by.html +5 -0
- data/_includes/recent-posts.html +16 -0
- data/_includes/social.html +7 -0
- data/_includes/toc-div.html +6 -0
- data/_includes/toc.html +182 -0
- data/_layouts/archive.html +34 -0
- data/_layouts/default.html +30 -0
- data/_layouts/home.html +20 -0
- data/_layouts/page.html +8 -0
- data/_layouts/post.html +73 -0
- data/_plugins/_anchor_ref.rb +14 -0
- data/_plugins/_capitalize_all.rb +13 -0
- data/_sass/cadre/_about.scss +3 -0
- data/_sass/cadre/_archive.scss +17 -0
- data/_sass/cadre/_base.scss +149 -0
- data/_sass/cadre/_category-cards.scss +10 -0
- data/_sass/cadre/_code.scss +66 -0
- data/_sass/cadre/_footer.scss +7 -0
- data/_sass/cadre/_functions.scss +9 -0
- data/_sass/cadre/_header.scss +67 -0
- data/_sass/cadre/_highlight-light.scss +92 -0
- data/_sass/cadre/_home.scss +3 -0
- data/_sass/cadre/_layout.scss +0 -0
- data/_sass/cadre/_main.scss +17 -0
- data/_sass/cadre/_pagination.scss +4 -0
- data/_sass/cadre/_post-cards.scss +7 -0
- data/_sass/cadre/_post.scss +28 -0
- data/_sass/cadre/_powered-by.scss +0 -0
- data/_sass/cadre/_predefined.scss +0 -0
- data/_sass/cadre/_toc.scss +66 -0
- data/_sass/cadre/_variables.scss +49 -0
- data/_sass/cadre/custom-styles.scss +2 -0
- data/_sass/cadre/custom-variables.scss +1 -0
- data/_sass/cadre/initialize.scss +41 -0
- data/assets/css/bootstrap.min.css +7 -0
- data/assets/css/bootstrap.min.css.map +1 -0
- data/assets/css/open-color.css +343 -0
- data/assets/css/styles.scss +4 -0
- data/assets/images/Cadre.png +0 -0
- data/assets/images/favicon.png +0 -0
- data/assets/js/adjustAnchorLink.js +17 -0
- data/assets/js/bootstrap.bundle.min.js +7 -0
- data/assets/js/bootstrap.bundle.min.js.map +1 -0
- data/assets/js/liveTOCScroll.js +23 -0
- data/assets/js/main.js +32 -0
- metadata +206 -0
@@ -0,0 +1,39 @@
|
|
1
|
+
<nav class="navbar navbar-expand-lg fixed-top navbar-light py-4" id="menu">
|
2
|
+
|
3
|
+
<!-- BRAND LOGO OR NAME -->
|
4
|
+
<a class="navbar-brand top" id="site-logo" href="{{ '/' | relative_url }}">
|
5
|
+
{% if site.navbar_img %}
|
6
|
+
<img class="navbar-brand-img" src="{{ site.navbar_img | relative_url }}" alt="">
|
7
|
+
{% elsif site.title %}
|
8
|
+
{{ site.title }}
|
9
|
+
{% else %}
|
10
|
+
<img class="navbar-brand-img" src="{{ 'assets/images/Cadre.png' | relative_url }}" alt="">
|
11
|
+
{% endif %}
|
12
|
+
</a>
|
13
|
+
|
14
|
+
<!-- NAVIGATION -->
|
15
|
+
{% if site.data.navigation %}
|
16
|
+
{% if page.url == "/" %}
|
17
|
+
{% assign current = 'index.html' %}
|
18
|
+
{% else %}
|
19
|
+
{% assign url_list = page.url | split: "/" %}
|
20
|
+
{% assign current = url_list[1] | strip %}
|
21
|
+
{% endif %}
|
22
|
+
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
|
23
|
+
<span class="navbar-toggler-icon"></span>
|
24
|
+
</button>
|
25
|
+
|
26
|
+
<div class="collapse navbar-collapse justify-content-end" id="navbarCollapse">
|
27
|
+
<div class="navbar-nav">
|
28
|
+
{% for item in site.data.navigation %}
|
29
|
+
{% if item.link == current %}
|
30
|
+
{% assign active_status = 'active' %}
|
31
|
+
{% else %}
|
32
|
+
{% assign active_status = '' %}
|
33
|
+
{% endif %}
|
34
|
+
<a class="nav-item nav-link {{ active_status }}" href="{{ item.link | relative_url }}">{{ item.name }}</a>
|
35
|
+
{% endfor %}
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
{% endif %}
|
39
|
+
</nav>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<link rel="stylesheet"
|
2
|
+
href="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.css"
|
3
|
+
integrity="sha384-AfEj0r4/OFrOo5t7NnNe46zW/tFgW6x/bCJG8FqQCEo3+Aro6EYUG4+cU+KJWu/X"
|
4
|
+
crossorigin="anonymous">
|
5
|
+
|
6
|
+
<!-- The loading of KaTeX is deferred to speed up page rendering -->
|
7
|
+
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.js"
|
8
|
+
integrity="sha384-g7c+Jr9ZivxKLnZTDUhnkOnsh30B4H0rpLUpJ4jAIKs4fnJI+sEnkvrMWph2EDg4"
|
9
|
+
crossorigin="anonymous"></script>
|
10
|
+
|
11
|
+
<!-- To automatically render math in text elements, include the auto-render extension: -->
|
12
|
+
<script defer
|
13
|
+
src="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/contrib/auto-render.min.js"
|
14
|
+
integrity="sha384-mll67QQFJfxn0IYznZYonOWZ644AWYC+Pt2cHqMaRhXVrursRwvLnLaebdGIlYNa"
|
15
|
+
crossorigin="anonymous" onload="renderMathInElement(document.body);"></script>
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<div class="card sticky-div mt-2">
|
2
|
+
|
3
|
+
<div class="card-body">
|
4
|
+
|
5
|
+
<h3 class="card-title text-center">Recent Posts</h3>
|
6
|
+
<ul class="list-unstyled">
|
7
|
+
{% for post in site.posts limit:3 %}
|
8
|
+
<li class="card-text text-center">
|
9
|
+
<a class="card-link" href="{{ post.url | relative_url }}">{{ post.title }}</a>
|
10
|
+
</li>
|
11
|
+
{% endfor %}
|
12
|
+
</ul>
|
13
|
+
|
14
|
+
{% if site.categories.size > 0 %}
|
15
|
+
<h3 class="card-title text-center">Categories</h3>
|
16
|
+
<div class="category-tags d-flex flex-wrap justify-content-center px-5">
|
17
|
+
{% for category in site.categories %}
|
18
|
+
{% assign category_name = category | first %}
|
19
|
+
{% capture anchor_url %}categories.html#{{ category_name | slugify }}{% endcapture %}
|
20
|
+
{% assign category_name_list = category_name | split: ' ' %}
|
21
|
+
{% capture capitalized_category_name %}
|
22
|
+
{% for word in category_name_list %}
|
23
|
+
{{ word | capitalize }}
|
24
|
+
{% endfor %}
|
25
|
+
{% endcapture %}
|
26
|
+
<a class="card-link my-1 py-2 px-3" href="{{ anchor_url | relative_url }}">
|
27
|
+
{{ capitalized_category_name }}
|
28
|
+
</a>
|
29
|
+
{% endfor %}
|
30
|
+
</div>
|
31
|
+
{% endif %}
|
32
|
+
</div>
|
33
|
+
</div>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
{% if paginator %}
|
2
|
+
<div class="d-flex justify-content-around px-3">
|
3
|
+
{% if paginator.previous_page %}
|
4
|
+
<a class="pagination-nav-active" href="{{ paginator.previous_page_path | relative_url }}">
|
5
|
+
<i class="fa fa-arrow-left" aria-hidden="true"></i>
|
6
|
+
</a>
|
7
|
+
{% else %}
|
8
|
+
<span class="pagination-nav-inactive">
|
9
|
+
<i class="fa fa-arrow-left" aria-hidden="true"></i>
|
10
|
+
</span>
|
11
|
+
{% endif %}
|
12
|
+
|
13
|
+
<p>More</p>
|
14
|
+
|
15
|
+
{% if paginator.next_page %}
|
16
|
+
<a class="pagination-nav-active" href="{{ paginator.next_page_path | relative_url }}">
|
17
|
+
<i class="fa fa-arrow-right" aria-hidden="true"></i>
|
18
|
+
</a>
|
19
|
+
{% else %}
|
20
|
+
<span class="pagination-nav-inactive">
|
21
|
+
<i class="fa fa-arrow-right" aria-hidden="true"></i>
|
22
|
+
</span>
|
23
|
+
{% endif %}
|
24
|
+
</div>
|
25
|
+
{% endif %}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
{% if paginator %}
|
2
|
+
{% assign posts = paginator.posts %}
|
3
|
+
{% else %}
|
4
|
+
{% assign posts = site.posts %}
|
5
|
+
{% endif %}
|
6
|
+
|
7
|
+
{% for post in posts %}
|
8
|
+
<div class="card my-2 mx-3">
|
9
|
+
<div class="card-body p-5">
|
10
|
+
<h3 class="card-title text-center">{{ post.title }}</h3>
|
11
|
+
|
12
|
+
<p class="card-text text-center">
|
13
|
+
{% if post.description %}
|
14
|
+
{{ post.description }}
|
15
|
+
{% else %}
|
16
|
+
{{ post.content | strip_html | truncatewords: 50 }}
|
17
|
+
{% endif %}
|
18
|
+
</p>
|
19
|
+
|
20
|
+
<p class="card-text text-center read-more">
|
21
|
+
<a href="{{ post.url | relative_url }}">
|
22
|
+
Read more <i class="fa fa-xs fa-hover fa-chevron-right" aria-hidden="true"></i>
|
23
|
+
</a>
|
24
|
+
</p>
|
25
|
+
</div>
|
26
|
+
</div>
|
27
|
+
{% endfor %}
|
28
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<div class="card info-card sticky-div h-100">
|
2
|
+
|
3
|
+
<div class="card-body">
|
4
|
+
|
5
|
+
<h3 class="card-title text-center">Recent Posts</h3>
|
6
|
+
<ul class="list-unstyled">
|
7
|
+
{% for post in site.posts limit: 5 %}
|
8
|
+
<li class="card-text">
|
9
|
+
<time datetime="{{ page.date | date_to_xmlschema }}">{{ post.date | date: "%b %-d, %Y" }}</time>
|
10
|
+
»
|
11
|
+
<a class="card-link" href="{{ post.url | relative_url }}">{{ post.title }}</a>
|
12
|
+
</li>
|
13
|
+
{% endfor %}
|
14
|
+
</ul>
|
15
|
+
</div>
|
16
|
+
</div>
|
data/_includes/toc.html
ADDED
@@ -0,0 +1,182 @@
|
|
1
|
+
{% capture tocWorkspace %}
|
2
|
+
{% comment %}
|
3
|
+
Copyright (c) 2017 Vladimir "allejo" Jimenez
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person
|
6
|
+
obtaining a copy of this software and associated documentation
|
7
|
+
files (the "Software"), to deal in the Software without
|
8
|
+
restriction, including without limitation the rights to use,
|
9
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10
|
+
copies of the Software, and to permit persons to whom the
|
11
|
+
Software is furnished to do so, subject to the following
|
12
|
+
conditions:
|
13
|
+
|
14
|
+
The above copyright notice and this permission notice shall be
|
15
|
+
included in all copies or substantial portions of the Software.
|
16
|
+
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
18
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
19
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
20
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
21
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
22
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
23
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
24
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
25
|
+
{% endcomment %}
|
26
|
+
{% comment %}
|
27
|
+
Version 1.1.0
|
28
|
+
https://github.com/allejo/jekyll-toc
|
29
|
+
|
30
|
+
"...like all things liquid - where there's a will, and ~36 hours to spare, there's usually a/some way" ~jaybe
|
31
|
+
|
32
|
+
Usage:
|
33
|
+
{% include toc.html html=content sanitize=true class="inline_toc" id="my_toc" h_min=2 h_max=3 %}
|
34
|
+
|
35
|
+
Parameters:
|
36
|
+
* html (string) - the HTML of compiled markdown generated by kramdown in Jekyll
|
37
|
+
|
38
|
+
Optional Parameters:
|
39
|
+
* sanitize (bool) : false - when set to true, the headers will be stripped of any HTML in the TOC
|
40
|
+
* class (string) : '' - a CSS class assigned to the TOC
|
41
|
+
* id (string) : '' - an ID to assigned to the TOC
|
42
|
+
* h_min (int) : 1 - the minimum TOC header level to use; any header lower than this value will be ignored
|
43
|
+
* h_max (int) : 6 - the maximum TOC header level to use; any header greater than this value will be ignored
|
44
|
+
* ordered (bool) : false - when set to true, an ordered list will be outputted instead of an unordered list
|
45
|
+
* item_class (string) : '' - add custom class(es) for each list item; has support for '%level%' placeholder, which is the current heading level
|
46
|
+
* submenu_class (string) : '' - add custom class(es) for each child group of headings; has support for '%level%' placeholder which is the current "submenu" heading level
|
47
|
+
* base_url (string) : '' - add a base url to the TOC links for when your TOC is on another page than the actual content
|
48
|
+
* anchor_class (string) : '' - add custom class(es) for each anchor element
|
49
|
+
* skip_no_ids (bool) : false - skip headers that do not have an `id` attribute
|
50
|
+
|
51
|
+
Output:
|
52
|
+
An ordered or unordered list representing the table of contents of a markdown block. This snippet will only
|
53
|
+
generate the table of contents and will NOT output the markdown given to it
|
54
|
+
{% endcomment %}
|
55
|
+
|
56
|
+
{% capture newline %}
|
57
|
+
{% endcapture %}
|
58
|
+
{% assign newline = newline | rstrip %} <!-- Remove the extra spacing but preserve the newline -->
|
59
|
+
|
60
|
+
{% capture deprecation_warnings %}{% endcapture %}
|
61
|
+
|
62
|
+
{% if include.baseurl %}
|
63
|
+
{% capture deprecation_warnings %}{{ deprecation_warnings }}<!-- jekyll-toc :: "baseurl" has been deprecated, use "base_url" instead -->{{ newline }}{% endcapture %}
|
64
|
+
{% endif %}
|
65
|
+
|
66
|
+
{% if include.skipNoIDs %}
|
67
|
+
{% capture deprecation_warnings %}{{ deprecation_warnings }}<!-- jekyll-toc :: "skipNoIDs" has been deprecated, use "skip_no_ids" instead -->{{ newline }}{% endcapture %}
|
68
|
+
{% endif %}
|
69
|
+
|
70
|
+
{% capture jekyll_toc %}{% endcapture %}
|
71
|
+
{% assign orderedList = include.ordered | default: false %}
|
72
|
+
{% assign baseURL = include.base_url | default: include.baseurl | default: '' %}
|
73
|
+
{% assign skipNoIDs = include.skip_no_ids | default: include.skipNoIDs | default: false %}
|
74
|
+
{% assign minHeader = include.h_min | default: 1 %}
|
75
|
+
{% assign maxHeader = include.h_max | default: 6 %}
|
76
|
+
{% assign nodes = include.html | strip | split: '<h' %}
|
77
|
+
|
78
|
+
{% assign firstHeader = true %}
|
79
|
+
{% assign currLevel = 0 %}
|
80
|
+
{% assign lastLevel = 0 %}
|
81
|
+
|
82
|
+
{% capture listModifier %}{% if orderedList %}ol{% else %}ul{% endif %}{% endcapture %}
|
83
|
+
|
84
|
+
{% for node in nodes %}
|
85
|
+
{% if node == "" %}
|
86
|
+
{% continue %}
|
87
|
+
{% endif %}
|
88
|
+
|
89
|
+
{% assign currLevel = node | replace: '"', '' | slice: 0, 1 | times: 1 %}
|
90
|
+
|
91
|
+
{% if currLevel < minHeader or currLevel > maxHeader %}
|
92
|
+
{% continue %}
|
93
|
+
{% endif %}
|
94
|
+
|
95
|
+
{% assign _workspace = node | split: '</h' %}
|
96
|
+
|
97
|
+
{% assign _idWorkspace = _workspace[0] | split: 'id="' %}
|
98
|
+
{% assign _idWorkspace = _idWorkspace[1] | split: '"' %}
|
99
|
+
{% assign htmlID = _idWorkspace[0] %}
|
100
|
+
|
101
|
+
{% assign _classWorkspace = _workspace[0] | split: 'class="' %}
|
102
|
+
{% assign _classWorkspace = _classWorkspace[1] | split: '"' %}
|
103
|
+
{% assign htmlClass = _classWorkspace[0] %}
|
104
|
+
|
105
|
+
{% if htmlClass contains "no_toc" %}
|
106
|
+
{% continue %}
|
107
|
+
{% endif %}
|
108
|
+
|
109
|
+
{% if firstHeader %}
|
110
|
+
{% assign minHeader = currLevel %}
|
111
|
+
{% endif %}
|
112
|
+
|
113
|
+
{% capture _hAttrToStrip %}{{ _workspace[0] | split: '>' | first }}>{% endcapture %}
|
114
|
+
{% assign header = _workspace[0] | replace: _hAttrToStrip, '' %}
|
115
|
+
|
116
|
+
{% if include.item_class and include.item_class != blank %}
|
117
|
+
{% capture listItemClass %} class="{{ include.item_class | replace: '%level%', currLevel | split: '.' | join: ' ' }}"{% endcapture %}
|
118
|
+
{% endif %}
|
119
|
+
|
120
|
+
{% if include.submenu_class and include.submenu_class != blank %}
|
121
|
+
{% assign subMenuLevel = currLevel | minus: 1 %}
|
122
|
+
{% capture subMenuClass %} class="{{ include.submenu_class | replace: '%level%', subMenuLevel | split: '.' | join: ' ' }}"{% endcapture %}
|
123
|
+
{% endif %}
|
124
|
+
|
125
|
+
{% capture anchorBody %}{% if include.sanitize %}{{ header | strip_html }}{% else %}{{ header }}{% endif %}{% endcapture %}
|
126
|
+
|
127
|
+
{% if htmlID %}
|
128
|
+
{% capture anchorAttributes %} href="{% if baseURL %}{{ baseURL }}{% endif %}#{{ htmlID }}"{% endcapture %}
|
129
|
+
|
130
|
+
{% if include.anchor_class %}
|
131
|
+
{% capture anchorAttributes %}{{ anchorAttributes }} class="{{ include.anchor_class | split: '.' | join: ' ' }}"{% endcapture %}
|
132
|
+
{% endif %}
|
133
|
+
|
134
|
+
{% capture listItem %}<a{{ anchorAttributes }}>{{ anchorBody }}</a>{% endcapture %}
|
135
|
+
{% elsif skipNoIDs == true %}
|
136
|
+
{% continue %}
|
137
|
+
{% else %}
|
138
|
+
{% capture listItem %}{{ anchorBody }}{% endcapture %}
|
139
|
+
{% endif %}
|
140
|
+
|
141
|
+
{% if currLevel > lastLevel %}
|
142
|
+
{% capture jekyll_toc %}{{ jekyll_toc }}<{{ listModifier }}{{ subMenuClass }}>{% endcapture %}
|
143
|
+
{% elsif currLevel < lastLevel %}
|
144
|
+
{% assign repeatCount = lastLevel | minus: currLevel %}
|
145
|
+
|
146
|
+
{% for i in (1..repeatCount) %}
|
147
|
+
{% capture jekyll_toc %}{{ jekyll_toc }}</li></{{ listModifier }}>{% endcapture %}
|
148
|
+
{% endfor %}
|
149
|
+
|
150
|
+
{% capture jekyll_toc %}{{ jekyll_toc }}</li>{% endcapture %}
|
151
|
+
{% else %}
|
152
|
+
{% capture jekyll_toc %}{{ jekyll_toc }}</li>{% endcapture %}
|
153
|
+
{% endif %}
|
154
|
+
|
155
|
+
{% capture jekyll_toc %}{{ jekyll_toc }}<li{{ listItemClass }}>{{ listItem }}{% endcapture %}
|
156
|
+
|
157
|
+
{% assign lastLevel = currLevel %}
|
158
|
+
{% assign firstHeader = false %}
|
159
|
+
{% endfor %}
|
160
|
+
|
161
|
+
{% assign repeatCount = minHeader | minus: 1 %}
|
162
|
+
{% assign repeatCount = lastLevel | minus: repeatCount %}
|
163
|
+
{% for i in (1..repeatCount) %}
|
164
|
+
{% capture jekyll_toc %}{{ jekyll_toc }}</li></{{ listModifier }}>{% endcapture %}
|
165
|
+
{% endfor %}
|
166
|
+
|
167
|
+
{% if jekyll_toc != '' %}
|
168
|
+
{% assign rootAttributes = '' %}
|
169
|
+
{% if include.class and include.class != blank %}
|
170
|
+
{% capture rootAttributes %} class="{{ include.class | split: '.' | join: ' ' }}"{% endcapture %}
|
171
|
+
{% endif %}
|
172
|
+
|
173
|
+
{% if include.id and include.id != blank %}
|
174
|
+
{% capture rootAttributes %}{{ rootAttributes }} id="{{ include.id }}"{% endcapture %}
|
175
|
+
{% endif %}
|
176
|
+
|
177
|
+
{% if rootAttributes %}
|
178
|
+
{% assign nodes = jekyll_toc | split: '>' %}
|
179
|
+
{% capture jekyll_toc %}<{{ listModifier }}{{ rootAttributes }}>{{ nodes | shift | join: '>' }}>{% endcapture %}
|
180
|
+
{% endif %}
|
181
|
+
{% endif %}
|
182
|
+
{% endcapture %}{% assign tocWorkspace = '' %}{{ deprecation_warnings }}{{ jekyll_toc }}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
---
|
2
|
+
layout: default
|
3
|
+
---
|
4
|
+
|
5
|
+
<div class="row">
|
6
|
+
<h1 class="d-flex justify-content-center">
|
7
|
+
{% if page.title %}
|
8
|
+
{{ page.title }}
|
9
|
+
{% else %}
|
10
|
+
Categories
|
11
|
+
{% endif %}
|
12
|
+
</h1>
|
13
|
+
|
14
|
+
{{ content }}
|
15
|
+
|
16
|
+
</div>
|
17
|
+
|
18
|
+
<div class="row mt-3">
|
19
|
+
|
20
|
+
<!-- START ARCHIVE COLUMN -->
|
21
|
+
<div class="col-md-8 py-2">
|
22
|
+
{% if page.type == "years" %}
|
23
|
+
{% include archive-by-years.html %}
|
24
|
+
{% else %}
|
25
|
+
{% include archive-by-tagories.html %}
|
26
|
+
{% endif %}
|
27
|
+
</div>
|
28
|
+
|
29
|
+
<!-- START INFO COLUMN -->
|
30
|
+
<div class="col-md-4 py-3">
|
31
|
+
{% include about.html %}
|
32
|
+
{% include other-posts.html %}
|
33
|
+
</div>
|
34
|
+
</div>
|
@@ -0,0 +1,30 @@
|
|
1
|
+
---
|
2
|
+
---
|
3
|
+
<!doctype html>
|
4
|
+
<html lang="{{ page.lang | default: site.lang | default: "en" }}">
|
5
|
+
{% include head.html %}
|
6
|
+
<body>
|
7
|
+
<div id="main" class="container">
|
8
|
+
|
9
|
+
{% include header.html %}
|
10
|
+
|
11
|
+
<main>
|
12
|
+
{{ content }}
|
13
|
+
</main>
|
14
|
+
|
15
|
+
</div>
|
16
|
+
{% include footer.html %}
|
17
|
+
|
18
|
+
{% if page.mathjax %}
|
19
|
+
{% include mathjax.html %}
|
20
|
+
{% endif %}
|
21
|
+
|
22
|
+
{% if page.katex %}
|
23
|
+
{% include katex.html %}
|
24
|
+
{% endif %}
|
25
|
+
|
26
|
+
{% if jekyll.environment == 'production' and site.google_analytics %}
|
27
|
+
{% include google-analytics.html %}
|
28
|
+
{% endif %}
|
29
|
+
</body>
|
30
|
+
</html>
|
data/_layouts/home.html
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
---
|
2
|
+
layout: default
|
3
|
+
---
|
4
|
+
|
5
|
+
{{ content }}
|
6
|
+
|
7
|
+
<div class="row mt-3">
|
8
|
+
|
9
|
+
<!-- START POST COLUMN -->
|
10
|
+
<div class="col-md-8 py-2">
|
11
|
+
{% include post-cards.html %}
|
12
|
+
{% include paginator.html %}
|
13
|
+
</div>
|
14
|
+
|
15
|
+
<!-- START INFO COLUMN -->
|
16
|
+
<div class="col-md-4 py-3">
|
17
|
+
{% include about.html %}
|
18
|
+
{% include other-posts.html %}
|
19
|
+
</div>
|
20
|
+
</div>
|
data/_layouts/page.html
ADDED
data/_layouts/post.html
ADDED
@@ -0,0 +1,73 @@
|
|
1
|
+
---
|
2
|
+
layout: default
|
3
|
+
---
|
4
|
+
|
5
|
+
<!-- jquery -->
|
6
|
+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
7
|
+
|
8
|
+
<script src="{{ 'assets/js/adjustAnchorLink.js' | relative_url }}"></script>
|
9
|
+
<script src="{{ 'assets/js/liveTOCScroll.js' | relative_url }}"></script>
|
10
|
+
|
11
|
+
<div class="post-body">
|
12
|
+
<div class="row post-header">
|
13
|
+
<div class="col">
|
14
|
+
<h1 class="post-title text-center">{{ page.title }}</h1>
|
15
|
+
<div class="post-meta text-center">
|
16
|
+
|
17
|
+
{% if page.author %}
|
18
|
+
{% for author in page.author %}
|
19
|
+
<span class="post-metadata" itemprop="author" itemscope itemtype="http://schema.org/Person">
|
20
|
+
{{ author }} -
|
21
|
+
</span>
|
22
|
+
{% if forloop.last == false %}, {% endif %}
|
23
|
+
{% endfor %}
|
24
|
+
{% endif %}
|
25
|
+
|
26
|
+
{% assign date_format = site.date_format | default: "%b %d, %Y" %}
|
27
|
+
<time class="post-metadata" datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">
|
28
|
+
{{ page.date | date: date_format }}
|
29
|
+
</time>
|
30
|
+
{% if page.last_modified_at %}
|
31
|
+
<span class="post-metadata"> ~ </span>
|
32
|
+
{% assign mdate = page.last_modified_at | date_to_xmlschema %}
|
33
|
+
<time class="post-metadata" datetime="{{ mdate }}" itemprop="dateModified">
|
34
|
+
{{ mdate | date: date_format }}
|
35
|
+
</time>
|
36
|
+
{% endif %}
|
37
|
+
</div>
|
38
|
+
</div>
|
39
|
+
</div>
|
40
|
+
|
41
|
+
<div class="row">
|
42
|
+
|
43
|
+
<!-- START COL WITH TOC -->
|
44
|
+
<div class="col-sm-2 pt-3">
|
45
|
+
{% include toc-div.html %}
|
46
|
+
</div>
|
47
|
+
|
48
|
+
<!-- MAIN POST -->
|
49
|
+
<div class="col-sm-10 post p-4">
|
50
|
+
{{ content }}
|
51
|
+
</div>
|
52
|
+
</div>
|
53
|
+
|
54
|
+
<div class="d-flex justify-content-center pt-5">
|
55
|
+
<h2>More</h2>
|
56
|
+
</div>
|
57
|
+
|
58
|
+
<div class="row pt-5">
|
59
|
+
<div class="col-sm-6">
|
60
|
+
{% include recent-posts.html %}
|
61
|
+
</div>
|
62
|
+
<div class="col-sm-6">
|
63
|
+
{% include categories.html %}
|
64
|
+
</div>
|
65
|
+
</div>
|
66
|
+
|
67
|
+
{% if jekyll.environment == "production" and site.disqus and page.comments != false %}
|
68
|
+
<div class="row">
|
69
|
+
{% include disqus.html %}
|
70
|
+
</div>
|
71
|
+
{% endif %}
|
72
|
+
|
73
|
+
</div>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'liquid'
|
2
|
+
require 'uri'
|
3
|
+
|
4
|
+
# Capitalize all words of the input
|
5
|
+
module Jekyll
|
6
|
+
module AnchorRef
|
7
|
+
def anchor_ref(url, tag)
|
8
|
+
tag = tag.gsub ' ', '-'
|
9
|
+
return url + '#' + tag
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
Liquid::Template.register_filter(Jekyll::AnchorRef)
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'liquid'
|
2
|
+
require 'uri'
|
3
|
+
|
4
|
+
# Capitalize all words of the input
|
5
|
+
module Jekyll
|
6
|
+
module CapitalizeAll
|
7
|
+
def capitalize_all(words)
|
8
|
+
return words.split(' ').map(&:capitalize).join(' ')
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
Liquid::Template.register_filter(Jekyll::CapitalizeAll)
|
@@ -0,0 +1,17 @@
|
|
1
|
+
.post-list-by-taxonomy {
|
2
|
+
time {
|
3
|
+
font-family: $code-font;
|
4
|
+
}
|
5
|
+
}
|
6
|
+
|
7
|
+
ul.post-list-by-taxonomy {
|
8
|
+
list-style-type: none;
|
9
|
+
}
|
10
|
+
|
11
|
+
.back-to-top {
|
12
|
+
display: block;
|
13
|
+
font-size: 0.8em;
|
14
|
+
text-transform: uppercase;
|
15
|
+
text-align: right;
|
16
|
+
text-decoration: none;
|
17
|
+
}
|