Compare commits

..

7 Commits

Author SHA1 Message Date
6683b508e4 Revert "Flash message for new sessions"
This reverts commit 60e4f9ffcc5e1fb922ed409cbf116e91058a05cf.
2025-02-11 20:09:51 -05:00
60e4f9ffcc Flash message for new sessions 2025-02-11 19:42:34 -05:00
78fb43a6ba Add a lil newline here 2025-02-11 18:14:15 -05:00
29dd0d862c Add link to the new_session route; add name for version_string route 2025-02-11 17:00:10 -05:00
097b67923c Don't need to run tests in build anymore 2025-02-11 16:13:15 -05:00
c3b45276a3 Add /version route 2025-02-11 16:11:37 -05:00
d775ae2ce6 Document the use of filter_text => 0 2025-02-10 15:45:59 -05:00
5 changed files with 14 additions and 3 deletions

View File

@ -5,7 +5,6 @@ WORKDIR /opt
COPY lib/ ./lib/ COPY lib/ ./lib/
COPY migrations/ ./migrations/ COPY migrations/ ./migrations/
COPY public/ ./public/ COPY public/ ./public/
COPY t/ ./t/
COPY templates/ ./templates/ COPY templates/ ./templates/
COPY script/ ./script/ COPY script/ ./script/
COPY cpanfile . COPY cpanfile .

View File

@ -61,7 +61,6 @@ tests locally:
## TODOs ## TODOs
- Figure out why `filter_text` is set to `0` and document that?
- Stop working on this and start the imageboard - Stop working on this and start the imageboard
## AGPL-3.0+ANTIFA compliance ## AGPL-3.0+ANTIFA compliance

View File

@ -4,6 +4,7 @@
remarks_per_page => 5, remarks_per_page => 5,
results_per_page => 5, results_per_page => 5,
body_max_length => 8_000, body_max_length => 8_000,
version => 'Feb 11 2025',
secrets => ['t0p_s3cr3t'], secrets => ['t0p_s3cr3t'],
development => { development => {
pg_string => pg_string =>

View File

@ -30,6 +30,8 @@ sub startup($self) {
$self->helper(hr => sub ($c) { $self->helper(hr => sub ($c) {
state $hr = HTML::Restrict->new( state $hr = HTML::Restrict->new(
# filter_text breaks greater and less than symbols in Markdown code blocks
# Also breaks Markdown quote blocks
filter_text => 0, filter_text => 0,
strip_enclosed_content => [], strip_enclosed_content => [],
rules => { rules => {
@ -138,7 +140,14 @@ sub startup($self) {
$c->session(expires => 1); $c->session(expires => 1);
$c->redirect_to('threads_list'); $c->redirect_to('threads_list');
}); })->name('new_session');
# Hide a version string to check build later
if (my $version = $self->config->{'version'}) {
$r->get('/version', sub ($c) {
$c->render(text => $version . "\n")
})->name('version_string');
}
# Static pages # Static pages
$r->get('/about')->to('page#about')->name('about_page'); $r->get('/about')->to('page#about')->name('about_page');

View File

@ -93,6 +93,9 @@
<%= content =%> <%= content =%>
<footer class="site-footer"> <footer class="site-footer">
<p>In UTF-8 we trust. 🫡</p> <p>In UTF-8 we trust. 🫡</p>
<p><%= link_to new_session => begin %>
New Session/Identity
<% end %></p>
<p><%= link_to javascript_page => <p><%= link_to javascript_page =>
('data-jslicense', 1), ('data-jslicense', 1),
begin %>JavaScript License Information<% end %></p> begin %>JavaScript License Information<% end %></p>