Refactor Pack Page Style

This commit is contained in:
Kentai Radiquum 2025-01-23 22:06:58 +05:00
parent 999ba6acbe
commit bf2684cabc
Signed by: Radiquum
GPG key ID: 858E8EE696525EED
22 changed files with 364 additions and 448 deletions

View file

@ -1,13 +0,0 @@
const ElementInstructionOV = document.getElementById(
"preview_sticker_pack_add_to_element_overlay"
);
const ElementInstruction = document.getElementById(
"preview_sticker_pack_add_to_element"
);
function toggleElementInstruction() {
ElementInstructionOV.classList.toggle("hidden");
ElementInstruction.classList.toggle("hidden");
ElementInstruction.classList.toggle("flex");
}

View file

@ -1,26 +1,26 @@
const images = document.querySelectorAll("[data-image-id]");
images.forEach((image, i) => {
if (i < 4) {
image.setAttribute("loading", "eager");
}
if (i < 4) {
image.setAttribute("loading", "eager")
}
const spinner = document.querySelector(
`[data-spinner-id="${image.getAttribute("data-image-id")}"]`
);
const spinner = document.querySelector(`[data-spinner-id="${image.getAttribute("data-image-id")}"]`)
if (image.height > 0 && image.complete) {
image.classList.remove("invisible");
spinner.classList.add("invisible");
return;
} else {
image.classList.add("invisible");
spinner.classList.remove("invisible");
}
if (image.height > 0 && image.complete) {
image.classList.remove("invisible");
spinner.classList.add("invisible");
return
} else {
image.classList.add("invisible");
spinner.classList.remove("invisible");
}
image.addEventListener("load", () => {
console.log("image " + image.getAttribute("data-image-id") + " loaded");
image.classList.remove("invisible");
spinner.classList.add("invisible");
image.removeEventListener("load", this);
});
});
image.addEventListener("load", () => {
console.log("image " + image.getAttribute("data-image-id") + " loaded");
image.classList.remove("invisible");
spinner.classList.add("invisible");
image.removeEventListener("load", this);
});
});

View file

@ -588,18 +588,6 @@ video {
}
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border-width: 0;
}
.invisible {
visibility: hidden;
}
@ -620,10 +608,6 @@ video {
left: 0px;
}
.left-1\/2 {
left: 50%;
}
.right-0 {
right: 0px;
}
@ -632,10 +616,6 @@ video {
top: 0px;
}
.top-8 {
top: 2rem;
}
.-z-10 {
z-index: -10;
}
@ -648,15 +628,15 @@ video {
z-index: 10;
}
.z-20 {
z-index: 20;
}
.mx-auto {
margin-left: auto;
margin-right: auto;
}
.mb-4 {
margin-bottom: 1rem;
}
.line-clamp-1 {
overflow: hidden;
display: -webkit-box;
@ -664,6 +644,10 @@ video {
-webkit-line-clamp: 1;
}
.block {
display: block;
}
.inline {
display: inline;
}
@ -684,26 +668,23 @@ video {
aspect-ratio: 1 / 1;
}
.h-16 {
height: 4rem;
}
.h-24 {
height: 6rem;
}
.h-48 {
height: 12rem;
}
.h-6 {
height: 1.5rem;
}
.h-fit {
height: -moz-fit-content;
height: fit-content;
}
.h-full {
height: 100%;
}
.min-h-16 {
min-height: 4rem;
}
.min-h-screen {
min-height: 100vh;
}
@ -720,10 +701,6 @@ video {
width: 6rem;
}
.w-48 {
width: 12rem;
}
.w-8 {
width: 2rem;
}
@ -732,8 +709,8 @@ video {
width: 100%;
}
.-translate-x-1\/2 {
--tw-translate-x: -50%;
.translate-y-\[var\(--tw-translate-y\)\] {
--tw-translate-y: var(--tw-translate-y);
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
@ -751,6 +728,10 @@ video {
grid-template-columns: repeat(1, minmax(0, 1fr));
}
.grid-cols-3 {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid-rows-1 {
grid-template-rows: repeat(1, minmax(0, 1fr));
}
@ -787,6 +768,10 @@ video {
overflow-x: hidden;
}
.whitespace-pre {
white-space: pre;
}
.rounded-full {
border-radius: 9999px;
}
@ -804,39 +789,22 @@ video {
border-bottom-left-radius: 0.5rem;
}
.border-b {
border-bottom-width: 1px;
}
.border-slate-400 {
--tw-border-opacity: 1;
border-color: rgb(148 163 184 / var(--tw-border-opacity, 1));
}
.bg-\[\#1d1f3d\] {
--tw-bg-opacity: 1;
background-color: rgb(29 31 61 / var(--tw-bg-opacity, 1));
}
.bg-\[\#259d7b\] {
--tw-bg-opacity: 1;
background-color: rgb(37 157 123 / var(--tw-bg-opacity, 1));
}
.bg-\[\#282443\] {
--tw-bg-opacity: 1;
background-color: rgb(40 36 67 / var(--tw-bg-opacity, 1));
}
.bg-\[\#2f7ca3\] {
--tw-bg-opacity: 1;
background-color: rgb(47 124 163 / var(--tw-bg-opacity, 1));
}
.bg-\[\#373737\] {
--tw-bg-opacity: 1;
background-color: rgb(55 55 55 / var(--tw-bg-opacity, 1));
}
.bg-black {
--tw-bg-opacity: 1;
background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1));
}
.bg-red-600 {
--tw-bg-opacity: 1;
background-color: rgb(220 38 38 / var(--tw-bg-opacity, 1));
.bg-\[var\(--bg-color\)\] {
background-color: var(--bg-color);
}
.bg-slate-800 {
@ -844,16 +812,6 @@ video {
background-color: rgb(30 41 59 / var(--tw-bg-opacity, 1));
}
.bg-stone-800 {
--tw-bg-opacity: 1;
background-color: rgb(41 37 36 / var(--tw-bg-opacity, 1));
}
.bg-stone-900 {
--tw-bg-opacity: 1;
background-color: rgb(28 25 23 / var(--tw-bg-opacity, 1));
}
.bg-gradient-to-b {
background-image: linear-gradient(to bottom, var(--tw-gradient-stops));
}
@ -901,21 +859,11 @@ video {
padding-bottom: 1rem;
}
.py-8 {
padding-top: 2rem;
padding-bottom: 2rem;
}
.text-2xl {
font-size: 1.5rem;
line-height: 2rem;
}
.text-4xl {
font-size: 2.25rem;
line-height: 2.5rem;
}
.text-lg {
font-size: 1.125rem;
line-height: 1.75rem;
@ -926,11 +874,20 @@ video {
line-height: 1.25rem;
}
.text-xl {
font-size: 1.25rem;
line-height: 1.75rem;
}
.text-xs {
font-size: 0.75rem;
line-height: 1rem;
}
.font-bold {
font-weight: 700;
}
.text-gray-200 {
--tw-text-opacity: 1;
color: rgb(229 231 235 / var(--tw-text-opacity, 1));
@ -961,25 +918,10 @@ video {
color: rgb(234 179 8 / var(--tw-text-opacity, 1));
}
.text-zinc-100 {
--tw-text-opacity: 1;
color: rgb(244 244 245 / var(--tw-text-opacity, 1));
}
.underline {
text-decoration-line: underline;
}
.opacity-40 {
opacity: 0.4;
}
.shadow-lg {
--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
.transition-transform {
transition-property: transform;
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
@ -994,10 +936,6 @@ video {
grid-row: 1;
}
.\[grid-template-columns\:repeat\(auto-fill\2c 96px\)\] {
grid-template-columns: repeat(auto-fill,96px);
}
.tiledBackground {
background-image: url('images/background-white.png');
background-repeat: repeat;
@ -1019,8 +957,8 @@ video {
}
@media (min-width: 640px) {
.sm\:inline {
display: inline;
.sm\:flex {
display: flex;
}
.sm\:h-10 {
@ -1035,10 +973,19 @@ video {
width: 8rem;
}
.sm\:grid-cols-4 {
grid-template-columns: repeat(4, minmax(0, 1fr));
}
.sm\:gap-4 {
gap: 1rem;
}
.sm\:px-8 {
padding-left: 2rem;
padding-right: 2rem;
}
.sm\:text-2xl {
font-size: 1.5rem;
line-height: 2rem;
@ -1061,37 +1008,52 @@ video {
}
@media (min-width: 768px) {
.md\:top-32 {
top: 8rem;
.md\:block {
display: block;
}
.md\:w-\[768px\] {
width: 768px;
}
.md\:max-w-\[768px\] {
max-width: 768px;
}
.md\:flex-row {
flex-direction: row;
}
.md\:whitespace-pre {
white-space: pre;
.md\:text-2xl {
font-size: 1.5rem;
line-height: 2rem;
}
}
@media (min-width: 1024px) {
.lg\:block {
display: block;
}
.lg\:hidden {
display: none;
}
.lg\:w-\[49\%\] {
width: 49%;
}
.lg\:grid-cols-2 {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.lg\:grid-cols-3 {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
}
@media (min-width: 1280px) {
.xl\:grid-cols-4 {
grid-template-columns: repeat(4, minmax(0, 1fr));
}
}
@media (min-width: 1536px) {
.\32xl\:grid-cols-3 {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
.\32xl\:grid-cols-5 {
grid-template-columns: repeat(5, minmax(0, 1fr));
}
}
@media (prefers-color-scheme: dark) {