2024-06-21 04:46:24 +00:00
|
|
|
<script setup lang="ts">
|
2024-06-24 02:59:38 +00:00
|
|
|
import { VPButton, VPHomeFeatures } from "vitepress/theme";
|
2024-06-21 04:46:24 +00:00
|
|
|
import { useClipboard } from "@vueuse/core";
|
|
|
|
|
|
|
|
const email = "m@mjfs.us";
|
|
|
|
const discord = "zettam";
|
|
|
|
const { text, copy, isSupported } = useClipboard();
|
2024-06-22 03:18:40 +00:00
|
|
|
|
|
|
|
const copiedMsg = (text: string) => `Copied ${text} to clipboard`;
|
2024-06-21 04:46:24 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2024-06-24 02:59:38 +00:00
|
|
|
<div v-if="isSupported" class="contact-buttons">
|
|
|
|
<div class="container">
|
|
|
|
<div class="buttons">
|
|
|
|
<VPButton
|
|
|
|
theme="brand"
|
|
|
|
class="button"
|
|
|
|
:text="text === email ? copiedMsg(email) : 'E-mail'"
|
|
|
|
@click="copy(email)"
|
|
|
|
/>
|
|
|
|
<VPButton
|
|
|
|
theme="alt"
|
|
|
|
class="button"
|
|
|
|
:text="text === discord ? copiedMsg(discord) : 'Discord'"
|
|
|
|
@click="copy(discord)"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-06-21 04:46:24 +00:00
|
|
|
</div>
|
2024-06-24 02:59:38 +00:00
|
|
|
<VPHomeFeatures v-else />
|
2024-06-21 04:46:24 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<style scoped>
|
2024-06-24 02:59:38 +00:00
|
|
|
.contact-buttons {
|
|
|
|
position: relative;
|
|
|
|
padding: 0 24px;
|
|
|
|
}
|
|
|
|
|
|
|
|
@media (min-width: 640px) {
|
|
|
|
.contact-buttons {
|
|
|
|
padding: 0 48px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@media (min-width: 960px) {
|
|
|
|
.contact-buttons {
|
|
|
|
padding: 0 64px;
|
|
|
|
}
|
2024-06-21 04:46:24 +00:00
|
|
|
}
|
2024-06-24 02:59:38 +00:00
|
|
|
|
2024-06-21 22:24:54 +00:00
|
|
|
.container {
|
2024-06-24 02:59:38 +00:00
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
margin: 0 auto;
|
|
|
|
max-width: 1152px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.buttons {
|
|
|
|
display: flex;
|
|
|
|
flex-wrap: wrap;
|
2024-06-21 04:46:24 +00:00
|
|
|
margin: -6px;
|
|
|
|
}
|
2024-06-24 02:59:38 +00:00
|
|
|
|
|
|
|
.button {
|
|
|
|
flex-shrink: 0;
|
|
|
|
margin: 6px;
|
|
|
|
text-decoration: none;
|
|
|
|
}
|
2024-06-21 04:46:24 +00:00
|
|
|
</style>
|