From 94dfa4043ebb22e63e807452a75c1caf2092e308 Mon Sep 17 00:00:00 2001 From: swag Date: Fri, 8 Apr 2022 12:59:15 -0400 Subject: [PATCH] Small tweaks I've been meaning to make --- guestbook-ng.pl | 12 ++++++------ templates/layouts/default.html.ep | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/guestbook-ng.pl b/guestbook-ng.pl index a2ce91e..80def52 100755 --- a/guestbook-ng.pl +++ b/guestbook-ng.pl @@ -129,12 +129,12 @@ group { get '/:number', [number => qr/[0-9]+/], {number => 1} => sub ($c) { my $base_path = $c->url_for(number => undef); my $this_page = $c->param('number'); - my $last_page = - $base_path eq '/view' ? $c->message->get_last_page() - : $c->message->get_last_page(1); - my $view_posts = - $base_path eq '/view' ? $c->message->get_posts($this_page) - : $c->message->get_spam($this_page); + my $last_page = $base_path eq '/view' + ? $c->message->get_last_page() + : $c->message->get_last_page(1); + my $view_posts = $base_path eq '/view' + ? $c->message->get_posts($this_page) + : $c->message->get_spam($this_page); $c->stash( view_posts => $view_posts, diff --git a/templates/layouts/default.html.ep b/templates/layouts/default.html.ep index 6de465f..0c43594 100644 --- a/templates/layouts/default.html.ep +++ b/templates/layouts/default.html.ep @@ -11,6 +11,7 @@ + Swagg::Net::Guestbook - <%= title %> <%= asset 'swagg.css' %>