mirror of
https://codeberg.org/vlw/vlw.se.git
synced 2025-09-13 21:13:40 +02:00
chore: add support for Vegvisir 3.2
This commit is contained in:
parent
62ddd25f38
commit
d1106d85fb
5 changed files with 13 additions and 9 deletions
5
composer.lock
generated
5
composer.lock
generated
|
@ -40,7 +40,7 @@
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://codeberg.org/reflect/rules-plugin",
|
"url": "https://codeberg.org/reflect/rules-plugin",
|
||||||
"reference": "aa7d969350f50d00d7dce01b948276946fcc0e81"
|
"reference": "01cc1eea020ec5ea23140d86597bb5c8c1c2ec7f"
|
||||||
},
|
},
|
||||||
"default-branch": true,
|
"default-branch": true,
|
||||||
"type": "library",
|
"type": "library",
|
||||||
|
@ -60,7 +60,8 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Add request search paramter and request body constraints to an API built with Reflect",
|
"description": "Add request search paramter and request body constraints to an API built with Reflect",
|
||||||
"time": "2024-11-28T17:05:16+00:00"
|
"abandoned": true,
|
||||||
|
"time": "2025-04-04T06:00:01+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "vlw/mysql",
|
"name": "vlw/mysql",
|
||||||
|
|
|
@ -103,6 +103,6 @@ import { Elevent } from "/assets/js/modules/npm/Elevent.mjs";
|
||||||
});
|
});
|
||||||
|
|
||||||
// Reset color on navigation
|
// Reset color on navigation
|
||||||
vv.Navigation.shellElement.addEventListener(vv.Navigation.EVENTS.STARTED, () => updateColor(), { once: true });
|
VV.shell.addEventListener(VV.EVENT.START, () => updateColor(), { once: true });
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
// Redirect to work page if no href is defined
|
// Redirect to work page if no href is defined
|
||||||
if (!new URLSearchParams(window.location.search).has("href")) {
|
if (!new URLSearchParams(window.location.search).has("href")) {
|
||||||
new vv.Navigation("/work").navigate();
|
new VV().navigate("/work");
|
||||||
}
|
}
|
|
@ -3,7 +3,7 @@ import { Elevent } from "/assets/js/modules/npm/Elevent.mjs";
|
||||||
const CLASSNAME_SEARCHBOX_ACTIVE = "searchboxActive";
|
const CLASSNAME_SEARCHBOX_ACTIVE = "searchboxActive";
|
||||||
|
|
||||||
// Set global Vegvisir naviation delay for page transition effect
|
// Set global Vegvisir naviation delay for page transition effect
|
||||||
globalThis.vegvisir.globalNavigationDelayMs = 100;
|
VV.delay = 100;
|
||||||
|
|
||||||
// Handle search box open/close buttons
|
// Handle search box open/close buttons
|
||||||
{
|
{
|
||||||
|
@ -32,7 +32,7 @@ globalThis.vegvisir.globalNavigationDelayMs = 100;
|
||||||
// Root shell navigation event handlers
|
// Root shell navigation event handlers
|
||||||
{
|
{
|
||||||
// On all top shell navigations
|
// On all top shell navigations
|
||||||
new Elevent(vv.Navigation.EVENTS.STARTED, vv.Navigation.rootShellElement, () => {
|
new Elevent(VV.EVENT.START, VV.shell, () => {
|
||||||
// Close searchbox on top shell navigations
|
// Close searchbox on top shell navigations
|
||||||
document.querySelector("header").classList.remove(CLASSNAME_SEARCHBOX_ACTIVE);
|
document.querySelector("header").classList.remove(CLASSNAME_SEARCHBOX_ACTIVE);
|
||||||
});
|
});
|
||||||
|
@ -47,10 +47,13 @@ globalThis.vegvisir.globalNavigationDelayMs = 100;
|
||||||
clearTimeout(event.target._throttle);
|
clearTimeout(event.target._throttle);
|
||||||
event.target._throttle = setTimeout(() => {
|
event.target._throttle = setTimeout(() => {
|
||||||
// Navigate search-results element on user input
|
// Navigate search-results element on user input
|
||||||
new vv.Navigation(`/search?query=${event.target.value}`).navigate(searchResultsElement);
|
new VV(searchResultsElement).navigate(`/search?query=${event.target.value}`);
|
||||||
}, 100);
|
}, 100);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Navigate to the start page if the logo in the header is clicked
|
||||||
|
document.querySelector("header .logo").addEventListener("click", () => new VV().navigate("/"));
|
||||||
|
|
||||||
// Scroll page to top on navigation
|
// Scroll page to top on navigation
|
||||||
document.addEventListener(vegvisir.Navigation.EVENTS.FINISHED, () => window.scrollTo({ top: 0 }));
|
VV.shell.addEventListener(VV.EVENT.FINISH, () => window.scrollTo({ top: 0 }));
|
|
@ -53,7 +53,7 @@
|
||||||
<?= VV::embed("public/assets/media/icons/search.svg") ?>
|
<?= VV::embed("public/assets/media/icons/search.svg") ?>
|
||||||
<p>search vlw.se...</p>
|
<p>search vlw.se...</p>
|
||||||
</button>
|
</button>
|
||||||
<button class="logo" vv="/"><?= VV::embed("public/assets/media/vw.svg") ?></button>
|
<button class="logo"><?= VV::embed("public/assets/media/vw.svg") ?></button>
|
||||||
<searchbox>
|
<searchbox>
|
||||||
<input type="search" autocomplete="off" placeholder="search vlw.se...">
|
<input type="search" autocomplete="off" placeholder="search vlw.se...">
|
||||||
<button class="close searchbox-close"><?= VV::embed("public/assets/media/icons/close.svg") ?></button>
|
<button class="close searchbox-close"><?= VV::embed("public/assets/media/icons/close.svg") ?></button>
|
||||||
|
|
Loading…
Add table
Reference in a new issue