Compare commits

...

2 commits

Author SHA1 Message Date
575b317811
add pagination boilerplate 2025-12-07 08:05:17 -03:00
fed5859a21
small adjustments to blog sidebar 2025-12-07 07:25:45 -03:00
4 changed files with 21 additions and 6 deletions

View file

@ -13,8 +13,13 @@
</div> </div>
{% endif %} {% endif %}
<div id="feed"> <div id="feed">
{% if paginated %}
{% set cycling = paginated | i18n_filter %}
{% else %}
{% set cycling = collections[cycling_tag] | i18n_filter %}
{% endif %}
{% set current_year = 0 %} {% set current_year = 0 %}
{% for post in collections[cycling_tag] | i18n_filter %} {% for post in cycling %}
{% set post_year = post.date | date("yyyy") %} {% set post_year = post.date | date("yyyy") %}
{% if post_year != current_year %} {% if post_year != current_year %}
<h2 class="year-title">{{ post_year }}</h2> <h2 class="year-title">{{ post_year }}</h2>
@ -37,6 +42,7 @@
<p class="post-link"><a href="{{ post.url | locale_url_resolve }}">{{ "read-more" | i18n }}</a></p> <p class="post-link"><a href="{{ post.url | locale_url_resolve }}">{{ "read-more" | i18n }}</a></p>
</div> </div>
{% endfor %} {% endfor %}
{# TODO: handle pagination buttons #}
<div class="end-of-feed"> <div class="end-of-feed">
<a href="https://www.youtube.com/watch?v=mB5YeQFw1S4" target="_blank"> <a href="https://www.youtube.com/watch?v=mB5YeQFw1S4" target="_blank">
<div id="tv"></div> <div id="tv"></div>

View file

@ -440,7 +440,8 @@ body {
#blog-sidebar { #blog-sidebar {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
width: 240px; width: 280px;
margin: 25px 12px 0px 12px;
p, p,
li { li {
@ -462,7 +463,7 @@ body {
} }
.true-content { .true-content {
margin: 6px ($sm - 5%) 6px $sm; padding: 6px ($sm - 8%) 6px $sm;
} }
.blog-avatar-wrapper { .blog-avatar-wrapper {
@ -490,7 +491,7 @@ body {
#feed { #feed {
width: 100%; width: 100%;
margin: 12px; margin: 12px;
padding: 0px 12%; padding: 0px 12% 0px 6%;
.year-title { .year-title {
font-size: $h4size; font-size: $h4size;
text-align: center; text-align: center;

View file

@ -3,6 +3,10 @@ title: blog
layout: recent_feed layout: recent_feed
cycling_tag: posts cycling_tag: posts
sidebar: blog sidebar: blog
pagination:
data: collections.posts
size: 6
alias: paginated
flight: flight:
img: /img/gifcities/mimi.gif img: /img/gifcities/mimi.gif
url: / url: /

View file

@ -3,9 +3,13 @@ title: blog
layout: recent_feed layout: recent_feed
cycling_tag: posts cycling_tag: posts
sidebar: blog sidebar: blog
pagination:
data: collections.posts
size: 6
alias: paginated
flight: flight:
img: /img/gifcities/mimi.gif img: /img/gifcities/mimi.gif
url: / url: /
--- ---
# blog # blog