Merge branch 'main' into fix/style

This commit is contained in:
Óscar
2023-02-07 20:11:38 +01:00
committed by GitHub
10 changed files with 79 additions and 13 deletions

32
templates/archive.html Normal file
View File

@@ -0,0 +1,32 @@
{% extends "base.html" %} {% block main_content %}
<div class="title-container">
{{ post_macros::page_header(title=section.title) }}
</div>
<div class="archive">
<ul class="list-with-title">
{% set section_item = get_section(path="_index.md") %} {% for year, posts in
section_item.pages | group_by(attribute="year") %} {% if posts | length > 0
%}
<li>
<h2 class="listing-title">{{ year }}</h2>
<ul class="listing">
{% for post in posts %}
<li class="listing-item">
<div class="post-time">
<span class="date">
{{ post.date | date(format="%b %d") }}
</span>
</div>
<a href="{{ post.permalink }}" title="{{ post.title }}"
>{{ post.title }}</a
>
</li>
{% endfor %}
</ul>
{% endif %} {% endfor %}
</li>
</ul>
</div>
{% endblock main_content %}

View File

@@ -57,25 +57,28 @@
{% endmacro tags %}
{% macro page_header(title) %}
<h1 class="title-container">
<h2 class="title-container">
{{ title }}
</h1>
{% endmacro content %}
</h2>
{% endmacro page_header %}
{% macro page_desc(desc) %}
{% macro page_desc(desc, page) %}
<div id="banner-container-home">
<div id="home-banner-text">
<h3>
{{ desc.title }}
</h3>
<p id="banner-home-subtitle">{{ desc.text }}</p>
<section id="banner-home-subtitle">
{{ page.content | safe }}
</section>
</div>
<div class="image-container-home">
<img alt="the owner" class="banner-home-img" src="{{ desc.img }}" />
<img alt="the owner" class="banner-home-img" src="{{ desc.img }}" />
</div>
</div>
{% endmacro content %}
{% endmacro page_desc %}
{% macro content(page) %}
<main>

View File

@@ -6,7 +6,7 @@
{% endif -%}
{%- if section.extra.desc %}
{{ post_macros::page_desc(desc=section.extra.desc) }}
{{ post_macros::page_desc(desc=section.extra.desc, page=section) }}
{% endif -%}
<main class="list">