diff options
author | TatriX <tatrics@gmail.com> | 2018-04-16T13·56+0300 |
---|---|---|
committer | Vincent Ambo <github@tazj.in> | 2018-04-16T14·26+0200 |
commit | ee855d8b6748cc9c22a6dc4cb2bd5f1b7e44e346 (patch) | |
tree | 7ddf9876f4ef5ce6007fbdeca938514d53f9b8fd | |
parent | 09a97d46ea8ecb6b94e4576cf9776d6348d5c924 (diff) |
feat(templates): Add 'Last post by' to the list of threads
-rw-r--r-- | src/render.rs | 2 | ||||
-rw-r--r-- | templates/index.html | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/render.rs b/src/render.rs index 95edb5749c68..91f4d3f3f9a2 100644 --- a/src/render.rs +++ b/src/render.rs @@ -58,6 +58,7 @@ struct IndexThread { sticky: bool, posted: FormattedDate, author_name: String, + post_author: String, } impl Handler<IndexPage> for Renderer { @@ -72,6 +73,7 @@ impl Handler<IndexPage> for Renderer { sticky: thread.sticky, posted: thread.posted.into(), author_name: thread.thread_author, + post_author: thread.post_author, }) .collect(); diff --git a/templates/index.html b/templates/index.html index c8c72d9d2e87..024d0aef534d 100644 --- a/templates/index.html +++ b/templates/index.html @@ -31,7 +31,10 @@ <h5 class="mb-1">{% if thread.sticky %}<span class="badge badge-light">Sticky</span> {% endif %}{{ thread.title | safe }}</h5> <small class="{% if thread.sticky %}text-white{% else %}text-muted{% endif %}">{{ thread.posted }}</small> </div> - <p class="mb-1">Created by {{ thread.author_name }}</p> + <div class="d-flex justify-content-between"> + <p class="mb-1">Created by {{ thread.author_name }}</p> + <small>Last post by {{ thread.post_author }}</small> + </div> </a> {%- endfor %} </div> |