--- title: Card ---
Previous to version 3, the card component was a Nunjucks include. There are a number of things that had to be set before being able to use it, like the level of the heading or whether tags shall be displayed. WebC makes this easier, as you can now use the custom element and opt in to the different slots.
image: has slot="image" on the
container (picture or figure) by default)
headline: display the card's main titledate and tag: Grouped within the classes meta and cluster for date and tagging
information
contentfooter: for links or whatever footer informationI added some variants, avaliable via attribute selectors:
img-square: Enforces a square aspect ratio for imagesclickable: Makes the whole card clickableno-padding: Removes padding and background modifications{% raw %}<custom-card>
{% image "path-to-img", "alt-text" %}
<span slot="date"></span>
<span slot="tag" class="button"></span>
<h2 slot="headline"></h2>
<p slot="content"></p>
<footer slot="footer"></footer>
</custom-card>
{% endraw %}
Among them, there is no sort of traffic, no knowledge of letters, no understanding of numbers, no name of magistrates, nor of politics, only of virtues; and they measure all things by barleycorns; their money, plate, and other ornaments they so diligently polish that no rust can stick to them.
They have no lawyers among them, for they consider them as a sort of people whose profession it is to disguise matters and to wrest the laws [...].
Red Hat's first logo appeared on an early invoice. It was a simple, bright red brimmed top hat placed above the words "Red Hat Software."