add symbols for categories

This commit is contained in:
randogoth 2025-12-22 00:21:22 +02:00
parent fe6f41cfd6
commit a6dc056789
16 changed files with 100 additions and 26 deletions

View file

@ -4,11 +4,26 @@
{% block content_title %}
{% endblock %}
{% set icon_map = {
'performance': 'nf-md-projector',
'cinema': 'nf-md-theater',
'event': 'nf-fa-masks_theater',
'audio': 'nf-fa-music',
'cooperation': 'nf-fa-group',
'software': 'nf-md-code_braces',
'workshop': 'nf-md-school',
'blog': 'nf-fa-newspaper',
'installation': 'nf-fa-cubes',
'hardware': 'nf-cod-circuit_board'
} %}
{% for article in dates if article.category != 'blog' %}
<article class="hentry">
<header>
<h2 class="entry-title">
{% set icon_class = icon_map.get(article.category|string|lower) %}
{% if icon_class %}<i class="nf {{ icon_class }}"></i>{% endif %}
<a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a>
</h2>
<abbr class="published" title="{{ article.date.isoformat() }}">[{{ article.locale_date }}]&nbsp;</abbr>

View file

@ -15,10 +15,25 @@
{% endblock %}
{% set icon_map = {
'performance': 'nf-md-projector',
'cinema': 'nf-md-theater',
'event': 'nf-fa-masks_theater',
'audio': 'nf-fa-music',
'cooperation': 'nf-fa-group',
'software': 'nf-md-code_braces',
'workshop': 'nf-md-school',
'blog': 'nf-fa-newspaper',
'installation': 'nf-fa-cubes',
'hardware': 'nf-cod-circuit_board'
} %}
{% block content %}
<section id="content" class="body">
<header>
<h2 class="entry-title">
{% set icon_class = icon_map.get(article.category|string|lower) %}
{% if icon_class %}<i class="nf {{ icon_class }}"></i>{% endif %}
<a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark"
title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2>
{% import 'translations.html' as translations with context %}

View file

@ -1,8 +1,27 @@
{% extends "base.html" %}
{% set icon_map = {
'performance': 'nf-md-projector',
'cinema': 'nf-md-theater',
'event': 'nf-fa-masks_theater',
'audio': 'nf-fa-music',
'cooperation': 'nf-fa-group',
'software': 'nf-md-code_braces',
'workshop': 'nf-md-school',
'blog': 'nf-fa-newspaper',
'installation': 'nf-fa-cubes',
'hardware': 'nf-cod-circuit_board'
} %}
{% block content %}
<ul>
{% for category, articles in categories %}
<li><a href="{{ SITEURL }}/{{ category.url }}">{{ category }}</a></li>
<li>
{% set icon_class = icon_map.get(category|string|lower) %}
{% if icon_class %}<i class="nf {{ icon_class }}"></i>{% endif %}
<a href="{{ SITEURL }}/{{ category.url }}">{{ category }}</a>
</li>
{% endfor %}
</ul>
{% endblock %}

View file

@ -4,11 +4,26 @@
{% block content_title %}
{% endblock %}
{% set icon_map = {
'performance': 'nf-md-projector',
'cinema': 'nf-md-theater',
'event': 'nf-fa-masks_theater',
'audio': 'nf-fa-music',
'cooperation': 'nf-fa-group',
'software': 'nf-md-code_braces',
'workshop': 'nf-md-school',
'blog': 'nf-fa-newspaper',
'installation': 'nf-fa-cubes',
'hardware': 'nf-cod-circuit_board'
} %}
{% for article in articles_page.object_list %}
<article class="hentry">
<header>
<h2 class="entry-title">
{% set icon_class = icon_map.get(article.category|string|lower) %}
{% if icon_class %}<i class="nf {{ icon_class }}"></i>{% endif %}
<a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a>
</h2>
<abbr class="published" title="{{ article.date.isoformat() }}">[{{ article.locale_date }}]&nbsp;</abbr>