feat: don't render whatsapp link unless configured

This commit is contained in:
Björn Fromme
2024-07-17 14:44:14 +02:00
parent 1cd283ac6f
commit 93b182c333
2 changed files with 32 additions and 28 deletions
@@ -32,16 +32,18 @@
{settings.contactFormToEmail}
</div>
</f:link.email>
<a href="{settings.whatsAppNumberLink}"
class="contact-bar__item"
title="Whatsapp"
target="_blank"
rel="nofollow">
{ep:icon(icon: 'whatsapp', class: 'contact-bar__icon')}
<div class="contact-bar__label">
{settings.whatsApp}
</div>
</a>
<f:if condition="{settings.whatsApp}">
<a href="{settings.whatsAppNumberLink}"
class="contact-bar__item"
title="Whatsapp"
target="_blank"
rel="nofollow">
{ep:icon(icon: 'whatsapp', class: 'contact-bar__icon')}
<div class="contact-bar__label">
{settings.whatsApp}
</div>
</a>
</f:if>
<a href="{settings.facebookUrl}"
class="contact-bar__item"
target="_blank"
@@ -63,26 +63,28 @@
</span>
</div>
</div>
<div class="flex">
<div class="flex items-start space-x-2 pr-4">
{ep:icon(icon: 'whatsapp', class: 'w-12 h-12 text-white')}
<div class="text-white">
<span class="block uppercase text-xl">
WhatsApp
</span>
<a class="text-white whitespace-nowrap"
href="https://api.whatsapp.com/send?phone={settings.whatsAppNumberLink}"
title="WhatsApp"
target="_blank"
rel="nofollow">
{settings.whatsApp}
</a>
<f:if condition="{settings.whatsApp}">
<div class="flex">
<div class="flex items-start space-x-2 pr-4">
{ep:icon(icon: 'whatsapp', class: 'w-12 h-12 text-white')}
<div class="text-white">
<span class="block uppercase text-xl">
WhatsApp
</span>
<a class="text-white whitespace-nowrap"
href="https://api.whatsapp.com/send?phone={settings.whatsAppNumberLink}"
title="WhatsApp"
target="_blank"
rel="nofollow">
{settings.whatsApp}
</a>
</div>
</div>
<div class="text-white flex-1">
{f:translate(key: 'label.whatsapp_instructions', extensionName: 'ep_theme')}
</div>
</div>
<div class="text-white flex-1">
{f:translate(key: 'label.whatsapp_instructions', extensionName: 'ep_theme')}
</div>
</div>
</f:if>
</div>
</div>
</div>