generated from the-pudding/svelte-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
191 additions
and
38 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
<script> | ||
import { getContext, onMount } from "svelte"; | ||
import { fit, parent_style } from "@leveluptuts/svelte-fit"; | ||
import { fly } from 'svelte/transition'; | ||
import { quintOut } from 'svelte/easing'; | ||
const copy = getContext("copy"); | ||
let textFade = false; | ||
onMount(async () => { | ||
setTimeout(() => { | ||
textFade = true; | ||
}, 1000); | ||
}); | ||
</script> | ||
|
||
<section id='intro'> | ||
<div class="bg-text-container"> | ||
<div class="bg-text" style={parent_style}> | ||
<h1 use:fit={{min_size: 12, max_size:400 }}>Wine Animals</h1> | ||
</div> | ||
</div> | ||
<div class="wine-bottle-container"> | ||
<img src="./assets/images/bottles/wine-opener-1.png" /> | ||
</div> | ||
<div class="text-container"> | ||
{#each copy.intro as text, i} | ||
{#if textFade} | ||
<p | ||
transition:fly={{ delay: 500*i, duration: 1000, y: 100, opacity: 0, easing: quintOut }} | ||
>{text.value}</p> | ||
{/if} | ||
{/each} | ||
</div> | ||
</section> | ||
|
||
<style> | ||
#intro { | ||
width: 100%; | ||
height: calc(100vh - 4rem); | ||
position: relative; | ||
} | ||
.bg-text-container { | ||
height: 100%; | ||
width: 100%; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
z-index: 1; | ||
} | ||
.bg-text h1 { | ||
font-family: "Manuka"; | ||
text-transform: uppercase; | ||
color: var(--wine-dark-gray); | ||
line-height: 0.8; | ||
text-align: center; | ||
} | ||
.wine-bottle-container { | ||
height: 100%; | ||
width: 100%; | ||
position: absolute; | ||
display: flex; | ||
/* align-items: center; */ | ||
justify-content: center; | ||
z-index: 800; | ||
padding: 3rem 0; | ||
} | ||
.wine-bottle-container img { | ||
height: 100%; | ||
} | ||
.text-container { | ||
height: 100%; | ||
width: 100%; | ||
position: absolute; | ||
z-index: 999; | ||
} | ||
.text-container p { | ||
font-size: var(--20px); | ||
max-width: 300px; | ||
position: absolute; | ||
} | ||
.text-container p:first-of-type { | ||
top: 10%; | ||
left: 10%; | ||
} | ||
.text-container p:nth-of-type(2) { | ||
top: 30%; | ||
right: 10%; | ||
} | ||
.text-container p:nth-of-type(3) { | ||
top: 50%; | ||
left: 10%; | ||
} | ||
.text-container p:nth-of-type(4) { | ||
top: 70%; | ||
right: 10%; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"title":"Title TK","description":"Description tk."} | ||
{"intro":[{"type":"text","value":"You’re on the hunt for a cheap bottle of wine."},{"type":"text","value":"This label with the gilded lion crest catches your eye."},{"type":"text","value":"It looks fancy, so it’s probably expensive."},{"type":"text","value":"But is it?"}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
name,value | ||
test,2 | ||
more,3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.