Skip to content

Commit

Permalink
搁置
Browse files Browse the repository at this point in the history
  • Loading branch information
vhtmui committed Feb 12, 2025
1 parent 8ef24ae commit b6cec78
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/lib/ZHeader/ZHeader.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@
*/
let numOfSnippets = Object.keys(others).length;
let windowWidth = $state(0);
let userAgent = $derived(windowWidth > 768 ? 'PC' : 'Mobile');
let p = $derived(windowWidth > 768 ? 1 : 15);
/**
* To save configs
* */
Expand Down Expand Up @@ -141,7 +135,6 @@
}, 501);
});
});
$inspect(userAgent);
$effect(() => {
snippets[1].width;
setTimeout(() => {
Expand All @@ -150,14 +143,12 @@
});
</script>

<svelte:window bind:innerWidth={windowWidth} />

<div id="rootHead">
{#each snippets as snippet}
<!-- svelte-ignore a11y_no_static_element_interactions -->
<div
class="headItem"
style="{userAgent === 'PC' ? 'left' : 'top'}: {snippet.start.current * 100 * p}%;"
style="left: {snippet.start.current * 100}%;"
style:pointer-events={snippet.pointerEvents}
class:actived={snippet.actived}
bind:this={snippet.ele}
Expand Down

0 comments on commit b6cec78

Please sign in to comment.