File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change 4444 */
4545 let numOfSnippets = Object .keys (others).length ;
4646
47- let windowWidth = $state (0 );
48-
49- let userAgent = $derived (windowWidth > 768 ? ' PC' : ' Mobile' );
50-
51- let p = $derived (windowWidth > 768 ? 1 : 15 );
52-
5347 /**
5448 * To save configs
5549 * */
141135 }, 501 );
142136 });
143137 });
144- $inspect (userAgent);
145138 $effect (() => {
146139 snippets[1 ].width ;
147140 setTimeout (() => {
150143 });
151144 </script >
152145
153- <svelte:window bind:innerWidth ={windowWidth } />
154-
155146<div id =" rootHead" >
156147 {#each snippets as snippet }
157148 <!-- svelte-ignore a11y_no_static_element_interactions -->
158149 <div
159150 class =" headItem"
160- style =" { userAgent === ' PC ' ? ' left' : ' top ' } : {snippet .start .current * 100 * p }%;"
151+ style ="left: {snippet .start .current * 100 }%;"
161152 style:pointer-events ={snippet .pointerEvents }
162153 class:actived ={snippet .actived }
163154 bind:this ={snippet .ele }
You can’t perform that action at this time.
0 commit comments