Skip to content

Commit

Permalink
Update modal styling
Browse files Browse the repository at this point in the history
  • Loading branch information
Iapetus-11 committed Nov 28, 2024
1 parent 3b05d7c commit f80d59d
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/components/Modal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import { onBeforeUnmount, onMounted, ref } from 'vue';
const emit = defineEmits<{
(evt: 'close'): void;
close: [],
}>();
const dialog = ref<HTMLDialogElement>();
Expand Down Expand Up @@ -41,7 +41,7 @@
</script>

<template>
<dialog ref="dialog" class="rounded-lg">
<dialog ref="dialog" class="rounded-lg shadow-xl max-lg:!border-t-0 frosted-glass bg-purple-400/60">
<div ref="innerContainer" v-bind="$attrs">
<slot />
</div>
Expand Down
14 changes: 13 additions & 1 deletion src/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,16 @@
::-webkit-scrollbar-thumb {
@apply rounded-md bg-purple-400;
}
}

.frosted-glass {
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);

box-shadow:
inset -0.75px -0.5px rgba(255, 255, 255, 0.1),
inset +0.75px +0.5px rgba(255, 255, 255, 0.025),
3px 2px 10px rgba(0, 0, 0, 0.25),
inset 0px 0px 10px 5px rgba(255, 255, 255, 0.025),
inset 0px 0px 40px 5px rgba(255, 255, 255, 0.025);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@

<template>
<Modal @close="$emit('close')" class="flex w-72 flex-col items-center p-4">
<h1 class="mb-2 flex items-center text-xl text-gray-800">
<h1 class="mb-2 flex items-center text-xl text-gray-100">
<img src="/art/tacos/pixel.png" alt="Pixel Taco" class="-ml-2 mr-2 w-10" />
Not Enough Tacos!
</h1>

<img :src="autoClicker.icon" :alt="autoClickerName" class="mb-4 w-36" />

<p class="mb-3 hyphens-auto text-gray-700">
<p class="mb-3 hyphens-auto text-gray-100">
You need {{ autoClicker.price }} tacos to purchase this auto clicker
</p>

<button
type="button"
@click="$emit('close')"
class="w-full rounded-lg border border-gray-400 p-1.5 transition-colors hover:bg-gray-100"
class="w-full rounded-lg border border-purple-400 p-1.5 transition-colors hover:bg-purple-300/50 text-gray-100"
>
Ok
</button>
Expand Down
6 changes: 3 additions & 3 deletions src/views/game/panels/skins/NotEnoughTacosForSkinModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@

<template>
<Modal @close="$emit('close')" class="flex w-72 flex-col items-center p-4">
<h1 class="mb-2 flex items-center text-xl text-gray-800">
<h1 class="mb-2 flex items-center text-xl text-gray-100">
<img src="/art/tacos/pixel.png" alt="Pixel Taco" class="-ml-2 mr-2 w-10" />
Not Enough Tacos!
</h1>

<img :src="autoClicker.icon" :alt="skinName" class="mb-4 w-36" />

<p class="mb-3 hyphens-auto text-gray-700">
<p class="mb-3 hyphens-auto text-gray-100">
You need {{ autoClicker.price }} tacos to purchase this taco skin
</p>

<button
type="button"
@click="$emit('close')"
class="w-full rounded-lg border border-gray-400 p-1.5 transition-colors hover:bg-gray-100"
class="w-full rounded-lg border border-purple-400 p-1.5 transition-colors hover:bg-purple-300/50 text-gray-100"
>
Ok
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@

<template>
<Modal @close="$emit('close')" class="flex w-72 flex-col items-center p-4">
<h1 class="mb-2 flex items-center text-xl text-gray-800">
<h1 class="mb-2 flex items-center text-xl text-gray-100">
<img src="/art/tacos/pixel.png" alt="Pixel Taco" class="-ml-2 mr-2 w-10" />
Not Enough Tacos!
</h1>

<img :src="topping.icon" :alt="toppingName" class="mb-4 w-24" />

<p class="mb-3 hyphens-auto text-gray-700">
<p class="mb-3 hyphens-auto text-gray-100">
You need {{ topping.price }} tacos to purchase this topping
</p>

<button
type="button"
@click="$emit('close')"
class="w-full rounded-lg border border-gray-400 p-1.5 transition-colors hover:bg-gray-100"
class="w-full rounded-lg border border-purple-400 p-1.5 transition-colors hover:bg-purple-300/50 text-gray-100"
>
Ok
</button>
Expand Down

0 comments on commit f80d59d

Please sign in to comment.