databook-theme 0.1.1
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 +1 -0
- data/_includes/blog/blog.liquid +50 -0
- data/_includes/blog/features.liquid +36 -0
- data/_includes/blog/full.liquid +3 -0
- data/_includes/blog/list.liquid +41 -0
- data/_includes/blog/post.liquid +6 -0
- data/_includes/components/analytics.google.liquid +11 -0
- data/_includes/components/analytics.liquid +11 -0
- data/_includes/components/comments.disqus.liquid +17 -0
- data/_includes/components/comments.gitalk.liquid +22 -0
- data/_includes/components/comments.liquid +13 -0
- data/_includes/components/navmenu.items.liquid +51 -0
- data/_includes/components/navmenu.liquid +4 -0
- data/_includes/components/pagination.liquid +83 -0
- data/_includes/components/prevnext.liquid +1 -0
- data/_includes/components/search.baidu.liquid +7 -0
- data/_includes/components/search.bing.liquid +6 -0
- data/_includes/components/search.google.liquid +6 -0
- data/_includes/components/search.liquid +21 -0
- data/_includes/components/social_button.liquid +9 -0
- data/_includes/components/social_link.liquid +14 -0
- data/_includes/components/title.liquid +41 -0
- data/_includes/components/toc.liquid +28 -0
- data/_includes/custom/analytics.liquid +3 -0
- data/_includes/custom/blog.liquid +3 -0
- data/_includes/custom/body.liquid +3 -0
- data/_includes/custom/comments.liquid +3 -0
- data/_includes/custom/footer.liquid +3 -0
- data/_includes/custom/head.liquid +3 -0
- data/_includes/custom/katex.liquid +15 -0
- data/_includes/custom/mathjax.liquid +19 -0
- data/_includes/custom/search.liquid +3 -0
- data/_includes/extensions/toc.liquid +182 -0
- data/_includes/functions/get_config.liquid +11 -0
- data/_includes/functions/get_config_data.liquid +23 -0
- data/_includes/functions/get_icon.liquid +5 -0
- data/_includes/functions/get_page_meta.liquid +60 -0
- data/_includes/functions/get_page_thumbnail.liquid +23 -0
- data/_includes/functions/get_page_title.liquid +7 -0
- data/_includes/functions/get_recent_posts.liquid +17 -0
- data/_includes/functions/get_taxonomy_link.liquid +9 -0
- data/_includes/head/head.liquid +12 -0
- data/_includes/head/meta.liquid +41 -0
- data/_includes/head/opengraph.liquid +1 -0
- data/_includes/head/requirements.liquid +87 -0
- data/_includes/head/styles.liquid +10 -0
- data/_includes/js/codes.js +116 -0
- data/_includes/js/scrollspy.js +16 -0
- data/_includes/layout/article.liquid +71 -0
- data/_includes/layout/footer.liquid +53 -0
- data/_includes/layout/header.liquid +31 -0
- data/_includes/layout/hero.liquid +29 -0
- data/_includes/layout/page.liquid +33 -0
- data/_includes/layout/pagehead.liquid +17 -0
- data/_includes/layout/sidebar.liquid +178 -0
- data/_includes/localize +29 -0
- data/_includes/notice +6 -0
- data/_includes/version +1 -0
- data/_layouts/article.liquid +10 -0
- data/_layouts/default.liquid +131 -0
- data/_layouts/home.liquid +20 -0
- data/_layouts/page.liquid +9 -0
- data/_layouts/post.liquid +9 -0
- data/_layouts/system.liquid +35 -0
- data/_layouts/taxonomy.liquid +67 -0
- data/_sass/_custom.scss +0 -0
- data/_sass/_databook.scss +42 -0
- data/_sass/_debug.scss +7 -0
- data/_sass/_variables.scss +24 -0
- data/_sass/base/_misc.scss +0 -0
- data/_sass/base/_mixins.scss +32 -0
- data/_sass/base/_normalize.scss +45 -0
- data/_sass/base/_responsive.scss +28 -0
- data/_sass/components/_archive.scss +49 -0
- data/_sass/components/_blog.scss +249 -0
- data/_sass/components/_forms.scss +30 -0
- data/_sass/components/_hero.scss +70 -0
- data/_sass/components/_misc.scss +3 -0
- data/_sass/components/_notice.scss +27 -0
- data/_sass/components/_notification.scss +10 -0
- data/_sass/components/_post.scss +19 -0
- data/_sass/components/_sidebar.scss +303 -0
- data/_sass/components/_tabs.scss +67 -0
- data/_sass/components/_text.scss +27 -0
- data/_sass/components/_toc.scss +50 -0
- data/_sass/layout/_article.scss +211 -0
- data/_sass/layout/_body.scss +26 -0
- data/_sass/layout/_footer.scss +76 -0
- data/_sass/layout/_header.scss +124 -0
- data/_sass/layout/_main.scss +8 -0
- data/_sass/layout/_misc.scss +7 -0
- data/_sass/layout/_navbar.scss +323 -0
- data/_sass/layout/_sidebar.scss +115 -0
- data/_sass/layout/_wrapper.scss +7 -0
- data/_sass/theme/_scheme.scss +112 -0
- data/_sass/typography/_article.scss +49 -0
- data/_sass/typography/_doc.scss +104 -0
- data/_sass/typography/_highlight.scss +208 -0
- data/_sass/typography/_markdown.scss +18 -0
- data/_sass/typography/_table.scss +119 -0
- data/_sass/typography/_typography.scss +108 -0
- data/_sass/utilities/_thinscrollbar.scss +35 -0
- data/assets/databook/css/databook.scss +6 -0
- data/assets/databook/img/avatar.png +0 -0
- data/assets/databook/img/logo.png +0 -0
- data/assets/databook/js/databook.js +8 -0
- data/assets/databook/js/search.js +47 -0
- data/assets/databook/version.json +9 -0
- data/assets/favicon.ico +0 -0
- data/assets/search.json +30 -0
- metadata +224 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{%- assign pageitem = include.page | default: page -%}
|
|
2
|
+
{%- assign html_content = include.content | default: pageitem.content -%}
|
|
3
|
+
|
|
4
|
+
{%- assign typography = pageitem.typography | default: layout.typography | default: site.typography | default: "article" -%}
|
|
5
|
+
{%- assign hide_title = pageitem.hide_title -%}
|
|
6
|
+
|
|
7
|
+
{%- capture page_title -%}
|
|
8
|
+
{%- include functions/get_page_title.liquid page=pageitem -%}
|
|
9
|
+
{%- endcapture -%}
|
|
10
|
+
|
|
11
|
+
{%- capture page_meta -%}
|
|
12
|
+
{%- include functions/get_page_meta.liquid
|
|
13
|
+
page = pageitem
|
|
14
|
+
tags = true
|
|
15
|
+
authors = true
|
|
16
|
+
details = true
|
|
17
|
+
-%}
|
|
18
|
+
{%- endcapture -%}
|
|
19
|
+
|
|
20
|
+
{%- capture breadcrumb -%}
|
|
21
|
+
<div class="c-breadcrumb">
|
|
22
|
+
<span class="c-breadcrumb__item">
|
|
23
|
+
<a href="{{- '/' | relative_url -}}">{%- include localize key="title_home" default="Home" -%}</a>
|
|
24
|
+
</span>
|
|
25
|
+
{%- for category in pageitem.categories -%}
|
|
26
|
+
<span class="c-breadcrumb__item">
|
|
27
|
+
<a href="{%- include functions/get_taxonomy_link.liquid category=category -%}">{{- category -}}</a>
|
|
28
|
+
</span>
|
|
29
|
+
{%- endfor -%}
|
|
30
|
+
</div>
|
|
31
|
+
{%- endcapture -%}
|
|
32
|
+
|
|
33
|
+
{%- capture page_header -%}
|
|
34
|
+
{%- unless hide_title -%}
|
|
35
|
+
{%- include components/title.liquid
|
|
36
|
+
breadcrumb = breadcrumb
|
|
37
|
+
title = page_title
|
|
38
|
+
url = pageitem.url
|
|
39
|
+
meta = page_meta
|
|
40
|
+
-%}
|
|
41
|
+
{%- endunless -%}
|
|
42
|
+
{%- endcapture -%}
|
|
43
|
+
|
|
44
|
+
{%- assign has_side = include.has_side -%}
|
|
45
|
+
{%- assign page_side = false -%}
|
|
46
|
+
{%- if has_side -%}
|
|
47
|
+
{%- capture page_side -%}
|
|
48
|
+
{%- include components/toc.liquid html=html_content -%}
|
|
49
|
+
{%- endcapture -%}
|
|
50
|
+
{%- endif -%}
|
|
51
|
+
|
|
52
|
+
{%- capture page_content -%}
|
|
53
|
+
{%- if pageitem.thumbnail -%}
|
|
54
|
+
<img class="c-thumbnail" src="{{- pageitem.thumbnail -}}" />
|
|
55
|
+
{%- endif -%}
|
|
56
|
+
{{- html_content -}}
|
|
57
|
+
{%- endcapture -%}
|
|
58
|
+
|
|
59
|
+
{%- capture page_footer -%}
|
|
60
|
+
{%- include components/prevnext.liquid -%}
|
|
61
|
+
{%- endcapture -%}
|
|
62
|
+
|
|
63
|
+
{%- include layout/page.liquid
|
|
64
|
+
type = "article"
|
|
65
|
+
src = pageitem.url
|
|
66
|
+
header = page_header
|
|
67
|
+
content = page_content
|
|
68
|
+
side = page_side
|
|
69
|
+
footer = page_footer
|
|
70
|
+
typography = typography
|
|
71
|
+
-%}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{%- assign footer_data = include.data -%}
|
|
2
|
+
|
|
3
|
+
{%- comment -%}todo: existence check{%- endcomment -%}
|
|
4
|
+
{%- assign custom_footer_file = footer_data.custom_file | default: "custom/footer.liquid" -%}
|
|
5
|
+
{%- capture custom_footer -%}
|
|
6
|
+
{%- include {{custom_footer_file}} -%}
|
|
7
|
+
{%- endcapture -%}
|
|
8
|
+
{%- assign custom_size = custom_footer | strip | strip_newlines | size -%}
|
|
9
|
+
|
|
10
|
+
<footer class="l-footer">
|
|
11
|
+
{%- if custom_size > 0 -%}
|
|
12
|
+
<div class="l-footer__custom">
|
|
13
|
+
{{- custom_footer -}}
|
|
14
|
+
</div>
|
|
15
|
+
{%- endif -%}
|
|
16
|
+
|
|
17
|
+
{%- if footer_data.text -%}
|
|
18
|
+
<div class="l-footer__text">
|
|
19
|
+
{{- footer_data.text -}}
|
|
20
|
+
</div>
|
|
21
|
+
{%- endif -%}
|
|
22
|
+
|
|
23
|
+
<div class="l-footer__left">
|
|
24
|
+
<div class="c-footer-list">
|
|
25
|
+
{%- if footer_data.copyright or site.copyright -%}
|
|
26
|
+
<div class="c-footer-list__item">
|
|
27
|
+
{{- footer_data.copyright | default: site.copyright | markdownify | remove: "<p>" | remove: "</p>" -}}
|
|
28
|
+
</div>
|
|
29
|
+
{%- endif -%}
|
|
30
|
+
{%- if footer_data.links -%}
|
|
31
|
+
{%- for item in footer_data.links -%}
|
|
32
|
+
<div class="c-footer-list__item">
|
|
33
|
+
{%- if item.url -%}<a href="{{ item.url }}">{%- endif -%}
|
|
34
|
+
{{- item.text -}}
|
|
35
|
+
{%- if item.url -%}</a>{%- endif -%}
|
|
36
|
+
</div>
|
|
37
|
+
{%- endfor -%}
|
|
38
|
+
{%- endif -%}
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
<div class="l-footer__middle">
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<div class="l-footer__right">
|
|
46
|
+
{%- if footer_data.provider or site.provider -%}
|
|
47
|
+
{{- footer_data.provider | default: site.provider | markdownify | remove: "<p>" | remove: "</p>" -}}
|
|
48
|
+
{%- else -%}
|
|
49
|
+
Powered by <a href="https://jekyllrb.com" rel="nofollow">Jekyll</a> & <a href="https://github.com/fortelle/databook-theme" rel="nofollow">Databook</a>
|
|
50
|
+
{%- endif -%}
|
|
51
|
+
</div>
|
|
52
|
+
|
|
53
|
+
</footer>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{%- assign header_data = include.data -%}
|
|
2
|
+
|
|
3
|
+
<header class="l-header {%- if header_data.sticky %} l-header--sticky{%- endif -%}">
|
|
4
|
+
|
|
5
|
+
<div class="l-header__left">
|
|
6
|
+
{%- if include.has_sidebar -%}
|
|
7
|
+
<label class="c-navbutton c-navbutton--sidebar" for="sidebar-toggler"></label>
|
|
8
|
+
{%- endif -%}
|
|
9
|
+
|
|
10
|
+
{%- if header_data.left_menu -%}
|
|
11
|
+
{%- include components/navmenu.liquid data=header_data.left_menu -%}
|
|
12
|
+
{%- endif -%}
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
<div class="l-header__logo">
|
|
16
|
+
<a class="c-logo" href="{{- '/' | relative_url -}}">
|
|
17
|
+
<img class="c-logo__image" src="{{- header_data.logo_url | default: site.logo | relative_url -}}" alt="Logo" />
|
|
18
|
+
<span class="c-logo__text">{{- header_data.logo_text | default: site.title | escape -}}</span>
|
|
19
|
+
</a>
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
<div class="l-header__right">
|
|
23
|
+
{%- if site.search -%}
|
|
24
|
+
{%- include components/search.liquid -%}
|
|
25
|
+
{%- endif -%}
|
|
26
|
+
{%- if header_data.right_menu -%}
|
|
27
|
+
{%- include components/navmenu.liquid data=header_data.right_menu is_right=true -%}
|
|
28
|
+
{%- endif -%}
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
</header>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{%- assign hero_data = include.data -%}
|
|
2
|
+
|
|
3
|
+
{%- assign hero_style = "" -%}
|
|
4
|
+
{%- if hero_data.image -%}
|
|
5
|
+
{%- assign hero_style = hero_style | append: "background-image: url(" | append: hero_data.image | append: ");" -%}
|
|
6
|
+
{%- endif -%}
|
|
7
|
+
{%- if hero_data.height -%}
|
|
8
|
+
{%- assign hero_style = hero_style | append: "height: " | append: hero_data.height | append: ";" -%}
|
|
9
|
+
{%- endif -%}
|
|
10
|
+
|
|
11
|
+
<div class="l-hero {%- if hero_data.overflow %} l-hero--overflow{%- endif -%}">
|
|
12
|
+
<div class="c-hero" style="{{- hero_style -}}">
|
|
13
|
+
{%- if hero_data.title -%}
|
|
14
|
+
<div class="c-hero__title">
|
|
15
|
+
{{- hero_data.title -}}
|
|
16
|
+
</div>
|
|
17
|
+
{%- endif -%}
|
|
18
|
+
{%- if hero_data.description -%}
|
|
19
|
+
<div class="c-hero__description">
|
|
20
|
+
{{- hero_data.description -}}
|
|
21
|
+
</div>
|
|
22
|
+
{%- endif -%}
|
|
23
|
+
{%- if hero_data.links -%}
|
|
24
|
+
<div class="c-hero__links">
|
|
25
|
+
{{- hero_data.links -}}
|
|
26
|
+
</div>
|
|
27
|
+
{%- endif -%}
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{%- capture page_header -%}
|
|
2
|
+
{%- unless include.hide_title -%}
|
|
3
|
+
<div class="l-page__header">
|
|
4
|
+
{%- if include.header -%}
|
|
5
|
+
{{- include.header -}}
|
|
6
|
+
{%- elsif include.title -%}
|
|
7
|
+
{%- include components/title.liquid
|
|
8
|
+
title = include.title
|
|
9
|
+
-%}
|
|
10
|
+
{%- endif -%}
|
|
11
|
+
</div>
|
|
12
|
+
{%- endunless -%}
|
|
13
|
+
{%- endcapture -%}
|
|
14
|
+
|
|
15
|
+
<div class="l-page" {%- if include.type %} data-type="{{include.type}}"{%- endif -%} {%- if include.src %} data-src="{{include.src}}"{%- endif -%}>
|
|
16
|
+
|
|
17
|
+
{{- page_header | strip_newlines -}}
|
|
18
|
+
|
|
19
|
+
{%- if include.side -%}
|
|
20
|
+
<div class="l-page__side" >
|
|
21
|
+
{{- include.side | strip_newlines -}}
|
|
22
|
+
</div>
|
|
23
|
+
{%- endif -%}
|
|
24
|
+
|
|
25
|
+
<div class="l-page__content {%- if include.typography %} l-typography l-typography--{{include.typography}}{%- endif -%}" >
|
|
26
|
+
{{- include.content -}}
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<div class="l-page__footer">
|
|
30
|
+
{{- include.footer | strip_newlines -}}
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
</div>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<div class="c-pagehead">
|
|
2
|
+
<div class="c-pagehead__breadcrumb">{{- include.breadcrumb -}}</div>
|
|
3
|
+
|
|
4
|
+
<h1 class="c-pagehead__title">
|
|
5
|
+
<a href="{{ include.url | relative_url }}">
|
|
6
|
+
{{- include.title -}}
|
|
7
|
+
</a>
|
|
8
|
+
</h1>
|
|
9
|
+
|
|
10
|
+
<div class="c-pagehead__right">
|
|
11
|
+
</div>
|
|
12
|
+
<div class="c-pagehead__tagline">{{- include.tagline | markdownify -}}</div>
|
|
13
|
+
|
|
14
|
+
<div class="c-pagehead__divider"></div>
|
|
15
|
+
<div class="c-pagehead__meta">{{- include.meta -}}</div>
|
|
16
|
+
<div class="c-pagehead__indicator">{{- include.indicator -}}</div>
|
|
17
|
+
</div>
|
|
@@ -0,0 +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>
|
data/_includes/localize
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{%- assign key = include.key -%}
|
|
2
|
+
{%- assign code = include.language | default: page.language | default: site.language -%}
|
|
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
ADDED
|
@@ -0,0 +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>
|
data/_includes/version
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.1.1
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
{%- assign html_attr = "" -%}
|
|
2
|
+
|
|
3
|
+
{%- comment -%}html_class{%- endcomment -%}
|
|
4
|
+
{%- assign html_class = "js-disabled" -%}
|
|
5
|
+
{%- if jekyll.environment == "development" %}
|
|
6
|
+
{%- assign html_class = html_class | append: " is-debug" -%}
|
|
7
|
+
{%- endif -%}
|
|
8
|
+
{%- if site.class %}
|
|
9
|
+
{%- assign html_class = html_class | append: site.class -%}
|
|
10
|
+
{%- endif -%}
|
|
11
|
+
{%- if layout.class %}
|
|
12
|
+
{%- assign html_class = html_class | append: layout.class -%}
|
|
13
|
+
{%- endif -%}
|
|
14
|
+
{%- if page.class %}
|
|
15
|
+
{%- assign html_class = html_class | append: page.class -%}
|
|
16
|
+
{%- endif -%}
|
|
17
|
+
{%- if html_class.size > 0 -%}
|
|
18
|
+
{%- assign html_attr = html_attr | append: " class='" | append: html_class | append: "'" -%}
|
|
19
|
+
{%- endif -%}
|
|
20
|
+
|
|
21
|
+
{%- comment -%}lang{%- endcomment -%}
|
|
22
|
+
{%- if site.language -%}
|
|
23
|
+
{%- assign html_attr = html_attr | append: " lang='" | append: site.language | append: "'" -%}
|
|
24
|
+
{%- endif -%}
|
|
25
|
+
|
|
26
|
+
{%- comment -%}html_style{%- endcomment -%}
|
|
27
|
+
{%- assign html_style = "" -%}
|
|
28
|
+
{%- if html_style.size > 0 -%}
|
|
29
|
+
{%- assign html_attr = html_attr | append: " style='" | append: html_style | append: "'" -%}
|
|
30
|
+
{%- endif -%}
|
|
31
|
+
|
|
32
|
+
{%- comment -%}data{%- endcomment -%}
|
|
33
|
+
{%- assign color_scheme = page.color_scheme | default: layout.color_scheme | default: site.color_scheme | default: false -%}
|
|
34
|
+
{%- if color_scheme -%}
|
|
35
|
+
{%- assign html_attr = html_attr | append: " data-color-scheme='" | append: color_scheme | append: "'" -%}
|
|
36
|
+
{%- endif -%}
|
|
37
|
+
|
|
38
|
+
{%- assign accent_color = page.accent_color | default: layout.accent_color | default: site.accent_color | default: false -%}
|
|
39
|
+
{%- if accent_color -%}
|
|
40
|
+
{%- assign html_attr = html_attr | append: " data-accent-color='" | append: accent_color | append: "'" -%}
|
|
41
|
+
{%- endif -%}
|
|
42
|
+
|
|
43
|
+
{%- comment -%}sidebar_data{%- endcomment -%}
|
|
44
|
+
{%- assign sidebar_data = nil -%}
|
|
45
|
+
{%- if layout.hero or page.hero -%}
|
|
46
|
+
{%- else -%}
|
|
47
|
+
{%- include functions/get_config_data.liquid key="sidebar" -%}
|
|
48
|
+
{%- assign sidebar_data = return -%}
|
|
49
|
+
{%- endif -%}
|
|
50
|
+
{%- assign has_sidebar = false -%}
|
|
51
|
+
{%- if sidebar_data -%}
|
|
52
|
+
{%- assign has_sidebar = true -%}
|
|
53
|
+
{%- endif -%}
|
|
54
|
+
|
|
55
|
+
{%- comment -%}header_data{%- endcomment -%}
|
|
56
|
+
{%- include functions/get_config_data.liquid key="header" -%}
|
|
57
|
+
{%- assign header_data = return | default: nil -%}
|
|
58
|
+
|
|
59
|
+
{%- comment -%}hero_data{%- endcomment -%}
|
|
60
|
+
{%- include functions/get_config_data.liquid key="hero" -%}
|
|
61
|
+
{%- assign hero_data = return | default: nil -%}
|
|
62
|
+
|
|
63
|
+
{%- comment -%}footer_data{%- endcomment -%}
|
|
64
|
+
{%- include functions/get_config_data.liquid key="footer" -%}
|
|
65
|
+
{%- assign footer_data = return | default: nil -%}
|
|
66
|
+
|
|
67
|
+
{%- comment -%}wrapper_class{%- endcomment -%}
|
|
68
|
+
{%- assign wrapper_class = "l-wrapper" -%}
|
|
69
|
+
{%- if page.layout -%}
|
|
70
|
+
{%- assign wrapper_class = wrapper_class | append: " l-wrapper--layout-" | append: page.layout -%}
|
|
71
|
+
{%- endif -%}
|
|
72
|
+
{%- if page.wide or layout.wide -%}
|
|
73
|
+
{%- assign wrapper_class = wrapper_class | append: " is-wide" -%}
|
|
74
|
+
{%- endif -%}
|
|
75
|
+
{%- if has_sidebar -%}
|
|
76
|
+
{%- assign wrapper_class = wrapper_class | append: " has-sidebar" -%}
|
|
77
|
+
{%- endif -%}
|
|
78
|
+
{%- if hero_data.overflow or header_data.translucent -%}
|
|
79
|
+
{%- assign wrapper_class = wrapper_class | append: " has-background" -%}
|
|
80
|
+
{%- endif -%}
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
{%- capture __PAGE_TITLE -%}
|
|
84
|
+
{%- include functions/get_page_title.liquid -%}
|
|
85
|
+
{%- endcapture -%}
|
|
86
|
+
|
|
87
|
+
{%- comment -%}
|
|
88
|
+
Html begin
|
|
89
|
+
{%- endcomment -%}
|
|
90
|
+
|
|
91
|
+
<!DOCTYPE html>
|
|
92
|
+
<html {{- html_attr -}}>
|
|
93
|
+
{% include head/head.liquid %}
|
|
94
|
+
<body>
|
|
95
|
+
<div class="{{- wrapper_class -}}">
|
|
96
|
+
|
|
97
|
+
{%- comment -%}l-sidebar{%- endcomment -%}
|
|
98
|
+
{%- if sidebar_data -%}
|
|
99
|
+
{%- include layout/sidebar.liquid data=sidebar_data -%}
|
|
100
|
+
{%- endif -%}
|
|
101
|
+
|
|
102
|
+
<main class="l-main">
|
|
103
|
+
{%- comment -%}l-header{%- endcomment -%}
|
|
104
|
+
{%- unless layout.hide_header or page.hide_header -%}
|
|
105
|
+
{%- include layout/header.liquid data=header_data has_sidebar=has_sidebar -%}
|
|
106
|
+
{%- endunless -%}
|
|
107
|
+
|
|
108
|
+
{%- comment -%}l-hero{%- endcomment -%}
|
|
109
|
+
{%- if hero_data -%}
|
|
110
|
+
{%- include layout/hero.liquid data=hero_data -%}
|
|
111
|
+
{%- endif -%}
|
|
112
|
+
|
|
113
|
+
{%- comment -%}l-body{%- endcomment -%}
|
|
114
|
+
<div class="l-body">
|
|
115
|
+
{{- content -}}
|
|
116
|
+
|
|
117
|
+
{%- include components/comments.liquid -%}
|
|
118
|
+
</div>
|
|
119
|
+
|
|
120
|
+
{%- comment -%}l-footer{%- endcomment -%}
|
|
121
|
+
{%- unless layout.hide_footer or page.hide_footer -%}
|
|
122
|
+
{%- include layout/footer.liquid data=footer_data -%}
|
|
123
|
+
{%- endunless -%}
|
|
124
|
+
</main>
|
|
125
|
+
|
|
126
|
+
</div>
|
|
127
|
+
|
|
128
|
+
{%- include custom/body.liquid -%}
|
|
129
|
+
|
|
130
|
+
</body>
|
|
131
|
+
</html>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: default
|
|
3
|
+
hide_title: true
|
|
4
|
+
comment: false
|
|
5
|
+
toc: false
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
{%- assign content_size = content | strip | strip_newlines | size -%}
|
|
9
|
+
|
|
10
|
+
{%- if page.url == "/" and content_size > 0 -%}
|
|
11
|
+
{%- include layout/page.liquid
|
|
12
|
+
type = "home"
|
|
13
|
+
content=content
|
|
14
|
+
hide_title=true
|
|
15
|
+
-%}
|
|
16
|
+
{%- endif -%}
|
|
17
|
+
|
|
18
|
+
{%- unless site.paginate_first_page_path -%}
|
|
19
|
+
{%- include blog/blog.liquid -%}
|
|
20
|
+
{%- endunless -%}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: default
|
|
3
|
+
comment: false
|
|
4
|
+
toc: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
{%- assign hide_title = page.hide_title | default: layout.hide_title | default: false -%}
|
|
8
|
+
|
|
9
|
+
{%- capture title -%}
|
|
10
|
+
{%- include functions/get_page_title.liquid -%}
|
|
11
|
+
{%- endcapture -%}
|
|
12
|
+
|
|
13
|
+
{%- capture header -%}
|
|
14
|
+
{%- unless hide_title -%}
|
|
15
|
+
{%- include components/title.liquid
|
|
16
|
+
title = title
|
|
17
|
+
url = page.url
|
|
18
|
+
meta = page.subtitle
|
|
19
|
+
-%}
|
|
20
|
+
{%- endunless -%}
|
|
21
|
+
{%- endcapture -%}
|
|
22
|
+
|
|
23
|
+
<div class="l-page">
|
|
24
|
+
|
|
25
|
+
{%- unless hide_title -%}
|
|
26
|
+
<div class="l-page__header">
|
|
27
|
+
{{- header -}}
|
|
28
|
+
</div>
|
|
29
|
+
{%- endunless -%}
|
|
30
|
+
|
|
31
|
+
<div class="l-page__content" >
|
|
32
|
+
{{- content | markdownify -}}
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
</div>
|