Files
2026-09-15 10:35:56 +08:00

117 lines
4.7 KiB
PHTML

<?php
/**
* Mageplaza
*
* NOTICE OF LICENSE
*
* This source file is subject to the Mageplaza.com license that is
* available through the world-wide-web at this URL:
* https://www.mageplaza.com/LICENSE.txt
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this extension to newer
* version in the future.
*
* @category Mageplaza
* @package Mageplaza_SocialShare
* @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
?>
<?php /** @var \Mageplaza\SocialShare\Block\SocialShare $block */ ?>
<?php if ($block->isEnable()): ?>
<?php if ($block->isThisPageEnable() && $block->isThisPositionEnable()): ?>
<style type="text/css">
.a2a_svg, .a2a_count {
border-radius: <?= /* @noEscape */ $block->getBorderRadius()?> !important;
display: block;
}
<?php if ($block->isDisplayInline()):?>
.mp_social_share_inline, .mp_social_share_inline_under_cart {
display: flex;
border-radius: 7px;
padding: 7px 7px 7px 5px;
<?= /* @noEscape */ $block->getBackgroundColor()?>
}
.mp_social_share_inline {
width: fit-content;
justify-content: flex-end;
<?= $block->getPosition() === 'bottom_content' ? 'float: right;' : 'float: left;' ?>
}
.mp_social_share_inline_under_cart {
justify-content: flex-start;
float: left;
}
<?php else: ?>
.mp_social_share_float {
<?php if ($block->isVerticalStyle($block->getFloatStyle())): ?>
<?= /* @noEscape */ $block->getFloatMargin('top')?>
<?php endif;?>
<?= /* @noEscape */ $block->getFloatPosition()?>
<?= /* @noEscape */ $block->getBackgroundColor()?>
z-index: 9999;
}
<?php if (!$block->isVerticalStyle($block->getFloatStyle())):?>
.a2a_floating_style.a2a_default_style {
<?= /* @noEscape */ $block->getFloatMargin('bottom')?>
}
<?php endif;?>
@media only screen and (min-width: 430px) {.navigation { z-index: 1; }}
@media only screen and (max-width: 777px) {
.mp_social_share_inline {
width: fit-content;
justify-content: flex-end;
float: none;
}
}
.footer-bottom .container .logo { z-index: 0;}
<?php endif;?>
</style>
<div class="<?= /* @noEscape */ $block->getContainerClass($block->getDisplayType()) ?>">
<div class="a2a_kit <?= /* @noEscape */ $block->getDisplayType() ?>
<?= /* @noEscape */ $block->getButtonSize() ?>
<?= /* @noEscape */ $block->getFloatStyle() ?>">
<?php foreach ($block->getEnableService() as $enableService): ?>
<?php if ($block->isImageEnable($enableService)): ?>
<a class="a2a_button_<?= /* @noEscape */ $enableService ?>
<?= /* @noEscape */ $block->getShareCounter($enableService) ?>">
<img src="<?= /* @noEscape */ $block->getImageUrl($enableService) ?>"
<?= /* @noEscape */ $block->setImageSize($block->getButtonSize()) ?>
alt="<?= /* @noEscape */ $enableService ?>">
</a>
<?php else: ?>
<a class="a2a_button_<?= /* @noEscape */ $enableService ?>
<?= /* @noEscape */ $block->getShareCounter($enableService) ?>"></a>
<?php endif; ?>
<?php endforeach; ?>
<?php if ($block->isAddMoreShare()): ?>
<a class="a2a_dd <?= /* @noEscape */ $block->getShareCounter('a2a_dd') ?>"
href="https://www.addtoany.com/share"></a>
<?php endif; ?>
</div>
</div>
<script type="text/javascript">
var a2a_config = a2a_config || {};
a2a_config.icon_color ="<?= /* @noEscape */ $block->getIconColor() ?>";
a2a_config.num_services = <?= /* @noEscape */ $block->getNumberOfService() ?>;
a2a_config.onclick = <?= /* @noEscape */ $block->getMenuType() ?>;
a2a_config.thanks = {postShare: <?= /* @noEscape */ $block->getThankYou() ?>,};
a2a_config.exclude_services = [<?= /* @noEscape */ $block->getDisabledServices() ?>];
</script>
<?php endif; ?>
<?php endif; ?>