2023-07-10 10:15:17 +02:00
|
|
|
<script>
|
2023-08-17 16:45:47 +02:00
|
|
|
import { getIsMobile } from '$lib/Helper.mjs'
|
2023-07-10 10:15:17 +02:00
|
|
|
import Button from '$lib/components/Button.svelte'
|
2023-08-17 16:45:47 +02:00
|
|
|
import Logo from '$lib/images/logos/hyprland-color.svg'
|
|
|
|
import { onMount } from 'svelte'
|
2023-09-03 18:00:52 +02:00
|
|
|
// import Firefly from './Firefly.svelte'
|
2023-07-10 10:15:17 +02:00
|
|
|
import { inview } from 'svelte-inview'
|
2023-09-04 20:54:16 +02:00
|
|
|
import HeroBackground from './HeroBackground.svelte'
|
2023-07-10 10:15:17 +02:00
|
|
|
|
2023-09-13 14:27:13 +02:00
|
|
|
export let backgroundData
|
|
|
|
|
2023-07-10 10:15:17 +02:00
|
|
|
let isVisible = true
|
2023-08-17 16:45:47 +02:00
|
|
|
let isMobile = false
|
|
|
|
|
|
|
|
onMount(() => {
|
|
|
|
isMobile = getIsMobile()
|
|
|
|
})
|
2023-07-10 10:15:17 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<section
|
2023-09-03 18:00:52 +02:00
|
|
|
class="relative flex h-max min-h-[100svh] w-full flex-col items-center justify-center overflow-x-hidden"
|
2023-07-10 10:15:17 +02:00
|
|
|
use:inview
|
2023-07-22 20:44:24 +02:00
|
|
|
on:inview_change={({ detail: { inView } }) => {
|
2023-07-10 10:15:17 +02:00
|
|
|
isVisible = inView
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
<!-- Hero text and logo -->
|
2023-09-05 21:09:18 +02:00
|
|
|
<div
|
2023-09-10 08:09:06 +02:00
|
|
|
class="pointer-events-none z-10 flex h-screen min-h-max flex-col items-center justify-center px-5"
|
2023-09-05 21:09:18 +02:00
|
|
|
>
|
2023-09-10 18:03:08 +02:00
|
|
|
<div class="mb-8 flex flex-col items-center gap-6 text-center sm:-mt-20">
|
2023-09-13 14:27:13 +02:00
|
|
|
<img
|
|
|
|
src={Logo}
|
|
|
|
alt="Hyprland Logo"
|
|
|
|
class="ani-in mb-6 h-40 w-48 object-contain fill-mode-backwards sm:h-48 sm:w-56"
|
|
|
|
loading="eager"
|
|
|
|
decoding="async"
|
|
|
|
/>
|
2023-09-03 18:00:52 +02:00
|
|
|
<div class="ani-in relative fill-mode-backwards [animation-delay:384ms]">
|
2023-09-13 14:27:13 +02:00
|
|
|
<h1 class="hyprgradient title">Hyprland</h1>
|
2023-07-10 10:15:17 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<h2
|
2023-09-10 08:09:06 +02:00
|
|
|
class="ani-in pointer-events-auto mb-10 max-w-[30ch] text-center text-lg font-medium leading-9 text-blue-200/80 fill-mode-backwards [animation-delay:944ms] sm:text-2xl"
|
2023-07-10 10:15:17 +02:00
|
|
|
>
|
2023-09-07 21:03:47 +02:00
|
|
|
Dynamic tiling Wayland compositor with the looks
|
2023-07-10 10:15:17 +02:00
|
|
|
</h2>
|
|
|
|
|
|
|
|
<div
|
2023-09-10 08:09:06 +02:00
|
|
|
class="pointer-events-auto flex items-center gap-7 duration-500 animate-in fade-in-0 slide-in-from-bottom-4 fill-mode-backwards [animation-delay:1390ms]"
|
2023-07-10 10:15:17 +02:00
|
|
|
>
|
|
|
|
<a href="https://wiki.hyprland.org/Getting-Started/Installation/">
|
|
|
|
<Button size="lg">Install</Button>
|
|
|
|
</a>
|
2023-09-10 08:09:06 +02:00
|
|
|
<a href="https://wiki.hyprland.org/">
|
2023-08-17 16:45:47 +02:00
|
|
|
<Button type="fancyOutline" size="lg">Wiki</Button>
|
|
|
|
</a>
|
2023-07-10 10:15:17 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2023-09-04 20:54:16 +02:00
|
|
|
<div class="absolute inset-0">
|
2023-09-13 14:27:13 +02:00
|
|
|
<HeroBackground {backgroundData} />
|
2023-09-04 20:54:16 +02:00
|
|
|
</div>
|
|
|
|
|
2023-07-10 10:15:17 +02:00
|
|
|
<!-- Fireflies -->
|
2023-09-03 18:00:52 +02:00
|
|
|
<!-- {#if isVisible}
|
2023-07-10 10:15:17 +02:00
|
|
|
<div
|
2023-09-03 18:00:52 +02:00
|
|
|
class="max-w-screen pointer-events-none absolute inset-0 -z-10 overflow-hidden animate-in fade-in-0 fill-mode-backwards [animation-delay:900ms] [animation-duration:4500ms]"
|
2023-07-10 10:15:17 +02:00
|
|
|
>
|
2023-09-03 18:00:52 +02:00
|
|
|
<div class="absolute bottom-0 z-10 h-52 w-full bg-gradient-to-t from-black" />
|
2023-07-10 10:15:17 +02:00
|
|
|
|
2023-08-17 16:45:47 +02:00
|
|
|
{#each { length: 40 } as _}
|
|
|
|
<Firefly />
|
|
|
|
{/each}
|
2023-07-10 10:15:17 +02:00
|
|
|
</div>
|
2023-09-03 18:00:52 +02:00
|
|
|
{/if} -->
|
2023-07-10 10:15:17 +02:00
|
|
|
</section>
|
|
|
|
|
|
|
|
<style lang="postcss">
|
2023-09-13 14:27:13 +02:00
|
|
|
.title {
|
|
|
|
background-clip: text;
|
|
|
|
padding: 0.5rem;
|
|
|
|
pointer-events: auto;
|
|
|
|
@apply font-london text-6xl font-bold tracking-wider text-transparent md:text-7xl md:tracking-widest;
|
|
|
|
}
|
|
|
|
|
2023-07-10 10:15:17 +02:00
|
|
|
@keyframes slidein {
|
|
|
|
from {
|
|
|
|
transform: translateX(0%);
|
|
|
|
}
|
|
|
|
|
|
|
|
to {
|
|
|
|
transform: translateX(100%);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.ani-in {
|
2023-09-03 18:00:52 +02:00
|
|
|
@apply ease-out animate-in fade-in-0 slide-in-from-bottom-6;
|
|
|
|
animation-duration: 1000ms;
|
2023-07-10 10:15:17 +02:00
|
|
|
}
|
|
|
|
</style>
|