summaryrefslogtreecommitdiffstatshomepage
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/macros.html10
-rw-r--r--templates/page.html4
2 files changed, 5 insertions, 9 deletions
diff --git a/templates/macros.html b/templates/macros.html
index 09b8a13..1ec8ab0 100644
--- a/templates/macros.html
+++ b/templates/macros.html
@@ -1,16 +1,12 @@
-{% macro render_post(post, mention=false, render_title=true) -%}
-{%- if mention %}
-<article class="mention">
-{%- else -%}
-<article>
-{%- endif %}
+{% macro render_post(post, class="feed") -%}
+<article class="{{ class }}">
<header>
<img class="avatar" alt="{{ config.extra.author }}" src="{{ config.extra.avatar }}" />
<div class="banner smaller">
<div class="info">
<a class="bold-hover" title="permalink to this post" href="{{ post.permalink }}">{% if mention %}№ {{ post.slug }} {% else %}§{% endif %}</a>
<time class="mute" datetime="{{ post.date }}" title="{{ post.date }}">{{ post.date | date(format="%F %R") }}</time>
- {%- if render_title and post.title %}<h2 class="mute">{{ post.title }}</h2>{% endif %}
+ {%- if class != "single" and post.title %}<h2 class="mute">{{ post.title }}</h2>{% endif %}
</div>
{%- if "tags" in post.taxonomies %}
<nav class="tags">
diff --git a/templates/page.html b/templates/page.html
index fc733d5..0a7b3fd 100644
--- a/templates/page.html
+++ b/templates/page.html
@@ -1,12 +1,12 @@
{% extends "base.html" -%}
{%- block content %}
-{{ macros::render_post(post=page, render_title=false) }}
+{{ macros::render_post(post=page, class="single") }}
{%- if "mentions" in page.extra and page.extra.mentions | length > 0 -%}
<h2 class="mentions">Mentioned posts</h2>
{%- for ref in page.extra.mentions %}
{%- set page = get_page(path=ref ~ "/index.md") -%}
-{{ macros::render_post(post=page, mention=true) }}
+{{ macros::render_post(post=page, class="mention") }}
{%- endfor %}
{%- endif %}
{%- endblock content %}