diff --git a/templates/macros.html.tera b/templates/macros.html.tera index 900f96c..3cce728 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 13e3e5a..52e71b3 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 15d4404..51d6f94 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 9b0bdf2..595f6ae 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 %}