<article class="n7-card auto-rows-min
">
<div class="grid gap-4">
<div class="n7-card__heading flex flex-col-reverse gap-4">
<h3 class="n7-card__title text-2xl font-bold">
<a class="hover:underline" href="">
Componente card esempio
</a>
</h3>
</div>
<p class="n7-card__excerpt text-lg">
Testo aggiuntivo da configurazione
</p>
</div>
</article>
{% extends '@card' %}
{% block classes %} auto-rows-min{% if classes %} {{ classes }}{% endif %}{% endblock %}
{
"categoryText": "Categoria",
"iconSize": "w-24 h-24",
"headingClasses": "text-2xl font-bold",
"heading": "Componente card esempio",
"text": "Testo",
"excerpt": "Testo aggiuntivo da configurazione",
"excerptClasses": "text-lg",
"ctaIcon": "mini--arrow-small-right"
}
/* 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: