<article class="n7-card px-2 md:py-0 md:px-4 border-b md:border-r md:border-b-0 last-of-type:border-b-0 md:last-of-type:border-r-0 n7-border-gray-01
is-card-fullclickable transition group">
<div class="grid gap-2 md:gap-4">
<div class="n7-card__heading flex flex-col-reverse gap-4">
<h3 class="n7-card__title text-lg md:text-xl md:text-2xl font-bold">
<a class="hover:underline group-hover:underline" href="">
Termine 30.11.2023
</a>
</h3>
</div>
<p class="n7-card__excerpt md:text-base">
Testo aggiuntivo da configurazione
</p>
</div>
</article>
{% extends '@card' %}
{% block fullClickable %}{% if fullClick %} is-card-fullclickable transition group{% endif %}{% endblock fullClickable %}"
{
"categoryText": "Categoria",
"iconSize": "w-24 h-24",
"headingClasses": "text-lg md:text-xl md:text-2xl font-bold",
"heading": "Termine 30.11.2023",
"text": "Testo",
"excerpt": "Testo aggiuntivo da configurazione",
"excerptClasses": "md:text-base",
"ctaIcon": "mini--arrow-small-right",
"fullClick": true,
"contentGap": "gap-2 md:gap-4",
"classes": "px-2 md:py-0 md:px-4 border-b md:border-r md:border-b-0 last-of-type:border-b-0 md:last-of-type:border-r-0 n7-border-gray-01"
}
/* From INCLUSIVE COMPONENT LIBRARY by Heydon Pickering
* https://inclusive-components.design/
* card pattern:
* https://inclusive-components.design/cards/
* Create redundant click event on the whole card, using only
* card heading link
* A click handler on the card's container element
* simply triggers the click method on the link inside it
* Add also a delay in click, in order to detect if the user is selecting the text and not clicking
*/
const cards = document.querySelectorAll('.n7-card.is-card-fullclickable');
Array.prototype.forEach.call(cards, card => {
let down, up, link = card.querySelector('.n7-card__title a');
card.style.cursor = 'pointer';
card.onmousedown = () => down = +new Date();
card.onmouseup = () => {
up = +new Date();
if ((up - down) < 200) {
link.click();
}
}
});
Card demo components example. Multiple variants and settings.
Variable settings:
Add the component in the card with “true” value
Manage image thumb settings: