fix: breadcrumbs and marquee not observing clones
This commit is contained in:
parent
0727eccb71
commit
2e505f7606
4 changed files with 23 additions and 19 deletions
|
|
@ -1 +1 @@
|
||||||
nodeLinker: pnp
|
nodeLinker: node-modules
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ import { markdownConfig } from "./src/config/io/markdown.ts";
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
markdown: markdownConfig,
|
markdown: markdownConfig,
|
||||||
site: "https://quickshell.org",
|
site: "https://quickshell.org",
|
||||||
|
base: "/",
|
||||||
integrations: [
|
integrations: [
|
||||||
solidJs({
|
solidJs({
|
||||||
devtools: false,
|
devtools: false,
|
||||||
|
|
|
||||||
|
|
@ -192,13 +192,16 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||||
});
|
});
|
||||||
}, observerOptions);
|
}, observerOptions);
|
||||||
|
|
||||||
videos.forEach(v => {
|
const startObserving = () => {
|
||||||
|
const allVideos = scroller.querySelectorAll("video");
|
||||||
|
allVideos.forEach(v => {
|
||||||
videoObserver.observe(v);
|
videoObserver.observe(v);
|
||||||
v.addEventListener("ended", () => {
|
v.addEventListener("ended", () => {
|
||||||
targetScrollX += itemWidth;
|
targetScrollX += itemWidth;
|
||||||
startAnimation();
|
startAnimation();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
};
|
||||||
|
|
||||||
// events
|
// events
|
||||||
btnLeft?.addEventListener("click", () => {
|
btnLeft?.addEventListener("click", () => {
|
||||||
|
|
@ -211,15 +214,15 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||||
startAnimation();
|
startAnimation();
|
||||||
});
|
});
|
||||||
|
|
||||||
container.addEventListener(
|
// container.addEventListener(
|
||||||
"wheel",
|
// "wheel",
|
||||||
e => {
|
// e => {
|
||||||
e.preventDefault();
|
// e.preventDefault();
|
||||||
targetScrollX += e.deltaY;
|
// targetScrollX += e.deltaY;
|
||||||
startAnimation();
|
// startAnimation();
|
||||||
},
|
// },
|
||||||
{ passive: false }
|
// { passive: false }
|
||||||
);
|
// );
|
||||||
|
|
||||||
container.addEventListener("touchstart", e => {
|
container.addEventListener("touchstart", e => {
|
||||||
isDown = true;
|
isDown = true;
|
||||||
|
|
@ -260,6 +263,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||||
|
|
||||||
// init
|
// init
|
||||||
setupClones();
|
setupClones();
|
||||||
|
startObserving();
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
updateDimensions();
|
updateDimensions();
|
||||||
container.classList.add("initialized");
|
container.classList.add("initialized");
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,9 @@ let url = Astro.url.pathname.split("/").filter((s: string) => s !== "");
|
||||||
|
|
||||||
const breadcrumbs = [
|
const breadcrumbs = [
|
||||||
{
|
{
|
||||||
text: "custom",
|
text: "Home",
|
||||||
href: "/",
|
href: "/",
|
||||||
|
slot: "index",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -69,7 +70,6 @@ for (const segment of url) {
|
||||||
data-pagefind-ignore
|
data-pagefind-ignore
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
<!-- @ts-expect-error -->
|
|
||||||
slot="index"
|
slot="index"
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
width="1em"
|
width="1em"
|
||||||
|
|
@ -83,7 +83,6 @@ for (const segment of url) {
|
||||||
></path>
|
></path>
|
||||||
</svg>
|
</svg>
|
||||||
<svg
|
<svg
|
||||||
<!-- @ts-expect-error -->
|
|
||||||
slot="separator"
|
slot="separator"
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
width="1em"
|
width="1em"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue