Skip to content

Commit 5d51d50

Browse files
igoradamenkoConduitry
authored andcommitted
site: reuse layers variable in window bindings tutorial
1 parent 7de5d6c commit 5d51d50

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

site/content/tutorial/16-special-elements/04-svelte-window-bindings/app-a/App.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<svelte:window/>
88

99
<a class="parallax-container" href="https://www.firewatchgame.com">
10-
{#each [0, 1, 2, 3, 4, 5, 6, 7, 8] as layer}
10+
{#each layers as layer}
1111
<img
1212
style="transform: translate(0,{-y * layer / (layers.length - 1)}px)"
1313
src="https://www.firewatchgame.com/images/parallax/parallax{layer}.png"

site/content/tutorial/16-special-elements/04-svelte-window-bindings/app-b/App.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<svelte:window bind:scrollY={y}/>
88

99
<a class="parallax-container" href="https://www.firewatchgame.com">
10-
{#each [0, 1, 2, 3, 4, 5, 6, 7, 8] as layer}
10+
{#each layers as layer}
1111
<img
1212
style="transform: translate(0,{-y * layer / (layers.length - 1)}px)"
1313
src="https://www.firewatchgame.com/images/parallax/parallax{layer}.png"

0 commit comments

Comments
 (0)