Browse Source

Schwerpunktthemen in der Kategorie verlinken

master
Christian Aust 2 months ago
parent
commit
87ce78fb79
  1. 8
      _layouts/post.html
  2. 7
      index.html
  3. 4
      styles.scss

8
_layouts/post.html

@ -9,8 +9,14 @@ layout: default
{% if page.update %}
| <time datetime="{{ page.update | date_to_xmlschema }}">Aktualisiert am {{ page.update | date_to_string }}</time>
{% endif %}
{% if page.category %}
<span class="badge">{{ page.category }}</span>
{% assign topic = site.topics | where: "title", page.category | first %}
{% if topic %}
<span class="badge badge-topic"><a href="{{ topic.url }}">{{ topic.title }}</a></span>
{% else %}
<span class="badge">{{ page.category }}</span>
{% endif %}
{% endif %}
</p>
{% if page.description %}

7
index.html

@ -21,7 +21,12 @@ sitemap:
| <time datetime="{{ post.update | date_to_xmlschema }}">Aktualisiert am {{ post.update | date_to_string }}</time>
{% endif %}
{% if post.category %}
<span class="badge">{{ post.category }}</span>
{% assign topic = site.topics | where: "title", post.category | first %}
{% if topic %}
<span class="badge badge-topic"><a href="{{ topic.url }}">{{ topic.title }}</a></span>
{% else %}
<span class="badge">{{ post.category }}</span>
{% endif %}
{% endif %}
</p>

4
styles.scss

@ -14,6 +14,10 @@ sitemap: false
background-color: #eee;
color: #515151;
padding: 0.4rem 0.3rem;
&-topic {
font-weight: bold;
}
}
.footnotes {

Loading…
Cancel
Save