From 4dfbb7bffbb996f69db09c7590654b04e5844c7f Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 7 Nov 2022 21:17:34 +0100 Subject: rename an include --- _includes/jekyll-theme/categories/all.html | 4 ++-- _includes/jekyll-theme/categories/category.html | 2 +- _includes/jekyll-theme/posts/feed-entry.html | 19 +++++++++++++++++++ _includes/jekyll-theme/posts/feed.html | 2 +- _includes/jekyll-theme/posts/header.html | 19 ------------------- 5 files changed, 23 insertions(+), 23 deletions(-) create mode 100644 _includes/jekyll-theme/posts/feed-entry.html delete mode 100644 _includes/jekyll-theme/posts/header.html diff --git a/_includes/jekyll-theme/categories/all.html b/_includes/jekyll-theme/categories/all.html index c8d4720..9e67e3b 100644 --- a/_includes/jekyll-theme/categories/all.html +++ b/_includes/jekyll-theme/categories/all.html @@ -6,14 +6,14 @@ {% assign category_name = category[0] %}

{% include jekyll-theme/categories/label.html link=true category=category_name monospace=true %}

{% for post in category[1] %} - {% include jekyll-theme/posts/header.html url=post.url title=post.title date=post.date %} + {% include jekyll-theme/posts/feed-entry.html url=post.url title=post.title date=post.date %} {% endfor %} {% endfor %} {% assign uncategorized = site.posts | where_exp: "post","post.categories.size == 0" %} {% if uncategorized.size != 0 %}

{% include jekyll-theme/categories/label.html category="Other" monospace=true %}

{% for post in uncategorized %} - {% include jekyll-theme/posts/header.html url=post.url title=post.title date=post.date %} + {% include jekyll-theme/posts/feed-entry.html url=post.url title=post.title date=post.date %} {% endfor %} {% endif %} {% endif %} diff --git a/_includes/jekyll-theme/categories/category.html b/_includes/jekyll-theme/categories/category.html index e14a981..a9b6f28 100644 --- a/_includes/jekyll-theme/categories/category.html +++ b/_includes/jekyll-theme/categories/category.html @@ -1,7 +1,7 @@

{% include jekyll-theme/categories/label.html category=include.category monospace=true %}

{% if site.categories[include.category].size > 0 %} {% for post in site.categories[include.category] %} - {% include jekyll-theme/posts/header.html url=post.url title=post.title date=post.date %} + {% include jekyll-theme/posts/feed-entry.html url=post.url title=post.title date=post.date %} {% endfor %} {% endif %} {% if include.archive_link %} diff --git a/_includes/jekyll-theme/posts/feed-entry.html b/_includes/jekyll-theme/posts/feed-entry.html new file mode 100644 index 0000000..4d648e7 --- /dev/null +++ b/_includes/jekyll-theme/posts/feed-entry.html @@ -0,0 +1,19 @@ +{% assign header_date = null %} +{% if include.date %} + {% capture header_date %}

{%- include jekyll-theme/posts/date.html date=include.date monospace=true -%}

{% endcapture %} +{% endif %} + +{% assign header_category = null %} +{% if include.category %} + {% capture header_category %} +

+ {%- include jekyll-theme/categories/label.html category=include.category monospace=true -%} +

+ {% endcapture %} +{% endif %} + +{% capture header_title %}
{{ include.title }}
{% endcapture %} + + + {% include jekyll-theme/flex-header.html left=header_date title=header_title right=header_category %} + diff --git a/_includes/jekyll-theme/posts/feed.html b/_includes/jekyll-theme/posts/feed.html index 5d45cd3..b1a54c8 100644 --- a/_includes/jekyll-theme/posts/feed.html +++ b/_includes/jekyll-theme/posts/feed.html @@ -2,7 +2,7 @@

Sorry, no posts have been added yet.

{% else %} {% for post in paginator.posts %} - {% include jekyll-theme/posts/header.html url=post.url date=post.date title=post.title category=post.category %} + {% include jekyll-theme/posts/feed-entry.html url=post.url date=post.date title=post.title category=post.category %} {% endfor %} {% include jekyll-theme/posts/paginator.html %} {% endif %} diff --git a/_includes/jekyll-theme/posts/header.html b/_includes/jekyll-theme/posts/header.html deleted file mode 100644 index 4d648e7..0000000 --- a/_includes/jekyll-theme/posts/header.html +++ /dev/null @@ -1,19 +0,0 @@ -{% assign header_date = null %} -{% if include.date %} - {% capture header_date %}

{%- include jekyll-theme/posts/date.html date=include.date monospace=true -%}

{% endcapture %} -{% endif %} - -{% assign header_category = null %} -{% if include.category %} - {% capture header_category %} -

- {%- include jekyll-theme/categories/label.html category=include.category monospace=true -%} -

- {% endcapture %} -{% endif %} - -{% capture header_title %}
{{ include.title }}
{% endcapture %} - - - {% include jekyll-theme/flex-header.html left=header_date title=header_title right=header_category %} - -- cgit v1.2.3