about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/handlers.rs2
-rw-r--r--templates/thread.html6
2 files changed, 5 insertions, 3 deletions
diff --git a/src/handlers.rs b/src/handlers.rs
index 43bc69afe828..05b73a699196 100644
--- a/src/handlers.rs
+++ b/src/handlers.rs
@@ -131,7 +131,7 @@ pub fn reply_thread(state: State<AppState>,
             let post = res?;
             info!("Posted reply {} to thread {}", post.id, post.thread_id);
             Ok(HttpResponse::SeeOther()
-               .header("Location", format!("/thread/{}#post{}", post.thread_id, post.id))
+               .header("Location", format!("/thread/{}#post-{}", post.thread_id, post.id))
                .finish())
         })
         .responder()
diff --git a/templates/thread.html b/templates/thread.html
index bbe288e92f13..1b484637331c 100644
--- a/templates/thread.html
+++ b/templates/thread.html
@@ -32,7 +32,10 @@
             </div>
 
             {% for post in posts -%}
-            <div class="list-group-item flex-column align-items-start">
+            <div id="post-{{ post.id}}" class="list-group-item flex-column align-items-start">
+              <a href="/thread/{{ id }}#post-{{ post.id }}">
+                <small class="text-muted float-right">{{ post.posted }}</small>
+              </a>
               <div class="row">
                 <div class="col-2 border-right">
                   <div class="row">
@@ -49,7 +52,6 @@
                 <div class="col-10">
                   {{ post.body }}
                 </div>
-                <small class="text-muted">{{ post.posted }}</small>
               </div>
             </div>
             {%- endfor %}