diff --git a/_layouts/default.html b/_layouts/default.html index 3898715..8a7d8bb 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -100,6 +100,7 @@ + diff --git a/_layouts/post.html b/_layouts/post.html index 0fcf514..db043e3 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -54,22 +54,37 @@

{{ page.title }}

-
-

Cite este artigo

-

- {% if page.author %} - {% assign names = author.citation_name | split: " " %} - {{ names.first | upcase }} - {{ names | slice: 1, names.size - | join: " " - | split: "." - | join: "." }}. - {% endif %} - {{ page.title }}. {{ site.title }}, - {% include /functions/date_to_string_pt.html date=page.date %}. - Disponível em: {{ site.url }}{{ site.baseurl }}{{ page.url }}. - Acesso em: {% include /functions/date_to_string_pt.html date=site.time %}. -

+
+
+

+ +

+
+
+

+ {% if page.author %} + {% assign names = author.citation_name | split: " " %} + {{ names.first | upcase }} + {{ names | slice: 1, names.size + | join: " " + | split: "." + | join: "." }}. + {% endif %} + {{ page.title }}. {{ site.title }}, + {% include /functions/date_to_string_pt.html date=page.date %}. + Disponível em: {{ site.url }}{{ site.baseurl }}{{ page.url }}. + Acesso em: +

+
+
+
diff --git a/assets/js/date.js b/assets/js/date.js new file mode 100644 index 0000000..a6784ea --- /dev/null +++ b/assets/js/date.js @@ -0,0 +1,20 @@ +// +// date.js: update dynamically the date +// + +function getFormattedCurDate() { + const date = new Date(); + const options = { day: 'numeric', month: 'long', year: 'numeric' }; + return date.toLocaleDateString('pt-BR', options); +} + +function updateDate() { + const element = document.getElementById('curDate'); + if (element) { + element.textContent = getFormattedCurDate(); + } +} + +window.onload = function() { + updateDate(); +};