databook-theme 0.1.1 → 0.1.2
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 +4 -4
- data/LICENSE.txt +21 -21
- data/README.MD +1 -1
- data/_includes/blog/blog.liquid +50 -50
- data/_includes/blog/features.liquid +36 -36
- data/_includes/blog/full.liquid +3 -3
- data/_includes/blog/list.liquid +41 -41
- data/_includes/blog/post.liquid +6 -6
- data/_includes/components/analytics.google.liquid +11 -11
- data/_includes/components/analytics.liquid +11 -11
- data/_includes/components/comments.disqus.liquid +17 -17
- data/_includes/components/comments.gitalk.liquid +22 -22
- data/_includes/components/comments.liquid +13 -13
- data/_includes/components/navmenu.items.liquid +51 -51
- data/_includes/components/navmenu.liquid +4 -4
- data/_includes/components/pagination.liquid +83 -83
- data/_includes/components/prevnext.liquid +1 -1
- data/_includes/components/search.baidu.liquid +7 -7
- data/_includes/components/search.bing.liquid +6 -6
- data/_includes/components/search.google.liquid +6 -6
- data/_includes/components/search.liquid +21 -21
- data/_includes/components/social_button.liquid +9 -9
- data/_includes/components/social_link.liquid +14 -14
- data/_includes/components/title.liquid +41 -41
- data/_includes/components/toc.liquid +28 -28
- data/_includes/custom/analytics.liquid +3 -3
- data/_includes/custom/blog.liquid +3 -3
- data/_includes/custom/body.liquid +3 -3
- data/_includes/custom/comments.liquid +3 -3
- data/_includes/custom/favicon.liquid +11 -0
- data/_includes/custom/footer.liquid +3 -3
- data/_includes/custom/head.liquid +3 -3
- data/_includes/custom/katex.liquid +15 -15
- data/_includes/custom/mathjax.liquid +19 -19
- data/_includes/custom/search.liquid +3 -3
- data/_includes/extensions/toc.liquid +182 -182
- data/_includes/functions/get_config.liquid +11 -11
- data/_includes/functions/get_config_data.liquid +23 -23
- data/_includes/functions/get_icon.liquid +5 -5
- data/_includes/functions/get_page_meta.liquid +74 -60
- data/_includes/functions/get_page_thumbnail.liquid +22 -23
- data/_includes/functions/get_page_title.liquid +7 -7
- data/_includes/functions/get_recent_posts.liquid +17 -17
- data/_includes/functions/get_taxonomy_link.liquid +9 -9
- data/_includes/head/head.liquid +11 -12
- data/_includes/head/meta.liquid +50 -41
- data/_includes/head/requirements.liquid +87 -87
- data/_includes/head/styles.liquid +10 -10
- data/_includes/js/codes.js +116 -116
- data/_includes/js/scrollspy.js +16 -16
- data/_includes/layout/article.liquid +74 -71
- data/_includes/layout/footer.liquid +53 -53
- data/_includes/layout/header.liquid +31 -31
- data/_includes/layout/hero.liquid +29 -29
- data/_includes/layout/page.liquid +33 -33
- data/_includes/layout/pagehead.liquid +17 -17
- data/_includes/layout/sidebar.liquid +178 -178
- data/_includes/localize +29 -29
- data/_includes/notice +6 -6
- data/_includes/version +1 -1
- data/_layouts/article.liquid +10 -10
- data/_layouts/default.liquid +132 -131
- data/_layouts/home.liquid +20 -20
- data/_layouts/page.liquid +9 -9
- data/_layouts/post.liquid +9 -9
- data/_layouts/system.liquid +35 -35
- data/_layouts/taxonomy.liquid +67 -67
- data/_sass/_databook.scss +42 -42
- data/_sass/_debug.scss +7 -7
- data/_sass/_variables.scss +24 -24
- data/_sass/base/_mixins.scss +32 -32
- data/_sass/base/_normalize.scss +45 -45
- data/_sass/base/_responsive.scss +28 -28
- data/_sass/components/_archive.scss +49 -49
- data/_sass/components/_blog.scss +249 -249
- data/_sass/components/_forms.scss +30 -30
- data/_sass/components/_hero.scss +70 -70
- data/_sass/components/_misc.scss +3 -3
- data/_sass/components/_notice.scss +27 -27
- data/_sass/components/_notification.scss +10 -10
- data/_sass/components/_post.scss +19 -19
- data/_sass/components/_sidebar.scss +303 -303
- data/_sass/components/_tabs.scss +67 -67
- data/_sass/components/_text.scss +27 -27
- data/_sass/components/_toc.scss +50 -50
- data/_sass/layout/_article.scss +211 -211
- data/_sass/layout/_body.scss +26 -26
- data/_sass/layout/_footer.scss +75 -75
- data/_sass/layout/_header.scss +124 -124
- data/_sass/layout/_main.scss +8 -8
- data/_sass/layout/_misc.scss +7 -7
- data/_sass/layout/_navbar.scss +323 -323
- data/_sass/layout/_sidebar.scss +115 -115
- data/_sass/layout/_wrapper.scss +7 -7
- data/_sass/theme/_scheme.scss +112 -112
- data/_sass/typography/_article.scss +49 -49
- data/_sass/typography/_doc.scss +104 -104
- data/_sass/typography/_highlight.scss +208 -208
- data/_sass/typography/_markdown.scss +18 -18
- data/_sass/typography/_table.scss +119 -119
- data/_sass/typography/_typography.scss +103 -108
- data/_sass/utilities/_thinscrollbar.scss +35 -35
- data/assets/databook/css/databook.scss +6 -6
- data/assets/databook/js/databook.js +8 -8
- data/assets/databook/js/search.js +47 -47
- data/assets/databook/version.json +9 -9
- data/assets/search.json +30 -30
- metadata +8 -8
- data/_includes/head/opengraph.liquid +0 -1
|
@@ -1,178 +1,178 @@
|
|
|
1
|
-
{%- assign sidebar_data = include.data -%}
|
|
2
|
-
|
|
3
|
-
<input type="checkbox" id="sidebar-toggler" class="h-toggler"/>
|
|
4
|
-
<aside class="l-sidebar {%- if sidebar_data.sticky %} l-sidebar--sticky{%- endif %}" {%- if sidebar_data.width %} style="--db-sidebar-width: {{sidebar_data.width}};"{%- endif -%}>
|
|
5
|
-
{%- if sidebar_data.header != false -%}
|
|
6
|
-
<div class="l-sidebar__header">
|
|
7
|
-
<a class="c-logo" href="{{ '/' | relative_url }}">
|
|
8
|
-
<img class="c-logo__image" src="{{ sidebar_data.header.logo | default: site.logo | relative_url }}" alt="Logo" />
|
|
9
|
-
<span class="c-logo__text">{{- sidebar_data.header.text | default: site.logo_text | default: site.title | escape -}}</span>
|
|
10
|
-
</a>
|
|
11
|
-
</div>
|
|
12
|
-
{%- elsif sidebar_data.header_html -%}
|
|
13
|
-
<div class="l-sidebar__header">
|
|
14
|
-
{{- sidebar_data.header_html -}}
|
|
15
|
-
</div>
|
|
16
|
-
{%- endif -%}
|
|
17
|
-
|
|
18
|
-
<div class="l-sidebar__body u-thinscrollbar">
|
|
19
|
-
{%- if sidebar_data.profile -%}
|
|
20
|
-
<div class="c-profile">
|
|
21
|
-
{%- if sidebar_data.profile.image -%}
|
|
22
|
-
<div class="c-profile__image">
|
|
23
|
-
<img src="{{sidebar_data.profile.image}}" />
|
|
24
|
-
</div>
|
|
25
|
-
{%- endif -%}
|
|
26
|
-
<div class="c-profile__title">
|
|
27
|
-
{{- sidebar_data.profile.title | default: sidebar_data.profile.name -}}
|
|
28
|
-
</div>
|
|
29
|
-
<div class="c-profile__subtitle">
|
|
30
|
-
{{- sidebar_data.profile.subtitle | default: sidebar_data.profile.nickname | markdownify | remove: "<p>" | remove: "</p>" -}}
|
|
31
|
-
</div>
|
|
32
|
-
<div class="c-profile__description">
|
|
33
|
-
{{- sidebar_data.profile.bio | default: sidebar_data.profile.description | markdownify | remove: "<p>" | remove: "</p>" -}}
|
|
34
|
-
</div>
|
|
35
|
-
</div>
|
|
36
|
-
{%- endif -%}
|
|
37
|
-
|
|
38
|
-
{%- if sidebar_data.socials -%}
|
|
39
|
-
<table class="c-sociallist">
|
|
40
|
-
{%- for item in sidebar_data.socials -%}
|
|
41
|
-
{%- assign social = site.data.socials.[item.name] | default: site.data.databook.socials.[item.name] | default: site.data.databook.socials.link -%}
|
|
42
|
-
{%- assign text = item.text | default: social.text | default: item.value -%}
|
|
43
|
-
{%- assign url = item.url | default: social.url | replace: ":value", item.value | default: false -%}
|
|
44
|
-
{%- assign icon = item.icon | default: social.icon | default: false -%}
|
|
45
|
-
{%- include components/social_link.liquid url=url text=text icon=icon -%}
|
|
46
|
-
{%- endfor -%}
|
|
47
|
-
</table>
|
|
48
|
-
{%- endif -%}
|
|
49
|
-
|
|
50
|
-
{%- if sidebar_data.links -%}
|
|
51
|
-
<div class="c-navlist">
|
|
52
|
-
{%- for item in sidebar_data.links -%}
|
|
53
|
-
{%- assign is_active = false -%}
|
|
54
|
-
{%- if item.url == page.url -%}
|
|
55
|
-
{%- assign is_active = true -%}
|
|
56
|
-
{%- elsif item.prefix -%}
|
|
57
|
-
{%- assign prefix_checker = page.url | split: item.prefix -%}
|
|
58
|
-
{%- if prefix_checker.size > 1 and prefix_checker[0].size == 0 and prefix_checker[1].size > 0 -%}{%- assign is_active = true -%}{%- endif -%}
|
|
59
|
-
{%- endif -%}
|
|
60
|
-
<div class="c-navlist__item {%- if is_active %} is-active{%- endif -%}">
|
|
61
|
-
<a class="c-navlist__link" href="{{ item.url }}">
|
|
62
|
-
{{- item.text -}}
|
|
63
|
-
</a>
|
|
64
|
-
</div>
|
|
65
|
-
{%- endfor -%}
|
|
66
|
-
</div>
|
|
67
|
-
{%- endif -%}
|
|
68
|
-
|
|
69
|
-
{%- if sidebar_data.navigation -%}
|
|
70
|
-
<div class="c-navtree">
|
|
71
|
-
{%- for group in sidebar_data.navigation -%}
|
|
72
|
-
<div class="c-navtree__group {%- if group.bottom %} c-navtree__group--bottom{%- endif -%}">
|
|
73
|
-
<div class="c-navtree__label">
|
|
74
|
-
{{- group.text -}}
|
|
75
|
-
</div>
|
|
76
|
-
{%- for item in group.items -%}
|
|
77
|
-
{%- if item.text == "-" -%}
|
|
78
|
-
<div class="c-navmenu__divider"></div>
|
|
79
|
-
{%- else -%}
|
|
80
|
-
{%- assign is_expanded = false -%}
|
|
81
|
-
{%- if item.expanded or group.expanded or sidebar_data.expanded -%}
|
|
82
|
-
{%- assign is_expanded = true -%}
|
|
83
|
-
{%- elsif item.url == page.url -%}
|
|
84
|
-
{%- assign is_expanded = true -%}
|
|
85
|
-
{%- else -%}
|
|
86
|
-
{%- assign subitem_checker = item.items | where: "url", page.url | first -%}
|
|
87
|
-
{%- if subitem_checker -%}
|
|
88
|
-
{%- assign is_expanded = true -%}
|
|
89
|
-
{%- endif -%}
|
|
90
|
-
{%- endif -%}
|
|
91
|
-
{%- assign is_enabled = true -%}
|
|
92
|
-
{%- if item.url == nil and item.items == nil -%}
|
|
93
|
-
{%- assign is_enabled = false -%}
|
|
94
|
-
{%- endif -%}
|
|
95
|
-
{%- assign icon = item.icon | default: group.item_icon -%}
|
|
96
|
-
<div class="c-navtree__item {%- if item.disabled %} is-disabled{%- elsif item.url == page.url %} is-active{%- endif -%} {%- if is_expanded %} is-expanded{%- endif -%}">
|
|
97
|
-
{%- if item.disabled -%}
|
|
98
|
-
<a class="c-navtree__link"
|
|
99
|
-
{%- elsif item.url -%}
|
|
100
|
-
<a class="c-navtree__link" href="{{ item.url }}" {%- if item.external %} target="_blank"{%- endif -%}
|
|
101
|
-
{%- elsif item.onclick -%}
|
|
102
|
-
<a class="c-navtree__link" href="javascript:void(0);" onclick="{{ item.onclick }}"
|
|
103
|
-
{%- elsif item.items -%}
|
|
104
|
-
<a class="c-navtree__link" onclick="this.parentNode.classList.toggle('is-expanded');return false;"
|
|
105
|
-
{%- else -%}
|
|
106
|
-
<a class="c-navtree__link"
|
|
107
|
-
{%- endif -%}
|
|
108
|
-
{%- if item.title %} title="{{item.title}}"{%- endif -%}>
|
|
109
|
-
<div class="c-navtree__icon">{%- if icon -%}{%- include functions/get_icon.liquid icon=icon -%}{%- endif -%}</i></div>
|
|
110
|
-
<div class="c-navtree__text">{{ item.text }}</div>
|
|
111
|
-
{%- if item.badge -%}
|
|
112
|
-
<div class="c-navtree__badge">{%- include functions/get_icon.liquid icon=item.badge -%}</div>
|
|
113
|
-
{%- elsif item.external -%}
|
|
114
|
-
<div class="c-navtree__badge">{%- include functions/get_icon.liquid icon="fa fa-arrow-up-right-from-square" -%}</div>
|
|
115
|
-
{%- endif -%}
|
|
116
|
-
</a>
|
|
117
|
-
{%- if item.button -%}
|
|
118
|
-
{%- if item.button.url -%}
|
|
119
|
-
<a class="c-navtree__button" href="{{ item.button.url }}" {%- if item.button.external %} target="_blank"{%- endif -%}
|
|
120
|
-
{%- elsif item.button.onclick -%}
|
|
121
|
-
<a class="c-navtree__button" href="javascript:void(0);" onclick="{{ item.button.onclick }}"
|
|
122
|
-
{%- else -%}
|
|
123
|
-
<a class="c-navtree__button"
|
|
124
|
-
{%- endif -%}
|
|
125
|
-
{%- if item.button.title %} title="{{item.button.title}}"{%- endif -%}>
|
|
126
|
-
{%- include functions/get_icon.liquid icon=item.button.icon -%}
|
|
127
|
-
</a>
|
|
128
|
-
{%- elsif item.items -%}
|
|
129
|
-
<div class="c-navtree__button c-navtree__button--toggle" onclick="this.parentNode.classList.toggle('is-expanded');return false;"></div>
|
|
130
|
-
{%- endif -%}
|
|
131
|
-
</div>
|
|
132
|
-
{%- if item.items -%}
|
|
133
|
-
<div class="c-navtree__list">
|
|
134
|
-
{%- for subitem in item.items -%}
|
|
135
|
-
<div class="c-navtree__item {%- if subitem.url == page.url %} is-active{%- endif -%}">
|
|
136
|
-
{%- if subitem.url -%}
|
|
137
|
-
<a class="c-navtree__link" href="{{ subitem.url }}">
|
|
138
|
-
{%- elsif subitem.onclick -%}
|
|
139
|
-
<a class="c-navtree__link" href="javascript:void(0);" onclick="{{ subitem.onclick }};document.activeElement.blur();">
|
|
140
|
-
{%- else -%}
|
|
141
|
-
<a class="c-navtree__link">
|
|
142
|
-
{%- endif -%}
|
|
143
|
-
<div class="c-navtree__text">{{ subitem.text }}</div>
|
|
144
|
-
</a>
|
|
145
|
-
</div>
|
|
146
|
-
{%- endfor -%}
|
|
147
|
-
</div>
|
|
148
|
-
{%- endif -%}
|
|
149
|
-
{%- endif -%}
|
|
150
|
-
{%- endfor -%}
|
|
151
|
-
</div>
|
|
152
|
-
{%- endfor -%}
|
|
153
|
-
</div>
|
|
154
|
-
{%- endif -%}
|
|
155
|
-
|
|
156
|
-
{%- if sidebar_data.buttons -%}
|
|
157
|
-
<div class="c-sidebuttons">
|
|
158
|
-
{%- for item in sidebar_data.buttons -%}
|
|
159
|
-
{%- if item.name -%}
|
|
160
|
-
{%- assign social = site.data.socials.[item.name] | default: site.data.databook.socials.[item.name] | default: site.data.databook.socials.link -%}
|
|
161
|
-
{%- assign text = item.text | default: social.text | default: item.value -%}
|
|
162
|
-
{%- assign url = item.url | default: social.url | replace: ":value", item.value | default: false -%}
|
|
163
|
-
{%- assign icon = item.icon | default: social.icon | default: false -%}
|
|
164
|
-
{%- include components/social_button.liquid url=url text=text icon=icon -%}
|
|
165
|
-
{%- else -%}
|
|
166
|
-
{%- include components/social_button.liquid url=item.url text=item.text icon=item.icon -%}
|
|
167
|
-
{%- endif -%}
|
|
168
|
-
{%- endfor -%}
|
|
169
|
-
</div>
|
|
170
|
-
{%- endif -%}
|
|
171
|
-
</div>
|
|
172
|
-
|
|
173
|
-
{%- if sidebar_data.footer_html -%}
|
|
174
|
-
<div class="l-sidebar__footer">
|
|
175
|
-
{{- sidebar_data.footer_html -}}
|
|
176
|
-
</div>
|
|
177
|
-
{%- endif -%}
|
|
178
|
-
</aside>
|
|
1
|
+
{%- assign sidebar_data = include.data -%}
|
|
2
|
+
|
|
3
|
+
<input type="checkbox" id="sidebar-toggler" class="h-toggler"/>
|
|
4
|
+
<aside class="l-sidebar {%- if sidebar_data.sticky %} l-sidebar--sticky{%- endif %}" {%- if sidebar_data.width %} style="--db-sidebar-width: {{sidebar_data.width}};"{%- endif -%}>
|
|
5
|
+
{%- if sidebar_data.header != false -%}
|
|
6
|
+
<div class="l-sidebar__header">
|
|
7
|
+
<a class="c-logo" href="{{ '/' | relative_url }}">
|
|
8
|
+
<img class="c-logo__image" src="{{ sidebar_data.header.logo | default: site.logo | relative_url }}" alt="Logo" />
|
|
9
|
+
<span class="c-logo__text">{{- sidebar_data.header.text | default: site.logo_text | default: site.title | escape -}}</span>
|
|
10
|
+
</a>
|
|
11
|
+
</div>
|
|
12
|
+
{%- elsif sidebar_data.header_html -%}
|
|
13
|
+
<div class="l-sidebar__header">
|
|
14
|
+
{{- sidebar_data.header_html -}}
|
|
15
|
+
</div>
|
|
16
|
+
{%- endif -%}
|
|
17
|
+
|
|
18
|
+
<div class="l-sidebar__body u-thinscrollbar">
|
|
19
|
+
{%- if sidebar_data.profile -%}
|
|
20
|
+
<div class="c-profile">
|
|
21
|
+
{%- if sidebar_data.profile.image -%}
|
|
22
|
+
<div class="c-profile__image">
|
|
23
|
+
<img src="{{sidebar_data.profile.image}}" />
|
|
24
|
+
</div>
|
|
25
|
+
{%- endif -%}
|
|
26
|
+
<div class="c-profile__title">
|
|
27
|
+
{{- sidebar_data.profile.title | default: sidebar_data.profile.name -}}
|
|
28
|
+
</div>
|
|
29
|
+
<div class="c-profile__subtitle">
|
|
30
|
+
{{- sidebar_data.profile.subtitle | default: sidebar_data.profile.nickname | markdownify | remove: "<p>" | remove: "</p>" -}}
|
|
31
|
+
</div>
|
|
32
|
+
<div class="c-profile__description">
|
|
33
|
+
{{- sidebar_data.profile.bio | default: sidebar_data.profile.description | markdownify | remove: "<p>" | remove: "</p>" -}}
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
{%- endif -%}
|
|
37
|
+
|
|
38
|
+
{%- if sidebar_data.socials -%}
|
|
39
|
+
<table class="c-sociallist">
|
|
40
|
+
{%- for item in sidebar_data.socials -%}
|
|
41
|
+
{%- assign social = site.data.socials.[item.name] | default: site.data.databook.socials.[item.name] | default: site.data.databook.socials.link -%}
|
|
42
|
+
{%- assign text = item.text | default: social.text | default: item.value -%}
|
|
43
|
+
{%- assign url = item.url | default: social.url | replace: ":value", item.value | default: false -%}
|
|
44
|
+
{%- assign icon = item.icon | default: social.icon | default: false -%}
|
|
45
|
+
{%- include components/social_link.liquid url=url text=text icon=icon -%}
|
|
46
|
+
{%- endfor -%}
|
|
47
|
+
</table>
|
|
48
|
+
{%- endif -%}
|
|
49
|
+
|
|
50
|
+
{%- if sidebar_data.links -%}
|
|
51
|
+
<div class="c-navlist">
|
|
52
|
+
{%- for item in sidebar_data.links -%}
|
|
53
|
+
{%- assign is_active = false -%}
|
|
54
|
+
{%- if item.url == page.url -%}
|
|
55
|
+
{%- assign is_active = true -%}
|
|
56
|
+
{%- elsif item.prefix -%}
|
|
57
|
+
{%- assign prefix_checker = page.url | split: item.prefix -%}
|
|
58
|
+
{%- if prefix_checker.size > 1 and prefix_checker[0].size == 0 and prefix_checker[1].size > 0 -%}{%- assign is_active = true -%}{%- endif -%}
|
|
59
|
+
{%- endif -%}
|
|
60
|
+
<div class="c-navlist__item {%- if is_active %} is-active{%- endif -%}">
|
|
61
|
+
<a class="c-navlist__link" href="{{ item.url }}">
|
|
62
|
+
{{- item.text -}}
|
|
63
|
+
</a>
|
|
64
|
+
</div>
|
|
65
|
+
{%- endfor -%}
|
|
66
|
+
</div>
|
|
67
|
+
{%- endif -%}
|
|
68
|
+
|
|
69
|
+
{%- if sidebar_data.navigation -%}
|
|
70
|
+
<div class="c-navtree">
|
|
71
|
+
{%- for group in sidebar_data.navigation -%}
|
|
72
|
+
<div class="c-navtree__group {%- if group.bottom %} c-navtree__group--bottom{%- endif -%}">
|
|
73
|
+
<div class="c-navtree__label">
|
|
74
|
+
{{- group.text -}}
|
|
75
|
+
</div>
|
|
76
|
+
{%- for item in group.items -%}
|
|
77
|
+
{%- if item.text == "-" -%}
|
|
78
|
+
<div class="c-navmenu__divider"></div>
|
|
79
|
+
{%- else -%}
|
|
80
|
+
{%- assign is_expanded = false -%}
|
|
81
|
+
{%- if item.expanded or group.expanded or sidebar_data.expanded -%}
|
|
82
|
+
{%- assign is_expanded = true -%}
|
|
83
|
+
{%- elsif item.url == page.url -%}
|
|
84
|
+
{%- assign is_expanded = true -%}
|
|
85
|
+
{%- else -%}
|
|
86
|
+
{%- assign subitem_checker = item.items | where: "url", page.url | first -%}
|
|
87
|
+
{%- if subitem_checker -%}
|
|
88
|
+
{%- assign is_expanded = true -%}
|
|
89
|
+
{%- endif -%}
|
|
90
|
+
{%- endif -%}
|
|
91
|
+
{%- assign is_enabled = true -%}
|
|
92
|
+
{%- if item.url == nil and item.items == nil -%}
|
|
93
|
+
{%- assign is_enabled = false -%}
|
|
94
|
+
{%- endif -%}
|
|
95
|
+
{%- assign icon = item.icon | default: group.item_icon -%}
|
|
96
|
+
<div class="c-navtree__item {%- if item.disabled %} is-disabled{%- elsif item.url == page.url %} is-active{%- endif -%} {%- if is_expanded %} is-expanded{%- endif -%}">
|
|
97
|
+
{%- if item.disabled -%}
|
|
98
|
+
<a class="c-navtree__link"
|
|
99
|
+
{%- elsif item.url -%}
|
|
100
|
+
<a class="c-navtree__link" href="{{ item.url }}" {%- if item.external %} target="_blank"{%- endif -%}
|
|
101
|
+
{%- elsif item.onclick -%}
|
|
102
|
+
<a class="c-navtree__link" href="javascript:void(0);" onclick="{{ item.onclick }}"
|
|
103
|
+
{%- elsif item.items -%}
|
|
104
|
+
<a class="c-navtree__link" onclick="this.parentNode.classList.toggle('is-expanded');return false;"
|
|
105
|
+
{%- else -%}
|
|
106
|
+
<a class="c-navtree__link"
|
|
107
|
+
{%- endif -%}
|
|
108
|
+
{%- if item.title %} title="{{item.title}}"{%- endif -%}>
|
|
109
|
+
<div class="c-navtree__icon">{%- if icon -%}{%- include functions/get_icon.liquid icon=icon -%}{%- endif -%}</i></div>
|
|
110
|
+
<div class="c-navtree__text">{{ item.text }}</div>
|
|
111
|
+
{%- if item.badge -%}
|
|
112
|
+
<div class="c-navtree__badge">{%- include functions/get_icon.liquid icon=item.badge -%}</div>
|
|
113
|
+
{%- elsif item.external -%}
|
|
114
|
+
<div class="c-navtree__badge">{%- include functions/get_icon.liquid icon="fa fa-arrow-up-right-from-square" -%}</div>
|
|
115
|
+
{%- endif -%}
|
|
116
|
+
</a>
|
|
117
|
+
{%- if item.button -%}
|
|
118
|
+
{%- if item.button.url -%}
|
|
119
|
+
<a class="c-navtree__button" href="{{ item.button.url }}" {%- if item.button.external %} target="_blank"{%- endif -%}
|
|
120
|
+
{%- elsif item.button.onclick -%}
|
|
121
|
+
<a class="c-navtree__button" href="javascript:void(0);" onclick="{{ item.button.onclick }}"
|
|
122
|
+
{%- else -%}
|
|
123
|
+
<a class="c-navtree__button"
|
|
124
|
+
{%- endif -%}
|
|
125
|
+
{%- if item.button.title %} title="{{item.button.title}}"{%- endif -%}>
|
|
126
|
+
{%- include functions/get_icon.liquid icon=item.button.icon -%}
|
|
127
|
+
</a>
|
|
128
|
+
{%- elsif item.items -%}
|
|
129
|
+
<div class="c-navtree__button c-navtree__button--toggle" onclick="this.parentNode.classList.toggle('is-expanded');return false;"></div>
|
|
130
|
+
{%- endif -%}
|
|
131
|
+
</div>
|
|
132
|
+
{%- if item.items -%}
|
|
133
|
+
<div class="c-navtree__list">
|
|
134
|
+
{%- for subitem in item.items -%}
|
|
135
|
+
<div class="c-navtree__item {%- if subitem.url == page.url %} is-active{%- endif -%}">
|
|
136
|
+
{%- if subitem.url -%}
|
|
137
|
+
<a class="c-navtree__link" href="{{ subitem.url }}">
|
|
138
|
+
{%- elsif subitem.onclick -%}
|
|
139
|
+
<a class="c-navtree__link" href="javascript:void(0);" onclick="{{ subitem.onclick }};document.activeElement.blur();">
|
|
140
|
+
{%- else -%}
|
|
141
|
+
<a class="c-navtree__link">
|
|
142
|
+
{%- endif -%}
|
|
143
|
+
<div class="c-navtree__text">{{ subitem.text }}</div>
|
|
144
|
+
</a>
|
|
145
|
+
</div>
|
|
146
|
+
{%- endfor -%}
|
|
147
|
+
</div>
|
|
148
|
+
{%- endif -%}
|
|
149
|
+
{%- endif -%}
|
|
150
|
+
{%- endfor -%}
|
|
151
|
+
</div>
|
|
152
|
+
{%- endfor -%}
|
|
153
|
+
</div>
|
|
154
|
+
{%- endif -%}
|
|
155
|
+
|
|
156
|
+
{%- if sidebar_data.buttons -%}
|
|
157
|
+
<div class="c-sidebuttons">
|
|
158
|
+
{%- for item in sidebar_data.buttons -%}
|
|
159
|
+
{%- if item.name -%}
|
|
160
|
+
{%- assign social = site.data.socials.[item.name] | default: site.data.databook.socials.[item.name] | default: site.data.databook.socials.link -%}
|
|
161
|
+
{%- assign text = item.text | default: social.text | default: item.value -%}
|
|
162
|
+
{%- assign url = item.url | default: social.url | replace: ":value", item.value | default: false -%}
|
|
163
|
+
{%- assign icon = item.icon | default: social.icon | default: false -%}
|
|
164
|
+
{%- include components/social_button.liquid url=url text=text icon=icon -%}
|
|
165
|
+
{%- else -%}
|
|
166
|
+
{%- include components/social_button.liquid url=item.url text=item.text icon=item.icon -%}
|
|
167
|
+
{%- endif -%}
|
|
168
|
+
{%- endfor -%}
|
|
169
|
+
</div>
|
|
170
|
+
{%- endif -%}
|
|
171
|
+
</div>
|
|
172
|
+
|
|
173
|
+
{%- if sidebar_data.footer_html -%}
|
|
174
|
+
<div class="l-sidebar__footer">
|
|
175
|
+
{{- sidebar_data.footer_html -}}
|
|
176
|
+
</div>
|
|
177
|
+
{%- endif -%}
|
|
178
|
+
</aside>
|
data/_includes/localize
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
{%- assign key = include.key -%}
|
|
2
|
-
{%- assign code = include.
|
|
3
|
-
{%- assign primary = code | split: "-" | first -%}
|
|
4
|
-
{%- assign debug = "<span class="h-debug">" | append: key | append: "</span>" -%}
|
|
5
|
-
|
|
6
|
-
{%- if include.is_plural or include.count > 1 -%}
|
|
7
|
-
{%- assign plural_key = key | append: "_plural" -%}
|
|
8
|
-
{%- assign text = site.data.databook.locale.[code].[plural_key]
|
|
9
|
-
| default: site.data.databook.locale.[code].[key]
|
|
10
|
-
| default: site.data.databook.locale.[primary].[plural_key]
|
|
11
|
-
| default: site.data.databook.locale.[primary].[key]
|
|
12
|
-
| default: include.default
|
|
13
|
-
| default: debug
|
|
14
|
-
-%}
|
|
15
|
-
{%- else -%}
|
|
16
|
-
{%- assign text = site.data.databook.locale.[code].[key]
|
|
17
|
-
| default: site.data.databook.locale.[primary].[key]
|
|
18
|
-
| default: include.default
|
|
19
|
-
| default: debug
|
|
20
|
-
-%}
|
|
21
|
-
{%- endif -%}
|
|
22
|
-
|
|
23
|
-
{%- assign text = text
|
|
24
|
-
| replace: ":param1", include.param1
|
|
25
|
-
| replace: ":param2", include.param2
|
|
26
|
-
| replace: ":param3", include.param3
|
|
27
|
-
-%}
|
|
28
|
-
|
|
29
|
-
{{- text -}}
|
|
1
|
+
{%- assign key = include.key -%}
|
|
2
|
+
{%- assign code = include.lang | default: page.lang | default: site.lang -%}
|
|
3
|
+
{%- assign primary = code | split: "-" | first -%}
|
|
4
|
+
{%- assign debug = "<span class="h-debug">" | append: key | append: "</span>" -%}
|
|
5
|
+
|
|
6
|
+
{%- if include.is_plural or include.count > 1 -%}
|
|
7
|
+
{%- assign plural_key = key | append: "_plural" -%}
|
|
8
|
+
{%- assign text = site.data.databook.locale.[code].[plural_key]
|
|
9
|
+
| default: site.data.databook.locale.[code].[key]
|
|
10
|
+
| default: site.data.databook.locale.[primary].[plural_key]
|
|
11
|
+
| default: site.data.databook.locale.[primary].[key]
|
|
12
|
+
| default: include.default
|
|
13
|
+
| default: debug
|
|
14
|
+
-%}
|
|
15
|
+
{%- else -%}
|
|
16
|
+
{%- assign text = site.data.databook.locale.[code].[key]
|
|
17
|
+
| default: site.data.databook.locale.[primary].[key]
|
|
18
|
+
| default: include.default
|
|
19
|
+
| default: debug
|
|
20
|
+
-%}
|
|
21
|
+
{%- endif -%}
|
|
22
|
+
|
|
23
|
+
{%- assign text = text
|
|
24
|
+
| replace: ":param1", include.param1
|
|
25
|
+
| replace: ":param2", include.param2
|
|
26
|
+
| replace: ":param3", include.param3
|
|
27
|
+
-%}
|
|
28
|
+
|
|
29
|
+
{{- text -}}
|
data/_includes/notice
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<div class="c-notice c-notice--type-{{- include.type | default: info -}}">
|
|
2
|
-
{%- if include.title -%}
|
|
3
|
-
<div class="c-notice__header">{{- include.title | markdownify | remove: "<p>" | remove: "</p>" -}}</div>
|
|
4
|
-
{%- endif -%}
|
|
5
|
-
<div class="c-notice__body">{{- include.text | markdownify | remove: "<p>" | remove: "</p>" -}}</div>
|
|
6
|
-
</div>
|
|
1
|
+
<div class="c-notice c-notice--type-{{- include.type | default: info -}}">
|
|
2
|
+
{%- if include.title -%}
|
|
3
|
+
<div class="c-notice__header">{{- include.title | markdownify | remove: "<p>" | remove: "</p>" -}}</div>
|
|
4
|
+
{%- endif -%}
|
|
5
|
+
<div class="c-notice__body">{{- include.text | markdownify | remove: "<p>" | remove: "</p>" -}}</div>
|
|
6
|
+
</div>
|
data/_includes/version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.
|
|
1
|
+
0.1.2
|
data/_layouts/article.liquid
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
---
|
|
2
|
-
layout: default
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
{%- include layout/article.liquid
|
|
6
|
-
page = page
|
|
7
|
-
content = content
|
|
8
|
-
has_side = true
|
|
9
|
-
toc = true
|
|
10
|
-
-%}
|
|
1
|
+
---
|
|
2
|
+
layout: default
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
{%- include layout/article.liquid
|
|
6
|
+
page = page
|
|
7
|
+
content = content
|
|
8
|
+
has_side = true
|
|
9
|
+
toc = true
|
|
10
|
+
-%}
|