Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pelicanconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
15 changes: 9 additions & 6 deletions pycltheme/templates/archives.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@
{% block content %}
<h1 class="pb-5">Entradas del Blog</h1>

<div class="row">
{% for article in dates%}
{% include 'card-page.html' %}
{% endfor %}
</div>
<div class="row">
{% for article in articles_page.object_list %}
{% include 'card-page.html' %}
{% endfor %}
</div>
{% if articles_page.has_other_pages() %}
{% include 'pagination.html' %}
{% endif %}

{% endblock %}
{% endblock %}
33 changes: 19 additions & 14 deletions pycltheme/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,27 @@
<section id="content">

<!-- Entradas Blog -->
<div class="pt-1 pb-1 blog-entries">
<div class="container">
{% block content_title %}
{% endblock %}
<div class="row flex-column-reverse flex-md-row">
<div class="col-4 col-12">
<h3 class="text-center pb-5 mb-3 titulo-bold">ÚLTIMAS ENTRADAS</h3>
<div class="row">
{% for article in dates[:6] %}
{% include 'card.html' %}
{% endfor %}
<div class="pt-1 pb-1 blog-entries">
<div class="container">
{% block content_title %}
{% endblock %}
<div class="row flex-column-reverse flex-md-row">
<div class="col-4 col-12">
<h3 class="text-center pb-5 mb-3 titulo-bold">ÚLTIMAS ENTRADAS</h3>
<div class="row">
{% for article in dates[:6] %}
{% include 'card.html' %}
{% endfor %}
</div>
{% if dates|length > 6 %}
<div class="row pt-1 pb-5 justify-content-center">
<a href="{{ SITEURL }}/archives2.html" class="btn btn-primary">Leer más articulos</a>
</div>
{% endif %}
</div>
</div>
</div>
</div>
</div>

</section><!-- /#content -->

Expand All @@ -37,7 +42,7 @@ <h2>Nuestros Patrocinantes</h2>
<p> ¿Te gustaría patrocinar las actividades de la comunidad Python Chile?</p>
<p> Contáctanos y te contamos como: contacto@pythonchile.cl
</div>
<!--
<!--
<div class="col-md-2 text-center">
<a href="https://it-talenthh.com/" target="_blank">
<img class="img-fluid" src="images/patrocinantes/logo_ittalent.png" alt="IT-Talent">
Expand All @@ -48,4 +53,4 @@ <h2>Nuestros Patrocinantes</h2>
</div>
</div>
</section>
{% endblock content %}
{% endblock content %}
10 changes: 5 additions & 5 deletions pycltheme/templates/pagination.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
{% set last_page = articles_paginator.page(articles_paginator.num_pages) %}
<p class="paginator">
{% if articles_page.has_previous() %}
<a href="{{ SITEURL }}/{{ first_page.url }}">&#8647;</a>
<a href="{{ SITEURL }}/{{ articles_previous_page.url }}">&laquo;</a>
<a href="{{ SITEURL }}/{{ first_page.url }}">Inicio</a>
<a href="{{ SITEURL }}/{{ articles_previous_page.url }}">&laquo;</a>
{% endif %}
Página {{ articles_page.number }} / {{ articles_paginator.num_pages }}
{% if articles_page.has_next() %}
<a href="{{ SITEURL }}/{{ articles_next_page.url }}">&raquo;</a>
<a href="{{ SITEURL }}/{{ last_page.url }}">&#8649;</a>
<a href="{{ SITEURL }}/{{ articles_next_page.url }}">&raquo;</a>
<a href="{{ SITEURL }}/{{ last_page.url }}">Final</a>
{% endif %}
</p>
{% endif %}
{% endif %}