Adjusted CSS to enhance layout consistency, including footer width and inner content margins. Updated blog template to include post excerpts with fallback for better readability and engagement.
46 lines
1.4 KiB
HTML
46 lines
1.4 KiB
HTML
{% extends "main.html" %}
|
|
|
|
{% block content %}
|
|
<h1>BLOG</h1>
|
|
|
|
<div class="md-posts">
|
|
{% for post in posts %}
|
|
<article class="md-post md-post--excerpt">
|
|
<!--<div class="md-post__meta">
|
|
<time datetime="{{ post.meta.date }}">{{ post.meta.date }}</time>
|
|
{% if post.meta.categories %}
|
|
<span class="md-post__categories">
|
|
{% for category in post.meta.categories %}
|
|
{{ category }}{% if not loop.last %}, {% endif %}
|
|
{% endfor %}
|
|
</span>
|
|
{% endif %}
|
|
{% if post.meta.readtime %}
|
|
<span>{{ post.meta.readtime }} Min. Lesezeit</span>
|
|
{% endif %}
|
|
</div>-->
|
|
|
|
<h2 class="md-post__title">
|
|
<a href="{{ post.url }}">{{ post.title }}</a>
|
|
</h2>
|
|
|
|
<!-- Post-Excerpt hinzufügen -->
|
|
<div class="md-post__excerpt">
|
|
{% if post.excerpt %}
|
|
{{ post.excerpt }}
|
|
{% elif post.content | length > 0 %}
|
|
{{ post.content | striptags | truncate(200, true, "...") }}
|
|
{% else %}
|
|
<!-- Fallback, falls kein Excerpt oder Inhalt verfügbar ist -->
|
|
<p>Mehr Informationen im vollständigen Artikel.</p>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<br />
|
|
|
|
<a href="{{ post.url }}" class="md-button">Weiterlesen</a>
|
|
</article>
|
|
{% endfor %}
|
|
</div>
|
|
{% endblock %}
|