Adding more data about authorship and publishing dates.

This commit is contained in:
sergiotarxz 2022-11-11 00:05:48 +01:00
parent 482243db4e
commit d7143606ec
6 changed files with 17 additions and 3 deletions

View File

@ -1,5 +1,5 @@
<post>
<author>Sergio Iglesias, Desarrollador de Software.</author>
<author>Sergio Iglesias (Lead Developer)</author>
<date>2022-11-08T22:38+00:00</date>
<title>Primer post.</title>
<ogdesc>El primer artículo de Burguillos.info.</ogdesc>

View File

@ -1,5 +1,5 @@
<post>
<author>Burguillos.info.</author>
<author>Burguillos.info</author>
<date>2022-11-09T22:38+00:00</date>
<title>Horarios autobuses 2022.</title>
<ogdesc>Los horarios de autobuses de Burguillos.</ogdesc>

View File

@ -1,5 +1,5 @@
<post>
<author>Burguillos.info.</author>
<author>Burguillos.info</author>
<date>2022-11-10T22:31+00:00</date>
<title>Migrantes Bienvenidos.</title>
<ogdesc>Migrantes Bienvenidos.</ogdesc>

View File

@ -112,6 +112,10 @@ body {
color: $color_div;
border: 3px solid $color_div;
}
p.date {
font-size: 20px;
text-align: right;
}
p.author {
font-size: 30px;
text-align: right;

View File

@ -1,3 +1,5 @@
% use DateTime::Format::ISO8601;
%
% use Mojo::DOM;
% use Mojo::Util;
%
@ -16,6 +18,9 @@
% for my $post (@$category_post) {
<a href="/posts/<%=$post->{slug}%>">
<article>
% my $date_article = DateTime::Format::ISO8601->parse_datetime($post->{date});
% $date_article->set_time_zone('Europe/Madrid');
<p class="date"><%= ''.$date_article %></p>
<h4><%=$post->{title}%></h4>
% my $xml = Mojo::DOM->new($post->{content});
% my $text = $xml->all_text;

View File

@ -1,3 +1,5 @@
% use DateTime::Format::ISO8601;
%
% use Mojo::DOM;
% use Mojo::Util;
%
@ -9,4 +11,7 @@
<div class="description">
<h2><%= $post->{title} %></h2>
<%== $post->{content} %>
% my $date_article = DateTime::Format::ISO8601->parse_datetime($post->{date});
% $date_article->set_time_zone('Europe/Madrid');
<p>Escrito por <%= $post->{author} %> con fecha <%= $date_article %>.<p>
</div>