Add a link to user profile in comments

And move back {% if %} inside of {% block %}, so they get interpreted.
This commit is contained in:
Bat
2018-06-12 21:14:49 +01:00
parent 4c3e63ec16
commit 4185ba230e
4 changed files with 16 additions and 11 deletions
+7 -7
View File
@@ -8,13 +8,13 @@
<a href="../">{{ blog.title }}</a>
{% endblock header %}
{% if author.display_name %}
{% set name = author.display_name %}
{% else %}
{% set name = author.username %}
{% endif %}
{% block content %}
{% if author.display_name %}
{% set name = author.display_name %}
{% else %}
{% set name = author.username %}
{% endif %}
<p>
<b>Written by <a href="/@/{{ author.fqn }}/">{{ name }}</a></b>
&mdash;
@@ -61,7 +61,7 @@
{% set comment_author_name = comment.author.username %}
{% endif %}
<div class="card" id="comment-{{ comment.id }}">
<b>{{ comment_author_name }}</b>
<a href="/@/{{ comment.author.fqn }}/"><b>{{ comment_author_name }}</b></a>
<div>{{ comment.content | safe }}</div>
<a href="comment?responding_to={{ comment.id }}">Respond</a>
</div>
+2 -2
View File
@@ -1,13 +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 %}
@@ -30,7 +30,7 @@
</div>
<div>
<a href="followers">{{ n_followers }} follower{{ n_followers | pluralize }}</a>
<a href="followers/">{{ n_followers }} follower{{ n_followers | pluralize }}</a>
</div>
<div>
+1 -1
View File
@@ -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 %}