[09/03/23] tags --> categories, added support for tags, changed category formatting

This commit is contained in:
Andrew Conlin 2023-03-09 22:57:58 +00:00
parent 8c53fbd8d5
commit a65511d465
16 changed files with 143 additions and 108 deletions

View file

@ -7,16 +7,14 @@ title: latest posts
<hr>
<ul style="list-style-type:none;margin:0;padding:0;">
{% for post in site.posts %}
{% assign tags = post.tags %}
{% assign categories = post.categories %}
{% assign category = site.data.categories[categories.first] %}
<li>
<div style="font-family:Rubik Mono One;">
{{ post.date | date_to_string }} |
{% for tag in tags %}
{% assign currentTag = site.data.tags[tag] %}
<span style="background-color:{{currentTag.backColor}};color:{{currentTag.textColor}};">{{ tag }}</span>
{% endfor %}
</div>
<h4><a href="{{ post.url }}">{{ post.title }}</a></h4>
<div style="font-family:Rubik;font-weight:500;">
<i class="fas fa-calendar"></i>&nbsp;{{ post.date | date_to_string }}&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
<span style="background-color:{{category.backColor}};color:{{category.textColor}};">&nbsp;<i class="fas fa-folder"></i>&nbsp;{{ categories.first }}&nbsp;</span>
</div>
{{ post.content | strip_html | truncatewords: 30 }}
<br>
<br>