Reveal inline SiteTitle

This commit is contained in:
2021-11-21 13:40:13 +01:00
parent 0148236b36
commit 68236bf39e
2 changed files with 30 additions and 10 deletions

View File

@@ -1,13 +1,34 @@
<script lang="ts">
import SplitText from '$components/SplitText.svelte'
import { reveal, fly } from '$animations/index'
export let variant: string = 'lines'
export let tag: string = 'h1'
</script>
{#if tag === 'h1'}
<h1 class="site-title site-title--{variant}">
<strong>Houses</strong>
<span>Of The</span>
<strong>World</strong>
<h1 class="site-title site-title--{variant}"
use:reveal={{
animation: fly,
options: {
children: '.char',
stagger: 40,
duration: 1000,
from: '110%',
opacity: false,
},
threshold: 0,
}}
>
<strong class="mask">
<SplitText text="Houses" mode="chars" />
</strong>
<span class="mask">
<SplitText text="Of The" mode="chars" />
</span>
<strong class="mask">
<SplitText text="World" mode="chars" />
</strong>
</h1>
{:else}
<div class="site-title site-title--{variant}">