Current File : /home/n742ef5/royalanteam.com/wp-content/themes/myhome/templates/widgets/model/listing_socials.php |
<?php
/* @var Tangibledesign\MyHome\Widgets\Listing\ListingSocialsWidget $mhCurrentWidget */
global $mhCurrentWidget;
$mhModel = $mhCurrentWidget->getModel();
if (!$mhModel) {
return;
}
?>
<div class="myhome-listing-socials myhome-app">
<div class="myhome-social-icons myhome-social-icons--smaller-gap">
<?php foreach ($mhCurrentWidget->getIcons() as $icon) : ?>
<?php if ($icon['type'] === 'compare' && tdf_settings()->isCompareModelsEnabled()) : ?>
<mh-compare :model-id="<?php echo esc_attr($mhModel->getId()); ?>">
<div
slot-scope="compare"
<?php if (!empty($icon['mobile_only'])) : ?>
class="myhome-social-icons__icon myhome-social-icon myhome-social-icon--mobile myhome-social-icon--smaller myhome-social-icon--color-1 myhome-social-icon--hover-color-primary"
<?php else : ?>
class="myhome-social-icons__icon myhome-social-icon myhome-social-icon--smaller myhome-social-icon--color-1 myhome-social-icon--hover-color-primary"
<?php endif; ?>
@click.prevent="compare.onClick"
:class="{'myhome-social-icon--active': compare.isActive}"
>
<svg xmlns="http://www.w3.org/2000/svg" width="21" height="18" viewBox="0 0 21 18" fill="none">
<path d="M0.214532 8.75689L3.76943 12.2853L7.29782 8.73039L4.4645 8.74099L4.45125 5.19935C4.44682 4.01642 5.38535 3.07084 6.56828 3.06641L14.4927 3.03676C14.7911 3.85594 15.5738 4.44939 16.4902 4.44596C17.6554 4.4416 18.6116 3.47823 18.6072 2.31303C18.6029 1.14782 17.6395 0.191631 16.4743 0.195991C15.5579 0.19942 14.7797 0.798713 14.4874 1.6201L6.56298 1.64975C4.6151 1.65704 3.0273 3.25677 3.03459 5.20465L3.04785 8.74629L0.214532 8.75689ZM1.65504 15.1265C1.6594 16.2918 2.62277 17.2479 3.78798 17.2436C4.70433 17.2402 5.48257 16.6409 5.77485 15.8195L13.6993 15.7898C15.6472 15.7825 17.235 14.1828 17.2277 12.2349L17.2144 8.69328L20.0477 8.68268L16.4928 5.15429L12.9644 8.70919L15.7978 8.69858L15.811 12.2402C15.8154 13.4232 14.8769 14.3687 13.694 14.3732L5.76955 14.4028C5.47113 13.5836 4.68843 12.9902 3.77208 12.9936C2.60687 12.998 1.65068 13.9613 1.65504 15.1265ZM3.0717 15.1212C3.0702 14.7217 3.37779 14.4118 3.77738 14.4103C4.17697 14.4088 4.48686 14.7164 4.48836 15.1159C4.48985 15.5155 4.18227 15.8254 3.78268 15.8269C3.38309 15.8284 3.0732 15.5208 3.0717 15.1212ZM15.7739 2.32363C15.7724 1.92404 16.08 1.61414 16.4796 1.61265C16.8792 1.61115 17.1891 1.91874 17.1906 2.31833C17.1921 2.71792 16.8845 3.02781 16.4849 3.02931C16.0853 3.0308 15.7754 2.72322 15.7739 2.32363Z"
fill="#2A3946"/>
</svg>
<?php if ($mhCurrentWidget->showTooltips()) : ?>
<div class="myhome-social-icon__notice">
<?php echo esc_html(tdf_string('add_to_compare')); ?>
</div>
<?php endif; ?>
</div>
</mh-compare>
<?php elseif ($icon['type'] === 'facebook') : ?>
<a
<?php if (!empty($icon['mobile_only'])) : ?>
class="myhome-social-icons__icon myhome-social-icon myhome-social-icon--mobile myhome-social-icon--smaller myhome-social-icon--color-1 myhome-social-icon--hover-color-primary"
<?php else : ?>
class="myhome-social-icons__icon myhome-social-icon myhome-social-icon--smaller myhome-social-icon--color-1 myhome-social-icon--hover-color-primary"
<?php endif; ?>
href="https://www.facebook.com/sharer/sharer.php?u=<?php echo esc_url(tdf_app('current_url')); ?>"
target="_blank"
>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">
<!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->
<path d="M80 299.3V512H196V299.3h86.5l18-97.8H196V166.9c0-51.7 20.3-71.5 72.7-71.5c16.3 0 29.4 .4 37 1.2V7.9C291.4 4 256.4 0 236.2 0C129.3 0 80 50.5 80 159.4v42.1H14v97.8H80z"/>
</svg>
<?php if ($mhCurrentWidget->showTooltips()) : ?>
<div class="myhome-social-icon__notice">
<?php echo esc_html(tdf_string('share_on_facebook')); ?>
</div>
<?php endif; ?>
</a>
<?php elseif ($icon['type'] === 'twitter') : ?>
<a
<?php if (!empty($icon['mobile_only'])) : ?>
class="myhome-social-icons__icon myhome-social-icon myhome-social-icon--mobile myhome-social-icon--smaller myhome-social-icon--color-1 myhome-social-icon--hover-color-primary"
<?php else : ?>
class="myhome-social-icons__icon myhome-social-icon myhome-social-icon--smaller myhome-social-icon--color-1 myhome-social-icon--hover-color-primary"
<?php endif; ?>
href="https://twitter.com/share?url=<?php echo esc_url(tdf_app('current_url')); ?>"
target="_blank"
>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->
<path d="M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z"/>
</svg>
<?php if ($mhCurrentWidget->showTooltips()) : ?>
<div class="myhome-social-icon__notice">
<?php echo esc_html(tdf_string('share_on_twitter')); ?>
</div>
<?php endif; ?>
</a>
<?php elseif ($icon['type'] === 'whatsapp'): ?>
<a
<?php if (!empty($icon['mobile_only'])) : ?>
class="myhome-social-icons__icon myhome-social-icon myhome-social-icon--mobile myhome-social-icon--smaller myhome-social-icon--color-1 myhome-social-icon--hover-color-primary"
<?php else : ?>
class="myhome-social-icons__icon myhome-social-icon myhome-social-icon--smaller myhome-social-icon--color-1 myhome-social-icon--hover-color-primary"
<?php endif; ?>
href="whatsapp://send?text=<?php echo urlencode(tdf_app('current_url')); ?>"
target="_blank"
>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">
<!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->
<path d="M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-32.6-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7 .9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z"/>
</svg>
<?php if ($mhCurrentWidget->showTooltips()) : ?>
<div class="myhome-social-icon__notice">
<?php echo esc_html(tdf_string('share_on_whats_app')); ?>
</div>
<?php endif; ?>
</a>
<?php elseif ($icon['type'] === 'messenger') : ?>
<a
<?php if (!empty($icon['mobile_only'])) : ?>
class="myhome-social-icons__icon myhome-social-icon myhome-social-icon--mobile myhome-social-icon--smaller myhome-social-icon--color-1 myhome-social-icon--hover-color-primary"
<?php else : ?>
class="myhome-social-icons__icon myhome-social-icon myhome-social-icon--smaller myhome-social-icon--color-1 myhome-social-icon--hover-color-primary"
<?php endif; ?>
href="fb-messenger://share?link=<?php echo urlencode(tdf_app('current_url')); ?>"
target="_blank"
>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->
<path d="M256.6 8C116.5 8 8 110.3 8 248.6c0 72.3 29.7 134.8 78.1 177.9 8.4 7.5 6.6 11.9 8.1 58.2A19.9 19.9 0 0 0 122 502.3c52.9-23.3 53.6-25.1 62.6-22.7C337.9 521.8 504 423.7 504 248.6 504 110.3 396.6 8 256.6 8zm149.2 185.1l-73 115.6a37.4 37.4 0 0 1 -53.9 9.9l-58.1-43.5a15 15 0 0 0 -18 0l-78.4 59.4c-10.5 7.9-24.2-4.6-17.1-15.7l73-115.6a37.4 37.4 0 0 1 53.9-9.9l58.1 43.5a15 15 0 0 0 18 0l78.4-59.4c10.4-8 24.1 4.5 17.1 15.6z"/>
</svg>
<?php if ($mhCurrentWidget->showTooltips()) : ?>
<div class="myhome-social-icon__notice">
<?php echo esc_html(tdf_string('share_on_messenger')); ?>
</div>
<?php endif; ?>
</a>
<?php elseif ($icon['type'] === 'custom') : ?>
<a
<?php if (!empty($icon['mobile_only'])) : ?>
class="myhome-social-icons__icon myhome-social-icon myhome-social-icon--mobile myhome-social-icon--smaller myhome-social-icon--color-1 myhome-social-icon--hover-color-primary"
<?php else : ?>
class="myhome-social-icons__icon myhome-social-icon myhome-social-icon--smaller myhome-social-icon--color-1 myhome-social-icon--hover-color-primary"
<?php endif; ?>
href="<?php echo esc_attr(str_replace('[current_url]', urlencode(tdf_app('current_url')), $icon['custom_icon_link'])); ?>"
target="_blank"
>
<?php if ($icon['custom_icon']['library'] === 'svg') : ?>
<?php echo tdf_load_icon($icon['custom_icon']['value']['url']); ?>
<?php else : ?>
<i class="<?php echo esc_attr($icon['custom_icon']['value']); ?>"></i>
<?php endif; ?>
<?php if (!empty($icon['custom_icon_tooltip']) && $mhCurrentWidget->showTooltips()) : ?>
<div class="myhome-social-icon__notice">
<?php echo esc_html($icon['custom_icon_tooltip']); ?>
</div>
<?php endif; ?>
</a>
<?php endif; ?>
<?php endforeach; ?>
</div>
</div>