[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

@ -11,7 +11,7 @@
<link href="https://use.fontawesome.com/releases/v5.0.2/css/all.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="/assets/css/default.css" rel="stylesheet">
{% include tagStyle.html%}
{% include categoryStyle.html%}
</head>
<body>
@ -26,10 +26,7 @@
<br>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"
integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN"
crossorigin="anonymous"></script>
</body>
</html>

View file

@ -2,13 +2,21 @@
layout: default
---
{% assign categories = page.categories %}
{% assign category = site.data.categories[categories.first] %}
{% assign tags = page.tags %}
<p style="font-family:Rubik Mono One;">
{{ page.date | date_to_string }} |
<p style="font-family:Rubik;font-weight:500;">
<i class="fas fa-calendar"></i>&nbsp;{{ page.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>
&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
<i class="fas fa-tag"></i>
{% for tag in tags %}
{% assign currentTag = site.data.tags[tag] %}
<span style="background-color:{{currentTag.backColor}};color:{{currentTag.textColor}};">{{ tag }}</span>
<span style="background-color:#171717;color:white;font-family:Rubik;padding:3px;border-radius:10px;">{{ tag }}</span>
{% if tag != tags.last %}
,
{% endif %}
{% endfor %}
</p>
<hr>