Display the visitor counter

This commit is contained in:
swagg boi 2022-04-03 21:04:09 -04:00
parent 6fe9a59b6d
commit 3532310738
2 changed files with 7 additions and 3 deletions

View file

@ -44,7 +44,10 @@ under sub ($c) {
$c->stash(status => 403) if $c->flash('error');
$c->stash(post_count => format_number $c->message->get_post_count);
$c->stash(
post_count => format_number($c->message->get_post_count),
visitor_count => format_number($c->counter->get_visitor_count)
);
1;
};
@ -129,7 +132,7 @@ app->secrets(app->config->{'secrets'}) || die $@;
app->message->max_posts(app->config->{'max_posts'})
if app->config->{'max_posts'};
app->pg->migrations->from_dir('migrations')->migrate(7);
app->pg->migrations->from_dir('migrations')->migrate(8);
app->asset->process('swagg.css', 'css/swagg.css');

View file

@ -38,7 +38,8 @@
</div>
<div class="outer">
<footer>
<p><%= $post_count %> visitors have signed the guestbook to date.</p>
<p><%= $post_count %> of <%= $visitor_count %> total visitors have
signed the guestbook to date.</p>
</footer>
</div>
</body>