Some small tweaks including another URI fragment thing

This commit is contained in:
swag 2022-10-08 23:14:18 -04:00
parent 7d81490a31
commit cefba7d507
3 changed files with 8 additions and 5 deletions

View File

@ -42,6 +42,7 @@ Run the tests locally (against development environment):
### (Lord knows there's TODOs I could be working on...)
1. Support at least some Markdown, specifically the code blocks
1. RSS feed!!
1. Return a text response instead of HTML if a `.txt` extension [is
requested](https://docs.mojolicious.org/Mojolicious/Plugin/DefaultHelpers#respond_to)

View File

@ -91,7 +91,9 @@ sub bump($self) {
$self->thread->bump($thread_id);
$self->flash(info => "Thread #$thread_id has been bumped.🔝");
$self->redirect_to('threads_list');
$self->redirect_to(
$self->url_for('threads_list')->fragment('info')->to_abs
);
}
1;

View File

@ -5,18 +5,18 @@
<%= asset 'main.css' %>
</head>
<body>
<% if (flash 'info') { =%>
<p class="field-with-info"><%= flash 'info' %></p>
<% } =%>
<h1>Post::Text</h1>
<nav>
<%= link_to List => 'threads_list' %>
<%= link_to New => 'post_thread' %>
</nav>
<hr>
<% if (flash 'info') { =%>
<p class="field-with-info" id="info"><%= flash 'info' %></p>
<% } =%>
<%= content =%>
<footer>
<p>In UTF-8 we trust.</p>
<p>In UTF-8 we trust. 🫡</p>
</footer>
</body>
</html>