diff --git a/templates/macros.html.tera b/templates/macros.html.tera index 900f96c3..3cce7285 100644 --- a/templates/macros.html.tera +++ b/templates/macros.html.tera @@ -1,9 +1,9 @@ {% macro post_card(article) %} -{% if article.author.display_name %} - {% set name = article.author.display_name %} -{% else %} - {% set name = article.author.username %} -{% endif %} + {% if article.author.display_name %} + {% set name = article.author.display_name %} + {% else %} + {% set name = article.author.username %} + {% endif %}

{{ article.post.title }}

{{ article.post.content | striptags | truncate(length=200) }}

diff --git a/templates/posts/details.html.tera b/templates/posts/details.html.tera index 13e3e5ab..52e71b30 100644 --- a/templates/posts/details.html.tera +++ b/templates/posts/details.html.tera @@ -8,12 +8,13 @@ {{ blog.title }} {% endblock header %} -{% block content %} {% if author.display_name %} {% set name = author.display_name %} {% else %} {% set name = author.username %} {% endif %} + +{% block content %}

Written by {{ name }} — diff --git a/templates/users/details.html.tera b/templates/users/details.html.tera index 15d44045..51d6f94e 100644 --- a/templates/users/details.html.tera +++ b/templates/users/details.html.tera @@ -1,12 +1,13 @@ {% extends "base" %} {% import "macros" as macros %} -{% block title %} {% if user.display_name %} {% set name = user.display_name %} {% else %} {% set name = user.username %} {% endif %} + +{% block title %} {{ name }} {% endblock title %} diff --git a/templates/users/followers.html.tera b/templates/users/followers.html.tera index 9b0bdf28..595f6ae1 100644 --- a/templates/users/followers.html.tera +++ b/templates/users/followers.html.tera @@ -1,12 +1,12 @@ {% extends "base" %} -{% block title %} {% if user.display_name %} {% set name = user.display_name %} {% else %} {% set name = user.username %} {% endif %} +{% block title %} {{ name }}'s Followers {% endblock title %}