From 61b34a5f260db45575d448d766ea29c0fb273ed3 Mon Sep 17 00:00:00 2001 From: Karl Hallsby Date: Sun, 27 Sep 2020 14:31:36 -0500 Subject: Add jekyll-text-theme YAML files --- _layouts/404.html | 13 +++ _layouts/archive.html | 39 +++++++ _layouts/article.html | 29 ++++++ _layouts/articles.html | 89 ++++++++++++++++ _layouts/base.html | 25 +++++ _layouts/home.html | 42 ++++++++ _layouts/landing.html | 178 ++++++++++++++++++++++++++++++++ _layouts/none.html | 1 + _layouts/page.html | 270 +++++++++++++++++++++++++++++++++++++++++++++++++ 9 files changed, 686 insertions(+) create mode 100644 _layouts/404.html create mode 100644 _layouts/archive.html create mode 100644 _layouts/article.html create mode 100644 _layouts/articles.html create mode 100644 _layouts/base.html create mode 100644 _layouts/home.html create mode 100644 _layouts/landing.html create mode 100644 _layouts/none.html create mode 100644 _layouts/page.html (limited to '_layouts') diff --git a/_layouts/404.html b/_layouts/404.html new file mode 100644 index 0000000..4dd94a6 --- /dev/null +++ b/_layouts/404.html @@ -0,0 +1,13 @@ +--- +layout: page +title: 404 +show_title: false +--- +
+
+

404

+

Page not found :(

+
+
+ +{{ content }} diff --git a/_layouts/archive.html b/_layouts/archive.html new file mode 100644 index 0000000..02412a6 --- /dev/null +++ b/_layouts/archive.html @@ -0,0 +1,39 @@ +--- +layout: page +titles: + # @start locale config + en : &EN Archive + en-GB : *EN + en-US : *EN + en-CA : *EN + en-AU : *EN + zh-Hans : &ZH_HANS 归档 + zh : *ZH_HANS + zh-CN : *ZH_HANS + zh-SG : *ZH_HANS + zh-Hant : &ZH_HANT 歸檔 + zh-TW : *ZH_HANT + zh-HK : *ZH_HANT + ko : &KO 아카이브 + ko-KR : *KO + fr : &FR Archives + fr-BE : *FR + fr-CA : *FR + fr-CH : *FR + fr-FR : *FR + fr-LU : *FR + # @end locale config +--- + +
+ {%- include tags.html -%} +
+ {%- include article-list.html articles=site.posts type='brief' show_info=true reverse=true group_by='year' -%} +
+
+ + + +{{ content }} diff --git a/_layouts/article.html b/_layouts/article.html new file mode 100644 index 0000000..80f3b3c --- /dev/null +++ b/_layouts/article.html @@ -0,0 +1,29 @@ +--- +layout: page +type: article +--- + +{%- include snippets/assign.html + target = site.data.variables.default.page.sharing + source0=layout.sharing source1=page.sharing -%} +{%- assign _sharing = __return -%} + +
+ {%- include article/top/custom.html -%} + +
{{ content }}
+ + {%- if _sharing -%} + + {%- endif -%} + +
+ {%- include article-footer.html -%} + {%- include article-section-navigator.html -%} +
+ +
+ + diff --git a/_layouts/articles.html b/_layouts/articles.html new file mode 100644 index 0000000..00738a1 --- /dev/null +++ b/_layouts/articles.html @@ -0,0 +1,89 @@ +--- +layout: page +--- + +{%- assign _page_articles_data_source = page.articles.data_source | default: layout.articles.data_source -%} + +{%- if _page_articles_data_source -%} +{%- assign _keys = _page_articles_data_source | split: '.' -%} +{%- endif -%} + +{%- assign _articles = nil -%} +{%- for _key in _keys -%} + {%- if forloop.first -%} + {%- case _key -%} + {%- when 'site' -%} + {%- assign _articles = site -%} + {%- when 'page' -%} + {%- assign _articles = page -%} + {%- when 'layout' -%} + {%- assign _articles = layout -%} + {%- when 'paginator' -%} + {%- assign _articles = paginator -%} + {%- else -%} + {%- assign _articles = site[_key] -%} + {%- else -%} + {%- endcase -%} + {%- else -%} + {%- assign _articles = _articles[_key] -%} + {%- endif -%} +{%- endfor -%} + +{%- assign _type = page.articles.type | default: layout.articles.type -%} + +{%- if _articles -%} + +
+ + {%- if _type == 'grid' -%} + {%- if page.articles.size == 'sm' -%} + {%- include article-list.html articles=_articles type='grid' size='sm' -%} + {%- else -%} + {%- include article-list.html articles=_articles type='grid' -%} + {%- endif -%} + + {%- elsif _type == 'brief' -%} + {%- include snippets/assign.html + target=site.data.variables.default.page.articles.show_info + source0=layout.articles.show_info source1=page.articles.show_info -%} + {%- assign _show_info = __return -%} + + {%- include article-list.html articles=_articles type='brief' show_info=_show_info -%} + + {%- else -%} + {%- include snippets/assign.html + target=site.data.variables.default.page.articles.show_cover + source0=layout.articles.show_cover source1=page.articles.show_cover -%} + {%- assign _show_cover = __return -%} + + {%- include snippets/assign.html + target=site.data.variables.default.page.articles.show_excerpt + source0=layout.articles.show_excerpt source1=page.articles.show_excerpt -%} + {%- assign _show_excerpt = __return -%} + + {%- include snippets/assign.html + target=site.data.variables.default.page.articles.show_readmore + source0=layout.articles.show_readmore source1=page.articles.show_readmore -%} + {%- assign _show_readmore = __return -%} + + {%- include snippets/assign.html + target=site.data.variables.default.page.articles.show_info + source0=layout.articles.show_info source1=page.articles.show_info -%} + {%- assign _show_info = __return -%} + + {%- assign _article_type = page.articles.article_type | default: layout.articles.article_type -%} + {%- assign _cover_size = page.articles.cover_size | default: layout.articles.cover_size -%} + {%- assign _excerpt_type = page.articles.excerpt_type | default: layout.articles.excerpt_type -%} + + {%- include article-list.html articles=_articles type='item' + article_type=_article_type + show_cover=_show_cover cover_size=_cover_size + show_excerpt=_show_excerpt excerpt_type=_excerpt_type + show_readmore=_show_readmore show_info=_show_info -%} + + {%- endif -%} + +
+{%- endif -%} + +{{ content }} diff --git a/_layouts/base.html b/_layouts/base.html new file mode 100644 index 0000000..8a02572 --- /dev/null +++ b/_layouts/base.html @@ -0,0 +1,25 @@ +--- +layout: none +--- + +{%- include snippets/get-lang.html -%} + + + {%- include analytics.html -%} + {%- include head.html -%} + + {%- include scripts/variables.html -%} + + +
+ {{ content }} +
+ + + diff --git a/_layouts/home.html b/_layouts/home.html new file mode 100644 index 0000000..e587d6f --- /dev/null +++ b/_layouts/home.html @@ -0,0 +1,42 @@ +--- +layout: articles +titles: + # @start locale config + en : &EN Home + en-GB : *EN + en-US : *EN + en-CA : *EN + en-AU : *EN + zh-Hans : &ZH_HANS 主页 + zh : *ZH_HANS + zh-CN : *ZH_HANS + zh-SG : *ZH_HANS + zh-Hant : &ZH_HANT 主頁 + zh-TW : *ZH_HANT + zh-HK : *ZH_HANT + ko : &KO 홈 + ko-KR : *KO + fr : &FR Accueil + fr-BE : *FR + fr-CA : *FR + fr-CH : *FR + fr-FR : *FR + fr-LU : *FR + # @end locale config +show_title: false +articles: + data_source: paginator.posts + article_type: BlogPosting + show_cover: false + show_excerpt: true + show_readmore: true + show_info: true +--- +
+ {%- include paginator.html -%} +
+ + +{{ content }} diff --git a/_layouts/landing.html b/_layouts/landing.html new file mode 100644 index 0000000..306067b --- /dev/null +++ b/_layouts/landing.html @@ -0,0 +1,178 @@ +--- +layout: page +header: false +full_width: true +article_header: + type: overlay + align: center + height: 80vh +--- +
+
+ {%- for _section in page.data.sections -%} + {%- include snippets/get-nav-url.html path=_section.background_image.src -%} + {%- assign _url = __return -%} + {%- if _section.theme == 'light' -%} +
+ {%- else -%} + style="background-image: url({{ _url }});"> + {%- endif -%} + +
+
+ +

{{ _section.title }}

+ {%- if _section.excerpt-%} +

{{ _section.excerpt }}

+ {%- endif -%} + + {%- if _section.actions -%} + + {%- endif -%} + +
+ + {%- if _section.children -%} + {%- assign _size = _section.children | size -%} +
+
+ + {%- for child in _section.children -%} + + {%- if _size >= 2 -%} + {%- assign _cell_md_col = 6 -%} + {%- else -%} + {%- assign _cell_md_col = 12 | divided_by: _size -%} + {%- endif -%} + + {%- if _size >= 4 -%} + {%- assign _cell_lg_col = 3 -%} + {%- else -%} + {%- assign _cell_lg_col = 12 | divided_by: _size -%} + {%- endif -%} + +
+ +
+

{{ child.title }}

+ + {%- if child.excerpt-%} +

{{ child.excerpt }}

+ {%- endif -%} + + {%- if child.actions -%} + + {%- endif -%} +
+ + {%- if child.image and child.image.src -%} + + {%- if child.image.url -%} + {%- include snippets/get-nav-url.html path=child.image.url -%} + {%- assign _item_image_url = __return -%} + {%- else -%} + {%- assign _item_image_url = nil -%} + {%- endif -%} + + {%- include snippets/get-nav-url.html path=child.image.src -%} + {%- assign _item_image_src = __return -%} + + {%- if child.image.is_row -%} +
+ {%- endif -%} +
+ {%- if _item_image_url -%} + + {%- endif -%} + + {%- if _item_image_url -%} + + {%- endif -%} +
+ {%- if child.image.is_row -%} +
+ {%- endif -%} + {%- endif -%} + + {%- if child.content-%} +

{{ child.content }}

+ {%- endif -%} + +
+ {%- endfor-%} + +
+
+ {%- endif -%} + + {%- if _section.image.full_width == true -%} +
{% comment %} end hero__content {% endcomment %} + {%- endif -%} + + {%- if _section.image and _section.image.src -%} + + {%- if _section.image.url -%} + {%- include snippets/get-nav-url.html path=_section.image.url -%} + {%- assign _section_image_url = __return -%} + {%- else -%} + {%- assign _section_image_url = nil -%} + {%- endif -%} + + {%- include snippets/get-nav-url.html path=_section.image.src -%} + {%- assign _section_image_src = __return -%} + + {%- if _section.image.is_row -%} +
+ {%- endif -%} + + {%- if _section.image.is_row -%} +
+ {%- endif -%} + {%- endif -%} + + {%- if _section.image.full_width != true -%} +
{% comment %} end hero__content {% endcomment %} + {%- endif -%} + + {%- if _section.content-%} +

{{ _section.content }}

+ {%- endif -%} + + {%- endfor -%} +
+ + +{{ content }} diff --git a/_layouts/none.html b/_layouts/none.html new file mode 100644 index 0000000..cddd070 --- /dev/null +++ b/_layouts/none.html @@ -0,0 +1 @@ +{{ content }} diff --git a/_layouts/page.html b/_layouts/page.html new file mode 100644 index 0000000..de6b7b2 --- /dev/null +++ b/_layouts/page.html @@ -0,0 +1,270 @@ +--- +layout: base +--- +{%- assign _page_mode = page.mode | default: layout.mode | default: site.data.variables.default.page.mode -%} +{%- assign _page_type = page.type | default: layout.type | default: site.data.variables.default.page.type -%} +{%- assign _article_header_type = page.article_header.type | default: layout.article_header.type -%} + +{%- include snippets/assign.html + target=layout.header source0=page.header -%} +{%- assign _header = __return -%} + +{%- include snippets/assign.html + target=layout.footer source0=page.footer -%} +{%- assign _footer = __return -%} + +{%- include snippets/assign.html + target=layout.lightbox source0=page.lightbox -%} +{%- assign _lightbox = __return -%} + +{%- include snippets/assign.html + target = site.data.variables.default.page.full_width + source0=layout.full_width source1=page.full_width -%} +{%- assign _full_width = __return -%} + +{%- include snippets/assign.html + target = site.data.variables.default.page.comment + source0=layout.comment source1=page.comment -%} +{%- assign _comment = __return -%} + + +{%- assign _article_header_excerpt_truncate = include.excerpt_truncate | default: 200 -%} + +{%- if page.sidebar -%} +
+
+
+
+ +
+ +
+ +
+ {%- include sidebar/toc.html -%} +
+ +{%- else -%} +
+{%- endif -%} + + {%- assign _page_main_class = 'page__main js-page-main' -%} + {%- if _page_mode == 'immersive' -%} + {%- assign _page_main_class = _page_main_class | append: ' page__main--immersive' -%} + {%- endif -%} + {%- unless page.sidebar -%} + {%- assign _page_main_class = _page_main_class | append: ' page__viewport' -%} + {%- endunless -%} + {%- if _footer == false -%} + {%- assign _page_main_class = _page_main_class | append: ' hide-footer' -%} + {%- endif -%} + {%- if page.aside -%} + {%- assign _page_main_class = _page_main_class | append: ' has-aside' -%} + {%- elsif _full_width -%} + {%- assign _page_main_class = _page_main_class | append: ' full-width' -%} + {%- endif -%} +
+ +
+ {%- if _header != false -%} + + {%- endif -%} + + +
+ {%- if _article_header_type == 'overlay' or _article_header_type == 'cover' -%} + + {%- if _article_header_type == 'overlay' -%} + + {%- assign _article_header_height = page.article_header.height | default: layout.article_header.height -%} + {%- assign _article_header_align = page.article_header.align | default: layout.article_header.align | default: site.data.variables.default.page.article_header.align -%} + {%- assign _article_header_theme = page.article_header.theme | default: layout.article_header.theme | default: site.data.variables.default.page.article_header.theme -%} + + {%- if page.article_header.background_image.src -%} + {%- assign _header_background_image_src = page.article_header.background_image.src -%} + {%- elsif page.article_header.background_image != false and page.cover -%} + {%- assign _header_background_image_src = page.cover -%} + {%- endif -%} + + {%- if page.article_header.background_image.gradient -%} + {%- assign _header_background_image = page.article_header.background_image.gradient -%} + {%- if _header_background_image_src -%} + {%- assign _header_background_image = _header_background_image | append: ',' -%} + {%- endif -%} + {%- endif -%} + + {%- if _header_background_image_src -%} + {%- include snippets/get-nav-url.html path=_header_background_image_src -%} + {%- assign _header_background_image_src = __return -%} + {%- assign _header_background_image = _header_background_image + | append: 'url(' | append: _header_background_image_src | append: ')'-%} + {%- endif -%} + + {%- assign _header_style = 'background-image:' | append: _header_background_image | append: ';' -%} + + {%- if page.article_header.background_color -%} + {%- assign _header_style = _header_style | append: 'background-color:' | append: page.article_header.background_color | append: ';' -%} + {%- endif -%} + + {%- if _article_header_height -%} + {%- assign _header_style = _header_style | append: 'min-height:' | append: _article_header_height | append: ';' -%} + {%- endif -%} + +
+ + {%- if _article_header_theme == 'light' -%} + {%- if _article_header_align == 'center' -%} +
+ {%- else -%} +
+ {%- endif -%} + {%- elsif _article_header_theme == 'dark' -%} + {%- if _article_header_align == 'center' -%} +
+ {%- else -%} +
+ {%- endif -%} + {%- else -%} + {%- if _article_header_align == 'center' -%} +
+ {%- else -%} +
+ {%- endif -%} + {%- endif -%} +
+ {%- if _full_width == false -%} +
+ {%- endif -%} + {%- include article-info.html article=page semantic=false -%} + {%- include article-header.html article=page semantic=false -%} + {%- if page.excerpt -%} +

{{ page.excerpt | strip_html | strip_newlines | strip | truncate: _article_header_excerpt_truncate }}

+ {%- endif -%} + {%- if page.article_header.actions -%} + + {%- endif -%} + {%- if _full_width == false -%} +
+ {%- endif -%} +
+
+
+ {%- elsif _article_header_type == 'cover' -%} + {%- if page.article_header.image.src -%} + {%- include snippets/get-nav-url.html path=page.article_header.image.src -%} + {%- assign _header_image_src = __return -%} + + {%- endif -%} + {%- endif -%} + + {%- endif -%} + + + {%- if _full_width == false -%} +
+ {%- endif -%} +
+ +
+ {%- if page.aside -%} + + {%- endif -%} +
+ +
+ {%- include main/top/custom.html -%} + {%- if _page_type == 'article' -%} +
+ {%- elsif _page_type == 'webpage' -%} +
+ {%- else -%} +
+ {%- endif -%} + + {%- if _article_header_type == 'overlay' or page.article_header == false -%} + {%- include article-header.html article=page html=false -%} + {%- include article-info.html article=page html=false -%} + {%- else -%} + {%- include article-header.html article=page -%} + {%- include article-info.html article=page -%} + {%- endif -%} + +
{{ content }}
+ {%- if _comment != false -%} +
{%- include comments.html -%}
+ {%- endif -%} +
+ {%- include main/bottom/custom.html -%} +
+
+ + {%- if _full_width == false -%} +
+ {%- endif -%} +
+ + {%- if _footer != false -%} + + {%- endif -%} +
+
{%- comment -%} end page__main {%- endcomment -%} +{%- if page.sidebar -%} +
{%- comment -%} end grid {%- endcomment -%} +
{%- comment -%} end page__viewport {%- endcomment -%} +{%- endif -%} + + +{%- if _lightbox == true -%} + +{%- endif -%} +{%- if _header != false -%} + +{%- endif -%} +
+ + + + +{%- if page.sidebar -%} + +{%- endif -%} + +{%- if page.aside -%} + +{%- endif -%} + +{%- include markdown-enhancements.html -%} +{%- include pageview.html -%} -- cgit v1.2.3