forked from noxious/client
Convert GUI components to Tailwind (where possible smh)
This commit is contained in:
@ -1,106 +1,55 @@
|
||||
<template>
|
||||
<div class="menu-wrapper">
|
||||
<ul class="menu">
|
||||
<li class="menu-item">
|
||||
<p>Chat</p>
|
||||
<a>
|
||||
<img draggable="false" src="/assets/icons/chat.png" />
|
||||
</a>
|
||||
</li>
|
||||
<li class="menu-item">
|
||||
<p>World</p>
|
||||
<a>
|
||||
<img draggable="false" src="/assets/icons/world.png" />
|
||||
</a>
|
||||
</li>
|
||||
<li class="menu-item">
|
||||
<p>Users</p>
|
||||
<a>
|
||||
<img draggable="false" src="/assets/icons/users.png" />
|
||||
</a>
|
||||
</li>
|
||||
<li class="menu-item">
|
||||
<p>Inventory</p>
|
||||
<a>
|
||||
<img draggable="false" src="/assets/icons/treasure-chest.png" />
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<ul class="list-none flex gap-2.5">
|
||||
<li class="menu-item relative">
|
||||
<div class="absolute bottom-[65px] left-1/2 translate-x-[-50%] w-[85px] h-[24px] text-center bg-gray-300 border-2 border-solid border-cyan rounded-3xl hidden">
|
||||
<p class="absolute w-full bottom-0 m-0 text-sm leading-6">Chat</p>
|
||||
<div class="absolute top-[26px] bg-white h-[8px] w-[14px] [clip-path:polygon(100%_0,_0_0,_50%_100%)] left-1/2 translate-x-[-50%] hidden"></div>
|
||||
</div>
|
||||
<a class="p-2 bg-gray-300 bg-opacity-70 border-2 border-solid border-cyan rounded-lg block w-[45px] h-[35px]">
|
||||
<img class="w-[45px] h-[35px] object-contain" draggable="false" src="/assets/icons/chat.png" />
|
||||
</a>
|
||||
</li>
|
||||
<li class="menu-item relative">
|
||||
<div class="absolute bottom-[65px] left-1/2 translate-x-[-50%] w-[85px] h-[24px] text-center bg-gray-300 border-2 border-solid border-cyan rounded-3xl hidden">
|
||||
<p class="absolute w-full bottom-0 m-0 text-sm leading-6">World</p>
|
||||
<div class="absolute top-[26px] bg-white h-[8px] w-[14px] [clip-path:polygon(100%_0,_0_0,_50%_100%)] left-1/2 translate-x-[-50%] hidden"></div>
|
||||
</div>
|
||||
<a class="p-2 bg-gray-300 bg-opacity-70 border-2 border-solid border-cyan rounded-lg block w-[45px] h-[35px]">
|
||||
<img class="w-[45px] h-[35px] object-contain" draggable="false" src="/assets/icons/world.png" />
|
||||
</a>
|
||||
</li>
|
||||
<li class="menu-item relative">
|
||||
<div class="absolute bottom-[65px] left-1/2 translate-x-[-50%] w-[85px] h-[24px] text-center bg-gray-300 border-2 border-solid border-cyan rounded-3xl hidden">
|
||||
<p class="absolute w-full bottom-0 m-0 text-sm leading-6">Users</p>
|
||||
<div class="absolute top-[26px] bg-white h-[8px] w-[14px] [clip-path:polygon(100%_0,_0_0,_50%_100%)] left-1/2 translate-x-[-50%] hidden"></div>
|
||||
</div>
|
||||
<a class="p-2 bg-gray-300 bg-opacity-70 border-2 border-solid border-cyan rounded-lg block w-[45px] h-[35px]">
|
||||
<img class="w-[45px] h-[35px] object-contain" draggable="false" src="/assets/icons/users.png" />
|
||||
</a>
|
||||
</li>
|
||||
<li class="menu-item relative">
|
||||
<div class="absolute bottom-[65px] left-1/2 translate-x-[-50%] w-[85px] h-[24px] text-center bg-gray-300 border-2 border-solid border-cyan rounded-3xl hidden">
|
||||
<p class="absolute w-full bottom-0 m-0 text-sm leading-6">Inventory</p>
|
||||
<div class="absolute top-[26px] bg-white h-[8px] w-[14px] [clip-path:polygon(100%_0,_0_0,_50%_100%)] left-1/2 translate-x-[-50%] hidden"></div>
|
||||
</div>
|
||||
<a class="p-2 bg-gray-300 bg-opacity-70 border-2 border-solid border-cyan rounded-lg block w-[45px] h-[35px]">
|
||||
<img class="w-[45px] h-[35px] object-contain" draggable="false" src="/assets/icons/treasure-chest.png" />
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts"></script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import '@/assets/scss/main';
|
||||
.menu-item:hover {
|
||||
div {
|
||||
@apply block;
|
||||
}
|
||||
|
||||
.menu-wrapper {
|
||||
.menu {
|
||||
list-style: none;
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
a {
|
||||
@apply bg-gray bg-opacity-70 cursor-pointer;
|
||||
|
||||
.menu-item {
|
||||
position: relative;
|
||||
|
||||
p {
|
||||
position: absolute;
|
||||
bottom: 65px;
|
||||
width: 85px;
|
||||
text-align: center;
|
||||
background-color: $dark-gray;
|
||||
border: 2px solid $cyan;
|
||||
border-radius: 24px;
|
||||
height: 24px;
|
||||
font-size: 0.875rem;
|
||||
line-height: 24px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
display: none;
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: calc(100% + 2px);
|
||||
background-color: $white;
|
||||
height: 8px;
|
||||
width: 14px;
|
||||
clip-path: polygon(100% 0, 0 0, 50% 100%);
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
}
|
||||
|
||||
a {
|
||||
padding: 8px;
|
||||
background-color: rgba($dark-gray, 0.7);
|
||||
border: 2px solid $cyan;
|
||||
border-radius: 8px;
|
||||
display: block;
|
||||
width: 45px;
|
||||
height: 35px;
|
||||
|
||||
img {
|
||||
height: inherit;
|
||||
width: inherit;
|
||||
object-fit: contain;
|
||||
}
|
||||
}
|
||||
|
||||
&:hover {
|
||||
p {
|
||||
display: block;
|
||||
}
|
||||
|
||||
a {
|
||||
background-color: rgba($gray, 0.7);
|
||||
cursor: pointer;
|
||||
|
||||
img {
|
||||
filter: drop-shadow(0px 3px 6px $black);
|
||||
}
|
||||
}
|
||||
}
|
||||
img {
|
||||
@apply drop-shadow-default;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user