🐛 The loading spinner isn't aligned with the wallpaper on mobile
This commit is contained in:
@@ -34,7 +34,7 @@ html, body {
|
||||
|
||||
:root {
|
||||
--wallpaper-pattern-height: 128px;
|
||||
--spinner-height: calc(32px * 2);
|
||||
--spinner-height: 5%;
|
||||
--window-center-pos: calc(50% + (var(--wallpaper-pattern-height) / 2) - (var(--spinner-height) / 2));
|
||||
}
|
||||
|
||||
@@ -45,109 +45,109 @@ html, body {
|
||||
}
|
||||
}
|
||||
/* @media (calc($wallpaper-pattern-height * 5) < height <= calc($wallpaper-pattern-height * 6)) { */
|
||||
@media (min-height: 640px) and (max-height: 768px) {
|
||||
@media (min-height: 641px) and (max-height: 768px) {
|
||||
:root {
|
||||
--spinner-top: calc(var(--window-center-pos) + (var(--wallpaper-pattern-height) * 1));
|
||||
--spinner-top: calc(var(--window-center-pos) + (var(--wallpaper-pattern-height) * 2));
|
||||
}
|
||||
}
|
||||
/* @media (calc($wallpaper-pattern-height * 6) < height <= calc($wallpaper-pattern-height * 8)) { */
|
||||
@media (min-height: 768px) and (max-height: 1024px) {
|
||||
@media (min-height: 769px) and (max-height: 1024px) {
|
||||
:root {
|
||||
--spinner-top: calc(var(--window-center-pos) + (var(--wallpaper-pattern-height) * 2));
|
||||
}
|
||||
}
|
||||
/* @media (calc($wallpaper-pattern-height * 8) < height <= calc($wallpaper-pattern-height * 10)) { */
|
||||
@media (min-height: 1024px) and (max-height: 1280px) {
|
||||
@media (min-height: 1025px) and (max-height: 1280px) {
|
||||
:root {
|
||||
--spinner-top: calc(var(--window-center-pos) + (var(--wallpaper-pattern-height) * 3));
|
||||
}
|
||||
}
|
||||
/* @media (calc($wallpaper-pattern-height * 10) < height <= calc($wallpaper-pattern-height * 12)) { */
|
||||
@media (min-height: 1280px) and (max-height: 1536px) {
|
||||
@media (min-height: 1281px) and (max-height: 1536px) {
|
||||
:root {
|
||||
--spinner-top: calc(var(--window-center-pos) + (var(--wallpaper-pattern-height) * 4));
|
||||
}
|
||||
}
|
||||
/* @media (calc($wallpaper-pattern-height * 12) < height <= calc($wallpaper-pattern-height * 14)) { */
|
||||
@media (min-height: 1536px) and (max-height: 1792px) {
|
||||
@media (min-height: 1537px) and (max-height: 1792px) {
|
||||
:root {
|
||||
--spinner-top: calc(var(--window-center-pos) + (var(--wallpaper-pattern-height) * 5));
|
||||
}
|
||||
}
|
||||
/* @media (calc($wallpaper-pattern-height * 14) < height <= calc($wallpaper-pattern-height * 16)) { */
|
||||
@media (min-height: 1792px) and (max-height: 2048px) {
|
||||
@media (min-height: 1793px) and (max-height: 2048px) {
|
||||
:root {
|
||||
--spinner-top: calc(var(--window-center-pos) + (var(--wallpaper-pattern-height) * 6));
|
||||
}
|
||||
}
|
||||
/* @media (calc($wallpaper-pattern-height * 16) < height <= calc($wallpaper-pattern-height * 18)) { */
|
||||
@media (min-height: 2048px) and (max-height: 2304px) {
|
||||
@media (min-height: 2049px) and (max-height: 2304px) {
|
||||
:root {
|
||||
--spinner-top: calc(var(--window-center-pos) + (var(--wallpaper-pattern-height) * 7));
|
||||
}
|
||||
}
|
||||
/* @media (calc($wallpaper-pattern-height * 18) < height <= calc($wallpaper-pattern-height * 20)) { */
|
||||
@media (min-height: 2304px) and (max-height: 2560px) {
|
||||
@media (min-height: 2305px) and (max-height: 2560px) {
|
||||
:root {
|
||||
--spinner-top: calc(var(--window-center-pos) + (var(--wallpaper-pattern-height) * 8));
|
||||
}
|
||||
}
|
||||
/* @media (calc($wallpaper-pattern-height * 20) < height <= calc($wallpaper-pattern-height * 22)) { */
|
||||
@media (min-height: 2560px) and (max-height: 2816px) {
|
||||
@media (min-height: 2561px) and (max-height: 2816px) {
|
||||
:root {
|
||||
--spinner-top: calc(var(--window-center-pos) + (var(--wallpaper-pattern-height) * 9));
|
||||
}
|
||||
}
|
||||
/* @media (calc($wallpaper-pattern-height * 22) < height <= calc($wallpaper-pattern-height * 24)) { */
|
||||
@media (min-height: 2816px) and (max-height: 3072px) {
|
||||
@media (min-height: 2817px) and (max-height: 3072px) {
|
||||
:root {
|
||||
--spinner-top: calc(var(--window-center-pos) + (var(--wallpaper-pattern-height) * 10));
|
||||
}
|
||||
}
|
||||
/* @media (calc($wallpaper-pattern-height * 24) < height <= calc($wallpaper-pattern-height * 26)) { */
|
||||
@media (min-height: 3072px) and (max-height: 3328px) {
|
||||
@media (min-height: 3073px) and (max-height: 3328px) {
|
||||
:root {
|
||||
--spinner-top: calc(var(--window-center-pos) + (var(--wallpaper-pattern-height) * 11));
|
||||
}
|
||||
}
|
||||
/* @media (calc($wallpaper-pattern-height * 26) < height <= calc($wallpaper-pattern-height * 28)) { */
|
||||
@media (min-height: 3328px) and (max-height: 3584px) {
|
||||
@media (min-height: 3329px) and (max-height: 3584px) {
|
||||
:root {
|
||||
--spinner-top: calc(var(--window-center-pos) + (var(--wallpaper-pattern-height) * 12));
|
||||
}
|
||||
}
|
||||
/* @media (calc($wallpaper-pattern-height * 28) < height <= calc($wallpaper-pattern-height * 30)) { */
|
||||
@media (min-height: 3584px) and (max-height: 3840px) {
|
||||
@media (min-height: 3585px) and (max-height: 3840px) {
|
||||
:root {
|
||||
--spinner-top: calc(var(--window-center-pos) + (var(--wallpaper-pattern-height) * 13));
|
||||
}
|
||||
}
|
||||
/* @media (calc($wallpaper-pattern-height * 30) < height <= calc($wallpaper-pattern-height * 32)) { */
|
||||
@media (min-height: 3840px) and (max-height: 4096px) {
|
||||
@media (min-height: 3841px) and (max-height: 4096px) {
|
||||
:root {
|
||||
--spinner-top: calc(var(--window-center-pos) + (var(--wallpaper-pattern-height) * 14));
|
||||
}
|
||||
}
|
||||
/* @media (calc($wallpaper-pattern-height * 32) < height <= calc($wallpaper-pattern-height * 34)) { */
|
||||
@media (min-height: 4096px) and (max-height: 4352px) {
|
||||
@media (min-height: 4097px) and (max-height: 4352px) {
|
||||
:root {
|
||||
--spinner-top: calc(var(--window-center-pos) + (var(--wallpaper-pattern-height) * 15));
|
||||
}
|
||||
}
|
||||
/* @media (calc($wallpaper-pattern-height * 34) < height <= calc($wallpaper-pattern-height * 36)) { */
|
||||
@media (min-height: 4352px) and (max-height: 4608px) {
|
||||
@media (min-height: 4353px) and (max-height: 4608px) {
|
||||
:root {
|
||||
--spinner-top: calc(var(--window-center-pos) + (var(--wallpaper-pattern-height) * 16));
|
||||
}
|
||||
}
|
||||
/* @media (calc($wallpaper-pattern-height * 36) < height <= calc($wallpaper-pattern-height * 38)) { */
|
||||
@media (min-height: 4608px) and (max-height: 4864px) {
|
||||
@media (min-height: 4609px) and (max-height: 4864px) {
|
||||
:root {
|
||||
--spinner-top: calc(var(--window-center-pos) + (var(--wallpaper-pattern-height) * 17));
|
||||
}
|
||||
}
|
||||
/* @media (calc($wallpaper-pattern-height * 38) < height <= calc($wallpaper-pattern-height * 40)) { */
|
||||
@media (min-height: 4864px) and (max-height: 5120px) {
|
||||
@media (min-height: 4865px) and (max-height: 5120px) {
|
||||
:root {
|
||||
--spinner-top: calc(var(--window-center-pos) + (var(--wallpaper-pattern-height) * 18));
|
||||
}
|
||||
@@ -182,7 +182,7 @@ html, body {
|
||||
}
|
||||
|
||||
.spinner {
|
||||
height: 5%;
|
||||
height: var(--spinner-height);
|
||||
aspect-ratio: 2;
|
||||
|
||||
position: absolute;
|
||||
|
@@ -33,7 +33,7 @@
|
||||
import init from "{base_path}/assets/dioxus/beau-gosse-du-92.js";
|
||||
|
||||
// Ensure that everything needed to render preloader has been downloaded
|
||||
// before fetching the app wasm bundle.
|
||||
// before fetching the wasm bundle.
|
||||
window.onload=function() {
|
||||
init("{base_path}/assets/dioxus/beau-gosse-du-92_bg.wasm").then(
|
||||
wasm => {
|
||||
|
Reference in New Issue
Block a user