From d7143606ecef90540ba6bc5b6fe288219729ba33 Mon Sep 17 00:00:00 2001 From: sergiotarxz Date: Fri, 11 Nov 2022 00:05:48 +0100 Subject: [PATCH] Adding more data about authorship and publishing dates. --- content/posts/0000001-primer-post.xml | 2 +- content/posts/0000002-horarios-autobuses-2022.xml | 2 +- content/posts/0000003-migrantes-bienvenidos.xml | 2 +- public/css/styles.scss | 4 ++++ templates/page/index.html.ep | 5 +++++ templates/page/post.html.ep | 5 +++++ 6 files changed, 17 insertions(+), 3 deletions(-) diff --git a/content/posts/0000001-primer-post.xml b/content/posts/0000001-primer-post.xml index bf81649..fa817e7 100644 --- a/content/posts/0000001-primer-post.xml +++ b/content/posts/0000001-primer-post.xml @@ -1,5 +1,5 @@ - Sergio Iglesias, Desarrollador de Software. + Sergio Iglesias (Lead Developer) 2022-11-08T22:38+00:00 Primer post. El primer artículo de Burguillos.info. diff --git a/content/posts/0000002-horarios-autobuses-2022.xml b/content/posts/0000002-horarios-autobuses-2022.xml index e4d8af1..eea0b8e 100644 --- a/content/posts/0000002-horarios-autobuses-2022.xml +++ b/content/posts/0000002-horarios-autobuses-2022.xml @@ -1,5 +1,5 @@ - Burguillos.info. + Burguillos.info 2022-11-09T22:38+00:00 Horarios autobuses 2022. Los horarios de autobuses de Burguillos. diff --git a/content/posts/0000003-migrantes-bienvenidos.xml b/content/posts/0000003-migrantes-bienvenidos.xml index d7cf22c..bec52cb 100644 --- a/content/posts/0000003-migrantes-bienvenidos.xml +++ b/content/posts/0000003-migrantes-bienvenidos.xml @@ -1,5 +1,5 @@ - Burguillos.info. + Burguillos.info 2022-11-10T22:31+00:00 Migrantes Bienvenidos. Migrantes Bienvenidos. diff --git a/public/css/styles.scss b/public/css/styles.scss index 4e793aa..f0d48a7 100644 --- a/public/css/styles.scss +++ b/public/css/styles.scss @@ -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; diff --git a/templates/page/index.html.ep b/templates/page/index.html.ep index 1a5c46f..ac09d15 100644 --- a/templates/page/index.html.ep +++ b/templates/page/index.html.ep @@ -1,3 +1,5 @@ +% use DateTime::Format::ISO8601; +% % use Mojo::DOM; % use Mojo::Util; % @@ -16,6 +18,9 @@ % for my $post (@$category_post) {
+% my $date_article = DateTime::Format::ISO8601->parse_datetime($post->{date}); +% $date_article->set_time_zone('Europe/Madrid'); +

<%= ''.$date_article %>

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

% my $xml = Mojo::DOM->new($post->{content}); % my $text = $xml->all_text; diff --git a/templates/page/post.html.ep b/templates/page/post.html.ep index cdc9cf2..c7814f1 100644 --- a/templates/page/post.html.ep +++ b/templates/page/post.html.ep @@ -1,3 +1,5 @@ +% use DateTime::Format::ISO8601; +% % use Mojo::DOM; % use Mojo::Util; % @@ -9,4 +11,7 @@

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

<%== $post->{content} %> +% my $date_article = DateTime::Format::ISO8601->parse_datetime($post->{date}); +% $date_article->set_time_zone('Europe/Madrid'); +

Escrito por <%= $post->{author} %> con fecha <%= $date_article %>.