| Server IP : 185.208.173.17 / Your IP : 87.236.161.98 Web Server : Microsoft-IIS/10.0 System : Windows NT SRV8576125506 10.0 build 26100 (Windows Server 2016) AMD64 User : IUSR ( 0) PHP Version : 7.4.13 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/inetpub/wwwroot/parsmega.nuxt/components/shared/contact/ |
Upload File : |
<template>
<div class="contact">
<div class="contact__items-wrapper" v-show="isItemsVisible">
<a :href="`tel:${$t('contactDirect')}`" class="contact__item contact__item--blue">
<span class="contact__item__text">
{{ $t("contactBtnDirectCall") }}
</span>
</a>
<a :href="$t('contactSellTeam')" class="contact__item contact__item--green">
<span class="contact__item__text">
{{ $t("contactBtnSellTeam") }}
</span>
</a>
<a :href="$t('contactTechnicalTeam')" class="contact__item contact__item--green">
<span class="contact__item__text">
{{ $t("contactBtnTechnicalTeam") }}
</span>
</a>
</div>
<button class="contact__primary-action contact__primary-action--close"
:title="$t('close')"
v-show="isItemsVisible"
@click="hideItems">
</button>
<button class="contact__primary-action contact__primary-action--show"
:title="$t('contactBtnPrimaryAction')"
v-show="!isItemsVisible"
@click="showItems">
<span class="contact__item__text contact__primary-action__text">
{{ $t("contactBtnPrimaryAction") }}
</span>
</button>
</div>
</template>
<script lang="js">
export default {
name: "ContactFloatedBtn",
data() {
return {
isItemsVisible: false
}
},
methods: {
showItems() {
this.isItemsVisible = true;
},
hideItems() {
this.isItemsVisible = false;
}
}
}
</script>
<style lang="scss" scoped>
.contact {
bottom: $padding-default * 2;
position: fixed;
right: $padding-default * .5;
z-index: $navigation-bar-z-index - 1;
[data-lang="en"] & {
left: $padding-default * .5;
right: auto;
}
&__items-wrapper {
position: absolute;
bottom: 64px;
width: 52px;
}
&__item {
$size: 52px;
background-color: transparent;
background-size: 24px;
background-position: center;
background-repeat: no-repeat;
box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
border: none;
border-radius: 50%;
display: block;
height: $size;
margin-bottom: $padding-default *.75;
position: relative;
text-decoration: none;
&--blue {
background-color: #4B72FF;
background-image: url("/resources/icon-phone.svg");
}
&--green {
background-color: #60D669;
background-image: url("/resources/icon-wahtsapp.svg");
background-size: 30px;
}
&__text {
background-color: $color-white;
box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.15);
border-radius: 16px;
border-bottom-right-radius: 0;
color: $color-text;
display: inline-block;
height: 32px;
line-height: 32px;
font-size: 12px;
font-weight: bold;
padding: 0 16px;
position: absolute;
right: $size + 4px;
top: 50%;
transform: translateY(-50%);
white-space: nowrap;
[data-lang="en"] & {
border-radius: 16px;
border-bottom-left-radius: 0;
left: $size + 4px;
right: auto;
}
}
}
&__primary-action {
$size: 64px;
border: none;
border: none;
border-radius: 50%;
border-bottom-left-radius: 0;
background-repeat: no-repeat;
background-position: center;
background-size: 32px;
background-color: $color-primary;
display: block;
height: $size;
position: relative;
width: $size;
&--show {
background-image: url("/resources/icon-phone.svg");
}
&--close {
background-image: url("/resources/icon-close.svg");
}
&__text {
right: $size + 4px;
[data-lang="en"] & {
left: $size + 4px;
right: 0;
}
}
[data-lang="en"] & {
border-bottom-left-radius: 50%;
border-bottom-right-radius: 0;
}
}
}
</style>