added tags functionality
This commit is contained in:
@@ -2,17 +2,26 @@
|
||||
|
||||
{% block content %}
|
||||
<section class="hero">
|
||||
<h2 style="color: #2563eb; margin-bottom : 10%">I write about Self-hosting, Arduino, STM32 and various tech stupidity.</h2>
|
||||
<h2 style="color: #2563eb; margin-bottom : 10%">I write about Self-hosting, Arduino, STM32.</h2>
|
||||
</section>
|
||||
|
||||
<div class="post-list">
|
||||
{% for post in posts %}
|
||||
<article class="post-item">
|
||||
<h3><a href="{{ url_for('post', path=post.path) }}">{{ post.title }}</a></h3>
|
||||
<span class="date">{{ post.date }}</span>
|
||||
<p>{{ post.meta.get('description', 'Read more...') }}</p>
|
||||
<p>{{ post.meta.get('tag', 'no tag') }}</p>
|
||||
</article>
|
||||
<article class="post-item">
|
||||
<h3>
|
||||
<a href="{{ url_for('post', path=post.path) }}" class="main-link">
|
||||
{{ post.title }}
|
||||
</a>
|
||||
</h3>
|
||||
<span class="date">{{ post.date }}</span>
|
||||
<p>{{ post.meta.get('description', 'Read more...') }}</p>
|
||||
|
||||
<div class="tags" style="position: relative; z-index: 2;">
|
||||
{% for tag in post.meta.get('tags', []) %}
|
||||
<a href="{{ url_for('tag', tag_name=tag) }}" class="tag-badge">#{{ tag }}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</article>
|
||||
{% else %}
|
||||
<p>No posts yet. Time to write something!</p>
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user