-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.vue
86 lines (74 loc) · 2.64 KB
/
app.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<script setup lang="ts">
useHead({
title: 'Beshiefy Me | Bakit 🤸♂️ malungkot 🤸♂️ ang 🤸♂️ beshie 🤸♂️ ko?',
link: [{ rel: 'icon', href: './cartwheel.svg' }],
})
const userInput = ref('')
const emojis = ref(['🤸♂️', '🤸', '❤', '🛒', '👌', '😀', '⭐', '😍', '⚡', '👍', '🙌', '✌', '🤣'])
const selectedEmoji = ref('🤸♂️')
const beshified = computed(() => {
return userInput.value.replaceAll(' ', ` ${selectedEmoji.value} `)
})
const copyToClipboard = () => {
navigator.clipboard.writeText(beshified.value)
}
</script>
<template>
<section class="container mx-auto flex justify-center h-screen">
<div class="my-auto max-w-min">
<div class="flex flex-col flex-wrap gap-2">
<div class="flex flex-col gap-2">
<div class="text-purple-800 font-medium mx-auto">
✨ Beshiefy Me ✨
</div>
<div class="flex flex-row gap-0">
<input type="text"
class="w-auto placeholder:text-gray-200 text-sm border-r-0 rounded-md rounded-r-none border-gray-200 transition focus:border-purple-200 focus:ring focus:ring-purple-200 focus:ring-opacity-50"
spellcheck="false" placeholder="Bakit malungkot ang beshie ko?" v-model="userInput">
<select
class="border-l-0 rounded-md rounded-l-none border-gray-200 transition focus:border-purple-200 focus:ring focus:ring-purple-200 focus:ring-opacity-50"
v-model="selectedEmoji">
<option v-for="emoji in emojis" :value="emoji">
{{ emoji }}
</option>
</select>
</div>
</div>
<Transition>
<div class="w-full bg-indigo-50 p-2 rounded-md" v-if="beshified">
<p class="text-xs">
{{ beshified }}
</p>
</div>
</Transition>
<Transition>
<div class="mx-auto" v-if="beshified">
<button class="bg-purple-50 p-2 rounded-md transition active:scale-95" @click="copyToClipboard">
<IconCopy />
</button>
</div>
</Transition>
</div>
</div>
</section>
<footer class="container mx-auto flex justify-center">
<div class="flex flex-col ">
<p class="text-sm">
Bryan Olandres
</p>
<a class="text-xs mx-auto hover:underline" href="https://github.com/veib6247/beshiefy-me" target="_blank">
Github
</a>
</div>
</footer>
</template>
<style>
.v-enter-active,
.v-leave-active {
transition: opacity 0.3s ease;
}
.v-enter-from,
.v-leave-to {
opacity: 0;
}
</style>