Spaces:
Runtime error
Runtime error
File size: 3,015 Bytes
9e93b10 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | <script>
import { getContext, onMount } from "svelte";
const i18n = getContext("i18n");
import { REXPRO_BASE_URL } from "$lib/constants";
import Marquee from "./common/Marquee.svelte";
import SlideShow from "./common/SlideShow.svelte";
import ArrowRightCircle from "./icons/ArrowRightCircle.svelte";
export let show = true;
export let getStartedHandler = () => {};
function setLogoImage() {
const logo = document.getElementById("logo");
if (logo) {
const isDarkMode =
document.documentElement.classList.contains("dark");
if (isDarkMode) {
const darkImage = new Image();
darkImage.src = `${REXPRO_BASE_URL}/static/favicon-dark.png`;
darkImage.onload = () => {
logo.src = `${REXPRO_BASE_URL}/static/favicon-dark.png`;
logo.style.filter = ""; // Ensure no inversion is applied if splash-dark.png exists
};
darkImage.onerror = () => {
logo.style.filter = "invert(1)"; // Invert image if splash-dark.png is missing
};
}
}
}
$: if (show) {
setLogoImage();
}
</script>
{#if show}
<div class="w-full h-screen max-h-[100dvh] text-white relative">
<div class="fixed m-10 z-50">
<div class="flex space-x-2">
<div class=" self-center">
<img
id="logo"
src="{REXPRO_BASE_URL}/static/favicon.png"
class=" w-6 rounded-full"
alt="logo"
/>
</div>
</div>
</div>
<SlideShow duration={5000} />
<div
class="w-full h-full absolute top-0 left-0 bg-linear-to-t from-20% from-black to-transparent"
></div>
<div
class="w-full h-full absolute top-0 left-0 backdrop-blur-xs bg-black/50"
></div>
<div
class="relative bg-transparent w-full h-screen max-h-[100dvh] flex z-10"
>
<div
class="flex flex-col justify-end w-full items-center pb-10 text-center"
>
<div class="text-5xl lg:text-7xl font-secondary">
<Marquee
duration={5000}
words={[
$i18n.t("Explore the cosmos"),
$i18n.t("Unlock mysteries"),
$i18n.t("Chart new frontiers"),
$i18n.t("Dive into knowledge"),
$i18n.t("Discover wonders"),
$i18n.t("Ignite curiosity"),
$i18n.t("Forge new paths"),
$i18n.t("Unravel secrets"),
$i18n.t("Pioneer insights"),
$i18n.t("Embark on adventures"),
]}
/>
<div class="mt-0.5">{$i18n.t(`wherever you are`)}</div>
</div>
<div class="flex justify-center mt-8">
<div class="flex flex-col justify-center items-center">
<button
aria-label={$i18n.t("Get started")}
class="relative z-20 flex p-1 rounded-full bg-white/5 hover:bg-white/10 transition font-medium text-sm"
on:click={() => {
getStartedHandler();
}}
>
<ArrowRightCircle
className="size-6"
aria-hidden="true"
/>
</button>
<div
class="mt-1.5 font-primary text-base font-medium"
aria-hidden="true"
>
{$i18n.t(`Get started`)}
</div>
</div>
</div>
</div>
</div>
</div>
{/if}
|