FEATURE Introducing a reusable download cta component

This commit is contained in:
Antoine M 2026-02-24 17:22:19 +01:00
parent 39fadbd763
commit 2809656e60

View File

@ -0,0 +1,9 @@
<?php
$url = $args['url'] ?? '#';
$alt = $args['alt'] ?? 'Lire la suite';
$target = $args['target'] ?? '_self';
$directDownload = $args['directDownload'] ?? false;
?>
<a href="<?php echo esc_url($url); ?>" class="cta cta--download cta--primary" target="<?php echo esc_attr($target); ?>"<?php echo $directDownload ? ' download' : ''; ?>>
<img src="<?php echo get_template_directory_uri(); ?>/resources/img/carhop-fleche-full-90.svg" alt="<?php echo $alt; ?>">
</a>