diff --git a/cl-theme/templates/archives.html b/cl-theme/templates/archives.html index 5e5dfa4..f38caac 100644 --- a/cl-theme/templates/archives.html +++ b/cl-theme/templates/archives.html @@ -1,57 +1,54 @@ {% extends "base.html" %} -{% block extra_head %} - - - - +{% block head %} + {% block title %} + {{ _('Archivos de') }} - {{ SITENAME }} + {% endblock %} + {{ super() }} + {% block seo %} + + + + + {% endblock %} {% endblock %} -{% block title %}{% trans %}Archivos de {{ SITENAME }}{% endtrans %}{% endblock %} {% block content %}
diff --git a/cl-theme/templates/article.html b/cl-theme/templates/article.html index 6e51293..3dd4b98 100644 --- a/cl-theme/templates/article.html +++ b/cl-theme/templates/article.html @@ -1,43 +1,15 @@ -{# {% import 'pcs/comments.html' as pcs with context %} #} {% extends "base.html" %} {% block html_lang %}{{ article.lang }}{% endblock %} - -{% block extra_head %} - - -{% endblock %} - {% block head %} + {% block title %} + {{ article.title }} - {{SITENAME}} + {% endblock %} {{ super() }} {% import 'translations.html' as translations with context %} {% if translations.entry_hreflang(article) %} {{ translations.entry_hreflang(article) }} {% endif %} - - - - - - {% if article.modified %} - - {% endif %} - - {% set OG_DESC_LENGTH = 175 %} - {% if og_description|length >= OG_DESC_LENGTH %} - {# Quita la última palabra para no dejarla incompleta #} - {% set og_description = og_description[:OG_DESC_LENGTH].split(' ')[:-1]|join(' ') %} - {% if not og_description[-1] in ['.', '?', ':', '!'] %} - {% set og_description = og_description + '…' %} - {% endif %} - {% endif %} - - {% if article.image %} - - {% endif %} - {% for tag in article.tags %} - - {% endfor %} {% if article.styles %} {% for style in article.styles %} @@ -51,12 +23,45 @@ {% endif %} {% endfor %} {% endif %} + {% block seo %} + {% set seo_description = article.summary|striptags %} + {% set SEO_DESC_LENGTH = 175 %} + {% if seo_description|length >= SEO_DESC_LENGTH %} + {# Quita la última palabra para no dejarla incompleta #} + {% set seo_description = seo_description[:SEO_DESC_LENGTH].split(' ')[:-1]|join(' ') %} + {% if not seo_description[-1] in ['.', '?', ':', '!'] %} + {% set seo_description = seo_description + '…' %} + {% endif %} + {% endif %} + + + + + + + + {% if article.modified %} + + {% endif %} + + + + + + + + + + + + + + + {% endblock %} {% endblock %} -{% block title %}{{ article.title|striptags }}{% endblock %} - {% block content %}
@@ -116,49 +121,7 @@
-
- -
- - - - - - {% set año = article.date|strftime('%Y') %} - {% set mes = article.date|strftime('%m') %} - {% set nombre_mes = article.date|strftime('%B') %} - - - {% if not HIDE_AUTHORS and article.authors %} - - - - - - {% for author in article.authors %} - - {{ author }}{% if not loop.last %}, {% endif %} - - {% endfor %} - {% endif %} - -
-
+ {% include 'article_info.html' %}
@@ -214,8 +177,9 @@

{{ comment.author }}

{% endif %} {{ comment.content }} - Permalink - | {{ comment.date }} + + {{ _('Permalink') }} + | {{ comment.date|strftime("%H:%M:%S") }} diff --git a/cl-theme/templates/article_info.html b/cl-theme/templates/article_info.html index 29470b2..16e5d2f 100644 --- a/cl-theme/templates/article_info.html +++ b/cl-theme/templates/article_info.html @@ -1,67 +1,56 @@ - diff --git a/cl-theme/templates/period_archives.html b/cl-theme/templates/period_archives.html index d1efa0f..f7edf88 100644 --- a/cl-theme/templates/period_archives.html +++ b/cl-theme/templates/period_archives.html @@ -1,5 +1,19 @@ {% extends "base.html" %} +{% block head %} + {% block title %} + {% set len_period = period|length %} + {%- if len_period == 1 -%} + {{ _('Archivos de %(año)d', año=period[0]) }} - {{SITENAME}} + {%- elif len_period == 2 -%} + {{ _('Archivos de %(mes)s de %(año)d', año=period[0], mes=period[1]) }} - {{SITENAME}} + {%- elif len_period == 3 -%} + {{ _('Archivos del %(dia)d de %(mes)s de %(año)d', año=period[0], mes=period[1], dia=period[2]) }} - {{SITENAME}} + {%- endif -%} + {% endblock %} + {{ super() }} +{% endblock %} + {% block content %}
diff --git a/content/vendor/form-comments/commentsubmit.php b/content/vendor/form-comments/commentsubmit.php index fa00d29..20c096a 100644 --- a/content/vendor/form-comments/commentsubmit.php +++ b/content/vendor/form-comments/commentsubmit.php @@ -27,7 +27,7 @@ if(empty($_POST['name']) || header( "Location: {$return_url}"); } else { - $DATE_FORMAT = "Y-m-d H:i"; + $DATE_FORMAT = "Y-m-d H:i:s"; $publish = date($DATE_FORMAT); $name = strip_tags(utf8_decode(htmlspecialchars($_POST['name']))); diff --git a/pelicanconf.py b/pelicanconf.py index 013c65c..ec60ae9 100644 --- a/pelicanconf.py +++ b/pelicanconf.py @@ -50,6 +50,7 @@ COMMENTS_DIR = ['comments'] SITENAME = 'Conocimientos Libres' SITENAME_SINGLE = 'CL' SITEURL = 'https://conocimientoslibres.tuxfamily.org' +AUTHOR = 'Jesús E.' # URL settings # https://docs.getpelican.com/en/stable/settings.html#url-settings