<{* Component: content-card.html Description: One content entry (Indholdstyper) as a card or as a compact list row Params: entry - SafeContentEntry layout - "cards" (image + text in a box, default), "grid" (image + title) or "list" (compact row with a small image) show_image - show the entry's first image show_fields - show the fields marked to be shown in lists ($entry->getListFields()) heading - heading tag for the title (default h3) *}> <{if $entry}> <{$cc_url = $entry->getUrl()}> <{$cc_layout = $layout|default:'cards'}> <{$cc_heading = $heading|default:'h3'}> <{$cc_fields = []}> <{if $show_fields}> <{$cc_fields = $entry->getListFields()}> <{/if}> <{if $cc_layout == 'list'}>
<{if $show_image}> <{/if}>
<<{$cc_heading}> class="product-card-list__title"> <{if $cc_url}> <{$entry->getTitle()|escape}> <{else}> <{$entry->getTitle()|escape}> <{/if}> > <{if $cc_fields}>
    <{foreach $cc_fields as $cc_field}> <{include file="components/content-field.html" field=$cc_field entry=$entry variant="inline" class="product-card-list__attribute"}> <{/foreach}>
<{/if}>
<{else}>
<{if $show_image}> <{if $cc_url}>
<{else}>
<{/if}> <{/if}>
<<{$cc_heading}> class="blog-post__title<{if $cc_layout == 'grid' || (!$cc_fields && !$cc_url)}> blog-post__title--simple<{/if}>"> <{if $cc_url}> <{$entry->getTitle()|escape}> <{else}> <{$entry->getTitle()|escape}> <{/if}> > <{if $cc_fields}> <{/if}> <{if $cc_layout == 'cards' && $cc_url}>
<{t}>Læs mere<{/t}> <{include file="components/svg.html" class="" width="18" height="18" icon="chevron-right" title="Læs mere"|t}>
<{/if}>
<{/if}> <{/if}>