From 4eb44cc94c15d975002a575d23934d688932b273 Mon Sep 17 00:00:00 2001 From: Emiliano Tortorella Date: Fri, 18 Jan 2019 20:46:09 -0500 Subject: [PATCH 1/2] Added a partial for the date in spanish and added it on the summary and posts. --- layouts/_default/single.html | 6 +++--- layouts/partials/date.html | 7 +++++++ layouts/partials/summary-with-image.html | 5 +++-- layouts/post/summary-with-image.html | 1 + 4 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 layouts/partials/date.html diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 7760642..6bff6e0 100755 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -20,9 +20,9 @@ {{- .Title -}} {{/* Hugo uses Go's date formatting is set by example. Here are two formats */}} - + + {{ partial "date.html" . }} + {{/* Show "reading time" and "word count" but only if one of the following are true: 1) A global config `params` value is set `show_reading_time = true` diff --git a/layouts/partials/date.html b/layouts/partials/date.html new file mode 100644 index 0000000..71b4bb3 --- /dev/null +++ b/layouts/partials/date.html @@ -0,0 +1,7 @@ + + diff --git a/layouts/partials/summary-with-image.html b/layouts/partials/summary-with-image.html index 68ddc04..d835325 100644 --- a/layouts/partials/summary-with-image.html +++ b/layouts/partials/summary-with-image.html @@ -1,6 +1,6 @@ {{ $featured_image := .Params.featured_image }}
-
+
{{ if .Params.featured_image }} {{/* Trimming the slash and adding absURL make sure the image works no matter where our site lives */}} @@ -12,11 +12,12 @@
{{ end }}
-

+

{{ .Title }}

+ {{ partial "date.html" . }} diff --git a/layouts/post/summary-with-image.html b/layouts/post/summary-with-image.html index d72cb35..2112f0d 100644 --- a/layouts/post/summary-with-image.html +++ b/layouts/post/summary-with-image.html @@ -8,6 +8,7 @@ {{ end }}

{{ .Title }}

+ {{ partial "date.html" . }}
{{ .Summary }}
From 081b29c0d085910e13454637546e78e9556d3936 Mon Sep 17 00:00:00 2001 From: Emiliano Tortorella Date: Sat, 19 Jan 2019 08:32:12 -0500 Subject: [PATCH 2/2] Added stories dates on relatos. --- layouts/_default/single.html | 6 ++++-- layouts/partials/story-dates.html | 6 ++++++ 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 layouts/partials/story-dates.html diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 6bff6e0..dc65c9a 100755 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -18,11 +18,13 @@

{{- .Title -}} + {{ partial "story-dates.html" . }} +
+ {{ partial "date.html" . }} +

{{/* Hugo uses Go's date formatting is set by example. Here are two formats */}} - {{ partial "date.html" . }} - {{/* Show "reading time" and "word count" but only if one of the following are true: 1) A global config `params` value is set `show_reading_time = true` diff --git a/layouts/partials/story-dates.html b/layouts/partials/story-dates.html new file mode 100644 index 0000000..bbe510d --- /dev/null +++ b/layouts/partials/story-dates.html @@ -0,0 +1,6 @@ + +{{ with $.Params.init_date }} +

+ ({{ $.Params.init_date }} al {{ $.Params.end_date }}) +

+{{ end }}