Add hot/poor article types, move article list to a partial (fixes #58 and #53)

Among other things introduce new --fg-contrast color variable.
This commit is contained in:
daudix
2024-08-26 03:35:30 +03:00
parent 2af0f9f6cb
commit 6124fdfc60
25 changed files with 368 additions and 255 deletions

View File

@ -15,60 +15,5 @@
{{ macros_translate::translate(key="newest_to_oldest", default="From newest to oldest", language_strings=language_strings) }} ↓
</small>
<div id="article-list">
{%- for page in section.pages %}
<article class="
{% if page.draft %}draft{% endif %}
{% if page.extra.archive %}archive{% endif %}
{% if page.extra.featured %}featured{% endif %}">
<h3><a href="{{ page.permalink | safe }}">{{ page.title }}</a></h3>
{%- if page.draft %}
<span class="draft-badge">
<i class="icon"></i>
{{- macros_translate::translate(key="drafted", default="Drafted", language_strings=language_strings) -}}
</span>
{%- endif -%}
{%- if page.extra.archive %}
<span class="archive-badge">
<i class="icon"></i>
{{- macros_translate::translate(key="archived", default="Archived", language_strings=language_strings) -}}
</span>
{%- endif %}
{%- if page.extra.featured %}
<span class="featured-badge">
<i class="icon"></i>
{{- macros_translate::translate(key="featured", default="Featured", language_strings=language_strings) -}}
</span>
{%- endif %}
{%- if page.description %}
{{ page.description | markdown | safe }}
{%- endif %}
{%- if page.date -%}
<div>
<small>
<time datetime="{{ page.date | date(format='%+') }}" pubdate>
{{- page.date | date(format=date_format, locale=date_locale) -}}
</time>
{%- if page.authors -%}
<span> • {% include "partials/authors.html" -%}</span>
{%- endif -%}
</small>
{%- if page.taxonomies -%}
{%- for name, taxon in page.taxonomies %}
<small>
<ul class="tags">
{%-for item in taxon -%}
<li><a class="tag" href="{{ get_taxonomy_url(kind=name, name=item, lang=lang) }}">{{ item }}</a></li>
{%- endfor %}
</ul>
</small>
{%- endfor -%}
{%- endif %}
</small>
</div>
{%- endif -%}
</article>
<hr>
{%- endfor %}
</div>
{% include "partials/articles.html" %}
{% endblock content %}