From 33f46cf38b23ddbfa733d703e39d0357c88f194b Mon Sep 17 00:00:00 2001 From: pablo lira Date: Fri, 16 Jan 2026 05:18:36 -0300 Subject: [PATCH] se agrega paguinacion a archive y un boton de ver mas articulo al index --- pelicanconf.py | 1 + pycltheme/templates/archives.html | 15 +++++++------ pycltheme/templates/index.html | 33 +++++++++++++++++------------ pycltheme/templates/pagination.html | 10 ++++----- 4 files changed, 34 insertions(+), 25 deletions(-) diff --git a/pelicanconf.py b/pelicanconf.py index e9f4272..1a66c66 100644 --- a/pelicanconf.py +++ b/pelicanconf.py @@ -129,6 +129,7 @@ } DEFAULT_PAGINATION = 6 +PAGINATED_DIRECT_TEMPLATES = ["index", "archives"] # Uncomment following line if you want document-relative URLs when developing # RELATIVE_URLS = True diff --git a/pycltheme/templates/archives.html b/pycltheme/templates/archives.html index 56c3016..80eec04 100644 --- a/pycltheme/templates/archives.html +++ b/pycltheme/templates/archives.html @@ -5,10 +5,13 @@ {% block content %}

Entradas del Blog

-
- {% for article in dates%} - {% include 'card-page.html' %} - {% endfor %} -
+
+ {% for article in articles_page.object_list %} + {% include 'card-page.html' %} + {% endfor %} +
+{% if articles_page.has_other_pages() %} +{% include 'pagination.html' %} +{% endif %} -{% endblock %} +{% endblock %} \ No newline at end of file diff --git a/pycltheme/templates/index.html b/pycltheme/templates/index.html index 9626208..9692bd6 100644 --- a/pycltheme/templates/index.html +++ b/pycltheme/templates/index.html @@ -4,22 +4,27 @@
-
-
- {% block content_title %} - {% endblock %} -
-
-

ÚLTIMAS ENTRADAS

-
- {% for article in dates[:6] %} - {% include 'card.html' %} - {% endfor %} +
+
+ {% block content_title %} + {% endblock %} +
+
+

ÚLTIMAS ENTRADAS

+
+ {% for article in dates[:6] %} + {% include 'card.html' %} + {% endfor %} +
+ {% if dates|length > 6 %} + + {% endif %}
-
@@ -37,7 +42,7 @@

Nuestros Patrocinantes

¿Te gustaría patrocinar las actividades de la comunidad Python Chile?

Contáctanos y te contamos como: contacto@pythonchile.cl -