129 lines
4.7 KiB
Plaintext
129 lines
4.7 KiB
Plaintext
<div class="blog full-width bg-white pb-[72px] pt-[60px] font-sans text-[#212326] md:pb-12 md:pt-10">
|
||
<div class="mx-auto w-full max-w-[1440px] px-[45px] md:px-5">
|
||
<header class="mb-[18px] flex items-end justify-between gap-8 lg:flex-col lg:items-start lg:gap-4">
|
||
<h1 class="m-0 shrink-0 text-[50px] font-light leading-[1.27] tracking-[0.6px] text-[#1a1b18] md:text-[36px]">
|
||
{{ blog.title | escape }}
|
||
</h1>
|
||
|
||
{% if section.settings.show_tags and blog.all_tags.size > 0 %}
|
||
<ul class="m-0 flex max-w-[1070px] list-none flex-wrap justify-end p-0 lg:max-w-none lg:justify-start">
|
||
<li class="px-[11px] py-[6px]">
|
||
<a
|
||
class="text-[12.6px] leading-none text-[#1a1b18] no-underline hover:underline {% if current_tags == blank %}underline underline-offset-[5px]{% endif %}"
|
||
href="{{ blog.url }}"
|
||
{% if current_tags == blank %}
|
||
aria-current="page"
|
||
{% endif %}
|
||
>
|
||
{{- 'blog.all' | t -}}
|
||
</a>
|
||
</li>
|
||
{% for tag in blog.all_tags %}
|
||
<li class="px-[11px] py-[6px]">
|
||
<a
|
||
class="text-[12.6px] leading-none text-[#1a1b18] no-underline hover:underline {% if current_tags contains tag %}underline underline-offset-[5px]{% endif %}"
|
||
href="{{ blog.url }}/tagged/{{ tag | handle }}"
|
||
{% if current_tags contains tag %}
|
||
aria-current="page"
|
||
{% endif %}
|
||
>
|
||
{{- tag | escape -}}
|
||
</a>
|
||
</li>
|
||
{% endfor %}
|
||
</ul>
|
||
{% endif %}
|
||
</header>
|
||
|
||
{% paginate blog.articles by 12 %}
|
||
<div class="grid grid-cols-3 gap-x-[27px] gap-y-16 lg:grid-cols-2 md:grid-cols-1 md:gap-y-10">
|
||
{% for article in blog.articles %}
|
||
{% render 'blog-card',
|
||
article: article,
|
||
show_excerpt: true,
|
||
show_author: section.settings.show_author,
|
||
eager: forloop.first
|
||
%}
|
||
{% else %}
|
||
<p class="col-span-full m-0 text-[14.4px] leading-[1.89]">{{ 'blog.empty' | t }}</p>
|
||
{% endfor %}
|
||
</div>
|
||
|
||
{% if paginate.pages > 1 %}
|
||
<nav class="mt-14" aria-label="{{ 'blog.pagination' | t }}">
|
||
<ul class="m-0 flex list-none flex-wrap items-center justify-center p-0">
|
||
{% if paginate.previous %}
|
||
<li class="mx-[4px]">
|
||
<a
|
||
class="inline-flex items-center px-2 text-[14.4px] text-[#1a1b18] no-underline hover:underline"
|
||
href="{{ paginate.previous.url }}"
|
||
>
|
||
<span aria-hidden="true">‹</span>
|
||
{{ 'blog.previous' | t }}
|
||
</a>
|
||
</li>
|
||
{% endif %}
|
||
|
||
{% for part in paginate.parts %}
|
||
<li class="mx-[4px]">
|
||
{% if part.is_link %}
|
||
<a
|
||
class="flex size-[31px] items-center justify-center text-[14.4px] text-[#1a1b18] no-underline hover:underline"
|
||
href="{{ part.url }}"
|
||
aria-label="{{ 'blog.page' | t: page: part.title }}"
|
||
>
|
||
{{- part.title -}}
|
||
</a>
|
||
{% elsif part.title == paginate.current_page %}
|
||
<span
|
||
class="flex size-[31px] items-center justify-center rounded-full bg-brand-mint text-[14.4px] text-[#212326]"
|
||
aria-current="page"
|
||
>
|
||
{{- part.title -}}
|
||
</span>
|
||
{% else %}
|
||
<span class="flex size-[31px] items-center justify-center text-[14.4px] text-[#212326]" aria-hidden="true">
|
||
{{- part.title -}}
|
||
</span>
|
||
{% endif %}
|
||
</li>
|
||
{% endfor %}
|
||
|
||
{% if paginate.next %}
|
||
<li class="mx-[4px]">
|
||
<a
|
||
class="inline-flex items-center gap-1 px-2 text-[14.4px] text-[#1a1b18] no-underline hover:underline"
|
||
href="{{ paginate.next.url }}"
|
||
>
|
||
{{ 'blog.next' | t }}
|
||
<span aria-hidden="true">›</span>
|
||
</a>
|
||
</li>
|
||
{% endif %}
|
||
</ul>
|
||
</nav>
|
||
{% endif %}
|
||
{% endpaginate %}
|
||
</div>
|
||
</div>
|
||
|
||
{% schema %}
|
||
{
|
||
"name": "t:general.blog",
|
||
"settings": [
|
||
{
|
||
"type": "checkbox",
|
||
"id": "show_tags",
|
||
"label": "t:blog_section.show_tags",
|
||
"default": true
|
||
},
|
||
{
|
||
"type": "checkbox",
|
||
"id": "show_author",
|
||
"label": "t:blog_section.show_author",
|
||
"default": true
|
||
}
|
||
]
|
||
}
|
||
{% endschema %}
|