Reveal inline SiteTitle
This commit is contained in:
@@ -1,13 +1,34 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import SplitText from '$components/SplitText.svelte'
|
||||||
|
import { reveal, fly } from '$animations/index'
|
||||||
|
|
||||||
export let variant: string = 'lines'
|
export let variant: string = 'lines'
|
||||||
export let tag: string = 'h1'
|
export let tag: string = 'h1'
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if tag === 'h1'}
|
{#if tag === 'h1'}
|
||||||
<h1 class="site-title site-title--{variant}">
|
<h1 class="site-title site-title--{variant}"
|
||||||
<strong>Houses</strong>
|
use:reveal={{
|
||||||
<span>Of The</span>
|
animation: fly,
|
||||||
<strong>World</strong>
|
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>
|
</h1>
|
||||||
{:else}
|
{:else}
|
||||||
<div class="site-title site-title--{variant}">
|
<div class="site-title site-title--{variant}">
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
.site-title {
|
.site-title {
|
||||||
font-family: $font-serif;
|
font-family: $font-serif;
|
||||||
|
|
||||||
strong {
|
& > strong {
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
}
|
}
|
||||||
span {
|
& > span {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: -4px;
|
top: -4px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
@@ -63,12 +63,11 @@
|
|||||||
font-size: rem(96px);
|
font-size: rem(96px);
|
||||||
}
|
}
|
||||||
|
|
||||||
strong {
|
& > strong {
|
||||||
color: $color-secondary;
|
color: $color-secondary;
|
||||||
}
|
}
|
||||||
|
& > span {
|
||||||
span {
|
// display: block;
|
||||||
display: block;
|
|
||||||
top: 0;
|
top: 0;
|
||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
font-size: 0.3125em;
|
font-size: 0.3125em;
|
||||||
|
|||||||
Reference in New Issue
Block a user