From 61da57fec0250a7fabd18cec7a4aeaf35475b3df Mon Sep 17 00:00:00 2001 From: sergiotarxz Date: Mon, 14 Nov 2022 03:11:25 +0100 Subject: [PATCH] Adding images to articles preview in category which have them. --- templates/page/index.html.ep | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/page/index.html.ep b/templates/page/index.html.ep index ca44684..f8a004b 100644 --- a/templates/page/index.html.ep +++ b/templates/page/index.html.ep @@ -21,6 +21,9 @@ % my $date_article = DateTime::Format::ISO8601->parse_datetime($post->{date}); % $date_article->set_time_zone('Europe/Madrid');

<%= ''.$date_article %>

+% if (defined $post->{image}) { + Portada de <%=$post->{title}%> +% }

<%=$post->{title}%>

% my $xml = Mojo::DOM->new($post->{content}); % my $text = $xml->all_text;