39 lines
1.1 KiB
Plaintext
39 lines
1.1 KiB
Plaintext
{% doc %}
|
|
Renders a category banner with its photo, title and description on the green panel.
|
|
|
|
@param {string} title - Category title
|
|
@param {string} text - Category description
|
|
@param {string} image - Optimized image asset filename
|
|
@param {string} url - Destination collection URL
|
|
|
|
@example
|
|
{% render 'category-card', title: 'Hidratantes', text: 'Descripción', image: 'banner-hidratantes.avif', url: '/collections/hidratantes' %}
|
|
{% enddoc %}
|
|
|
|
<a class="collection__banner category-card" href="{{ url }}">
|
|
<div class="collection__banner-media">
|
|
<img
|
|
class="collection__banner-image"
|
|
src="{{ image | asset_url }}"
|
|
alt="{{ title | escape }}"
|
|
width="960"
|
|
height="380"
|
|
loading="lazy"
|
|
decoding="async"
|
|
>
|
|
</div>
|
|
<div class="collection__banner-copy">
|
|
<h2 class="collection__banner-title">{{ title | escape }}</h2>
|
|
<p class="collection__banner-text">{{ text | escape }}</p>
|
|
<img
|
|
class="collection__banner-blob !hidden"
|
|
src="{{ 'Capa_1.avif' | asset_url }}"
|
|
alt=""
|
|
width="185"
|
|
height="210"
|
|
loading="lazy"
|
|
decoding="async"
|
|
>
|
|
</div>
|
|
</a>
|