Add search form submit #32 #45

Merged
jakob.scheid merged 20 commits from feature/search-form-submit into main 2026-05-14 11:29:19 +02:00
Showing only changes of commit 8f48f3dcb5 - Show all commits
+20 -3
View File
@@ -31,13 +31,30 @@ const routes = [
component: SearchResultsView, component: SearchResultsView,
props: route => ({ props: route => ({
searchQuery: route.query.q searchQuery: route.query.q
}) }),
meta: {
title: (route) => route.query.q
}
} }
]; ];
const router = createRouter({ const router = createRouter({
history: createWebHistory(), history: createWebHistory(),
routes routes
}) });
export default router // set page title
router.afterEach(to => {
const title =
typeof to.meta.title === 'function'
? to.meta.title(to)
: to.meta.title;
if (title) {
document.title = `${title} - Seekra`;
} else {
document.title = 'Seekra';
};
});
export default router;