forked from suyu/website
improve exclusions
This commit is contained in:
parent
cc59991ec9
commit
da1db64e32
2 changed files with 22 additions and 6 deletions
|
@ -4,11 +4,12 @@
|
||||||
import LogoWithTextHorizontal from "$components/LogoWithTextHorizontal.svelte";
|
import LogoWithTextHorizontal from "$components/LogoWithTextHorizontal.svelte";
|
||||||
import { page } from "$app/stores";
|
import { page } from "$app/stores";
|
||||||
import "$lib/css/index.css";
|
import "$lib/css/index.css";
|
||||||
|
import { onMount } from "svelte";
|
||||||
|
|
||||||
const excludedRoutesNav = ["/mockup/boot"];
|
const excludedRoutesNav = ["/mockup/boot"];
|
||||||
const excludedRoutesBg = ["/mockup"];
|
const excludedRoutesBg = ["/mockup"];
|
||||||
$: isNavExcluded = excludedRoutesNav.some((route) => $page.url.pathname.startsWith(route));
|
$: isNavExcluded = excludedRoutesNav.some((route) => $page.url?.pathname.startsWith(route));
|
||||||
$: isBgExcluded = excludedRoutesBg.some((route) => $page.url.pathname === route);
|
$: isBgExcluded = excludedRoutesBg.some((route) => $page.url?.pathname === route);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if !isNavExcluded}
|
{#if !isNavExcluded}
|
||||||
|
|
|
@ -3,13 +3,16 @@
|
||||||
import { onMount } from "svelte";
|
import { onMount } from "svelte";
|
||||||
import type { PageData } from "./$types";
|
import type { PageData } from "./$types";
|
||||||
import Logo from "$components/Logo.svelte";
|
import Logo from "$components/Logo.svelte";
|
||||||
|
import { page } from "$app/stores";
|
||||||
|
|
||||||
let shadersDone = 0;
|
let shadersDone = 0;
|
||||||
const shadersTotal = 8146;
|
const shadersTotal = 8146;
|
||||||
|
|
||||||
export let data: PageData;
|
export let data: PageData;
|
||||||
|
$: game =
|
||||||
$: game = data.props.games[0];
|
data.props.games.find(
|
||||||
|
(g) => g.title.trim().toLowerCase() === $page.params.game.trim().toLowerCase(),
|
||||||
|
) || data.props.games[0];
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
const interval = setInterval(() => {
|
const interval = setInterval(() => {
|
||||||
shadersDone += Math.floor(Math.random() * 150);
|
shadersDone += Math.floor(Math.random() * 150);
|
||||||
|
@ -44,7 +47,7 @@
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
@keyframes spin {
|
@keyframes spin {
|
||||||
0% {
|
/* 0% {
|
||||||
transform: none;
|
transform: none;
|
||||||
animation-timing-function: cubic-bezier(1, 0, 1, 1);
|
animation-timing-function: cubic-bezier(1, 0, 1, 1);
|
||||||
}
|
}
|
||||||
|
@ -66,6 +69,13 @@
|
||||||
70%,
|
70%,
|
||||||
100% {
|
100% {
|
||||||
transform: scale(1) rotateZ(720deg);
|
transform: scale(1) rotateZ(720deg);
|
||||||
|
} */
|
||||||
|
0% {
|
||||||
|
transform: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
100% {
|
||||||
|
transform: rotateZ(360deg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,7 +84,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.logo {
|
.logo {
|
||||||
animation: spin 4s infinite;
|
animation: spin 2s reverse infinite cubic-bezier(0.8, 0, 0.2, 1);
|
||||||
|
transform-origin: 50.1% 47.45%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.body {
|
.body {
|
||||||
|
@ -120,6 +131,9 @@
|
||||||
font-size: 32px;
|
font-size: 32px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.launching {
|
||||||
--mask-image: linear-gradient(
|
--mask-image: linear-gradient(
|
||||||
90deg,
|
90deg,
|
||||||
black,
|
black,
|
||||||
|
@ -132,5 +146,6 @@
|
||||||
|
|
||||||
.bold {
|
.bold {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in a new issue