2025-07-06 10:57:22 +08:00
|
|
|
<template>
|
|
|
|
|
<ul class="contact-footer">
|
|
|
|
|
<li class="mr-4 box_shadow" v-for="(item,index) in contactFooter" :key="index">
|
2025-09-11 16:15:34 +08:00
|
|
|
<a :href="item.link" @click="toShare(item.id)" target="_blank">
|
2025-07-06 10:57:22 +08:00
|
|
|
<b-img :src="item.icon" :alt="item.alt"></b-img>
|
|
|
|
|
</a>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: 'ContactFooter',
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
contactFooter: [
|
|
|
|
|
{
|
|
|
|
|
icon: require('../assets/image/icon/Facebook-colorful.png'),
|
|
|
|
|
link: 'javascript:;',
|
2025-09-11 16:15:34 +08:00
|
|
|
alt: 'Facebook',
|
|
|
|
|
id: 'facebook',
|
2025-07-06 10:57:22 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
icon: require('../assets/image/icon/X-colorful.png'),
|
|
|
|
|
link: 'javascript:;',
|
2025-09-11 16:15:34 +08:00
|
|
|
alt: 'X',
|
|
|
|
|
id: 'x',
|
2025-07-06 10:57:22 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
icon: require('../assets/image/icon/in-colorful.png'),
|
|
|
|
|
link: 'javascript:;',
|
2025-09-11 16:15:34 +08:00
|
|
|
alt: 'Linkedin',
|
|
|
|
|
id: 'linkedin'
|
2025-07-06 10:57:22 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
icon: require('../assets/image/icon/google-colorful.png'),
|
|
|
|
|
link: 'javascript:;',
|
2025-09-11 16:15:34 +08:00
|
|
|
alt: 'Pinterest',
|
|
|
|
|
id: 'pinterest'
|
2025-07-06 10:57:22 +08:00
|
|
|
},
|
2025-09-11 16:15:34 +08:00
|
|
|
|
2025-07-06 10:57:22 +08:00
|
|
|
{
|
|
|
|
|
icon: require('../assets/image/icon/fax-colorful.png'),
|
|
|
|
|
link: 'javascript:;',
|
2025-09-11 16:15:34 +08:00
|
|
|
alt: 'Whatsapp',
|
|
|
|
|
id: 'whatsapp'
|
2025-07-06 10:57:22 +08:00
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
2025-09-11 16:15:34 +08:00
|
|
|
},
|
|
|
|
|
methods:{
|
|
|
|
|
toShare(id){
|
|
|
|
|
const url = encodeURIComponent(window.location.href);
|
|
|
|
|
const title = encodeURIComponent(document.title);
|
|
|
|
|
|
|
|
|
|
if (id === 'facebook') {
|
|
|
|
|
window.open(`https://www.facebook.com/sharer/sharer.php?u=${url}`, '_blank');
|
|
|
|
|
}
|
|
|
|
|
if (id === 'x') {
|
|
|
|
|
window.open(`https://twitter.com/intent/tweet?url=${url}&text=${title}`, '_blank');
|
|
|
|
|
}
|
|
|
|
|
if (id === 'linkedin') {
|
|
|
|
|
window.open(`https://www.linkedin.com/sharing/share-offsite/?url=${url}`, '_blank');
|
|
|
|
|
}
|
|
|
|
|
if (id === 'pinterest') {
|
|
|
|
|
window.open(`https://pinterest.com/pin/create/button/?url=${url}`, '_blank');
|
|
|
|
|
}
|
|
|
|
|
if (id === 'whatsapp') {
|
|
|
|
|
window.open(`https://api.whatsapp.com/send?text=${title}%20${url}`, '_blank');
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-07-06 10:57:22 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.contact-footer {
|
|
|
|
|
height: 3.5rem;
|
|
|
|
|
margin: .625rem 0;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
background-color: #f0f3f8;
|
|
|
|
|
border-radius: .375rem;
|
|
|
|
|
}
|
|
|
|
|
</style>
|