From c6bf5f7c895287d2028f6024265913b59784a154 Mon Sep 17 00:00:00 2001 From: Karl Hallsby Date: Sun, 27 Sep 2020 17:45:13 -0500 Subject: Bring all of jekyll-text-theme _includes into site --- _includes/article-list.html | 144 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 _includes/article-list.html (limited to '_includes/article-list.html') diff --git a/_includes/article-list.html b/_includes/article-list.html new file mode 100644 index 0000000..dfe0c85 --- /dev/null +++ b/_includes/article-list.html @@ -0,0 +1,144 @@ +{%- assign _excerpt_truncate = include.excerpt_truncate | default: 350 -%} + +{%- assign _excerpt_type = include.excerpt_type -%} + +{%- include snippets/get-locale-string.html key='READMORE' -%} +{%- assign _locale_readmore = __return -%} + +{%- assign _sorted_list = include.articles -%} +{%- if include.group_by == 'year' -%} + {%- assign _sorted_list = _sorted_list | sort: 'date' -%} +{%- endif -%} +{%- if include.reverse -%} + {%- assign _sorted_list = _sorted_list | reverse -%} +{%- endif -%} + +{%- if include.type == 'item' -%} +
+{%- elsif include.type == 'brief' -%} +
+{%- elsif include.type == 'grid' -%} + {%- if include.size == 'sm' -%} +
+ {%- else -%} +
+ {%- endif -%} +{%- endif -%} + + {%- for _article in _sorted_list -%} + + {%- include snippets/prepend-baseurl.html path=_article.url -%} + {%- assign _article_url = __return -%} + + {%- if _article.cover -%} + {%- include snippets/get-nav-url.html path=_article.cover -%} + {%- assign _article_cover = __return -%} + {%- endif -%} + + {%- if include.type == 'item' -%} + {%- if include.article_type == 'BlogPosting' -%} +
+ {%- else -%} +
+ {%- endif -%} + {%- if _article.cover and include.show_cover-%} + {%- include snippets/get-nav-url.html path=_article.cover -%} + {%- assign _article_cover = __return -%} +
+ {%- if include.cover_size == 'lg' -%} + + {%- elsif include.cover_size == 'sm' -%} + + {%- else -%} + + {%- endif -%} +
+ {%- endif -%} +
+

{{ _article.title }}

+
+ {%- if _article.excerpt and include.show_excerpt -%} +
+ {%- if _excerpt_type == 'html' -%} + {{ _article.excerpt }} + {%- else -%} + {{ _article.excerpt | strip_html | strip | truncate: _excerpt_truncate }} + {%- endif -%} +
+ {%- endif -%} + {%- if include.show_readmore -%} +

{{ _locale_readmore }}

+ {%- endif -%} +
+ {%- if include.show_info -%} + {%- include snippets/assign.html target=site.data.variables.default.page.pageview + source0=_article.pageview -%} + {%- assign _show_pageview = __return -%} + {%- include article-info.html article=_article show_pageview=_show_pageview -%} + {%- endif -%} +
+
+ + + {%- elsif include.type == 'brief' -%} + {%- assign _tags = '' -%} + {%- for _tag in _article.tags -%} + {%- assign _tag_encode = _tag | strip | url_encode -%} + {%- if forloop.last -%} + {%- assign _tags = _tags | append: _tag_encode -%} + {%- else -%} + {%- assign _tags = _tags | append: _tag_encode | append: ',' -%} + {%- endif -%} + {%- endfor -%} + {%- if include.group_by == 'year' -%} + {%- assign _currentdate = _article.date | date: '%Y' -%} + {%- if _currentdate != _date -%} + {%- unless forloop.first -%}{%- endunless -%} +

{{ _currentdate }}

    + {%- assign _date = _currentdate -%} + {%- endif -%} + {%- endif -%} + {%- include snippets/get-locale-string.html key='ARTICLE_LIST_DATE_FORMAT' -%} +
  • +
    + {%- if include.show_info -%} + {{ _article.date | date: __return }} + {%- endif -%} + {{ _article.title }}
    +
  • + + {%- elsif include.type == 'grid' -%} + {%- if include.size == 'sm' -%} +
    +
    + {%- if _article.cover -%} +
    + + +
    + {%- endif -%} +
    +
    + {%- else -%} + +
    +
    + {%- if _article.cover -%} +
    + {%- endif -%} + +
    +
    + {%- endif -%} + {%- endif -%} + {%- endfor -%} + +
-- cgit v1.2.3