44 import Metadata from ' $lib/Metadata.svelte' ;
55 import { browser } from ' $app/environment' ;
66 import TvLoadingControl from ' $lib/tv/TVLoadingControl.svelte' ;
7- import band from ' $lib/data/band.json'
7+ import band from ' $lib/data/band.json' ;
8+ import { beforeNavigate } from ' $app/navigation' ;
9+
810 interface Props {
911 children? : import (' svelte' ).Snippet ;
1012 }
1113
1214 let { children }: Props = $props ();
1315
14- const prefersReducedQuery = browser ? window .matchMedia (' (prefers-reduced-motion: reduce)' ) : undefined
15- const prefersReduced: Writable <boolean > = writable (prefersReducedQuery ?.matches )
16- setContext (" prefersReduced" , prefersReduced )
16+ const prefersReducedQuery = browser
17+ ? window .matchMedia (' (prefers-reduced-motion: reduce)' )
18+ : undefined ;
19+ const prefersReduced: Writable <boolean > = writable (prefersReducedQuery ?.matches );
20+ setContext (' prefersReduced' , prefersReduced );
1721
18- const control = $state ({ element: undefined , props: {}})
19- const ControlElement = $derived (control .element ?? TvLoadingControl )
22+ const flicker = () => {
23+ showStatic = true ;
24+ setTimeout (() => (showStatic = false ), 500 );
25+ };
26+ const control = $state ({ element: undefined , props: {}, flicker });
27+ const ControlElement = $derived (control .element ?? TvLoadingControl );
2028
2129 setContext (' control' , control );
2230
2533 wrapper .scrollIntoView ({ behavior: ' auto' , block: ' center' , inline: ' center' });
2634 };
2735
36+
2837 onMount (() => {
2938 new ResizeObserver (() => setTimeout (() => centerTv (), 10 )).observe (document .body );
30- prefersReducedQuery ?.addEventListener (" change" , () => {$prefersReduced = prefersReducedQuery .matches })
39+ prefersReducedQuery ?.addEventListener (' change' , () => {
40+ $prefersReduced = prefersReducedQuery .matches ;
41+ });
42+ });
43+
44+ let showStatic: boolean = $state (false );
45+
46+ beforeNavigate (() => {
47+ flicker ();
3148 });
3249 </script >
3350
5572 </aside >
5673 <section >
5774 <div class =" section-bg" ></div >
58- <div class =" content-wrapper" >
59- {@render children ?.()}
75+ <div class ="content-wrapper" class:static ={showStatic }>
76+ <div class ="content-inner" class:hidden ={showStatic }>
77+ {@render children ?.()}
78+ </div >
6079 </div >
6180 </section >
6281 </main >
6786 <div class =" section-group" >
6887 <nav class =" section" >
6988 <h1 >follow us <span class =" arrows" >>></span ></h1 >
70- <a href ={band .links .instagram }
71- rel =" external"
72- class =" icon-link" ><img
73- alt =" instagram"
74- src =" /icons/instagram.svg" /></a >
75- <a href ={band .links .tiktok }
76- rel =" external"
77- class =" icon-link" ><img
78- alt =" tiktok"
79- src =" /icons/tiktok.svg" /></a >
80- <a href ={band .links .youtube }
81- rel =" external"
82- class =" icon-link" ><img
83- alt =" youtube"
84- src =" /icons/youtube.svg" /></a >
89+ <a href ={band .links .instagram } rel =" external" class =" icon-link"
90+ ><img alt =" instagram" src =" /icons/instagram.svg" /></a
91+ >
92+ <a href ={band .links .tiktok } rel =" external" class =" icon-link"
93+ ><img alt =" tiktok" src =" /icons/tiktok.svg" /></a
94+ >
95+ <a href ={band .links .youtube } rel =" external" class =" icon-link"
96+ ><img alt =" youtube" src =" /icons/youtube.svg" /></a
97+ >
8598 </nav >
8699 <nav class =" section" >
87- <h1 ><a rel ="external" href ={band .links .hearnow }>stream us</a > <span
88- class =" arrows" >>></span ></h1 >
89- <a
90- href ={band .links .spotify }
91- rel =" external"
92- class =" icon-link" >
93- <img alt =" spotify"
94- src =" /icons/spotify.svg" /></a >
95- <a href ={band .links .apple }
96- rel =" external"
97- class =" icon-link" >
98- <img alt =" apple"
99- src =" /icons/apple.svg" />
100+ <h1 >
101+ <a rel ="external" href ={band .links .hearnow }>stream us</a >
102+ <span class =" arrows" >>></span >
103+ </h1 >
104+ <a href ={band .links .spotify } rel =" external" class =" icon-link" >
105+ <img alt =" spotify" src =" /icons/spotify.svg" /></a
106+ >
107+ <a href ={band .links .apple } rel =" external" class =" icon-link" >
108+ <img alt =" apple" src =" /icons/apple.svg" />
100109 </a >
101- <a href ={band .links .amazon }
102- rel =" external"
103- class =" icon-link" >
104- <img alt =" amazon"
105- src =" /icons/amazon.svg" /></a >
110+ <a href ={band .links .amazon } rel =" external" class =" icon-link" >
111+ <img alt =" amazon" src =" /icons/amazon.svg" /></a
112+ >
106113 </nav >
107114 </div >
108115 </div >
109116 <div class =" image-bin" >
110117 <a rel =" external" href =" https://www.sheridancollege.ca" >
111- <img src =" /logo/sheridan-logo.png" alt =" The Sheridan college logo."
112- style =" filter: invert(94%) sepia(94%) saturate(0%) hue-rotate(241deg) brightness(106%) contrast(105%);" />
118+ <img
119+ src =" /logo/sheridan-logo.png"
120+ alt =" The Sheridan college logo."
121+ style =" filter: invert(94%) sepia(94%) saturate(0%) hue-rotate(241deg) brightness(106%) contrast(105%);"
122+ />
113123 </a >
114124 <img src =" /logo/blf-logo.png" alt =" The Borderline Fever logo." />
115125 </div >
118128</div >
119129
120130<style >
121- .icon-link img {
122- filter : invert (100% ) sepia (9% ) saturate (1% ) hue-rotate (67deg ) brightness (101% ) contrast (101% );
123- width : 24px ;
124- height : 24px ;
125- }
126-
127- #credits {
128- opacity : 0.7 ;
129- font-style : italic ;
130- }
131- </style >
131+ .icon-link img {
132+ filter : invert (100% ) sepia (9% ) saturate (1% ) hue-rotate (67deg ) brightness (101% ) contrast (101% );
133+ width : 24px ;
134+ height : 24px ;
135+ }
136+
137+ #credits {
138+ opacity : 0.7 ;
139+ font-style : italic ;
140+ }
141+
142+ .content-wrapper {
143+ z-index : -1 ;
144+ }
145+
146+ .content-inner {
147+ width : 100% ;
148+ height : 100% ;
149+ }
150+
151+ .content-inner.hidden {
152+ visibility : hidden ;
153+ }
154+
155+ .content-wrapper.static {
156+ background-image : url (' /static-crt.gif' );
157+ }
158+ </style >
0 commit comments