diff --git a/src/components/VContentSwitcher/VSearchTypePopover.vue b/src/components/VContentSwitcher/VSearchTypePopover.vue index 8fbec66ae0..81901c40ba 100644 --- a/src/components/VContentSwitcher/VSearchTypePopover.vue +++ b/src/components/VContentSwitcher/VSearchTypePopover.vue @@ -17,7 +17,7 @@ class="w-[260px] pt-2" size="small" :use-links="placement === 'header'" - @select="closePopover" + @select="handleSelect" /> @@ -25,6 +25,8 @@ + diff --git a/src/components/VHomeGallery/VHomeGallery.vue b/src/components/VHomeGallery/VHomeGallery.vue index 6a2da00cf9..46383b8b61 100644 --- a/src/components/VHomeGallery/VHomeGallery.vue +++ b/src/components/VHomeGallery/VHomeGallery.vue @@ -57,6 +57,8 @@ import { import { useReducedMotion } from "~/composables/use-media-query" import useResizeObserver from "~/composables/use-resize-observer" +import VLink from "~/components/VLink.vue" + import imageInfo from "~/assets/homepage_images/image_info.json" export const GALLERY_SETS = [ @@ -74,6 +76,7 @@ export type GallerySet = typeof GALLERY_SETS[number] */ export default defineComponent({ name: "VHomeGallery", + components: { VLink }, props: { /** * the set of images to use for the gallery grid diff --git a/src/components/VHomepageContent.vue b/src/components/VHomepageContent.vue new file mode 100644 index 0000000000..9afed6c67a --- /dev/null +++ b/src/components/VHomepageContent.vue @@ -0,0 +1,66 @@ + + + diff --git a/src/components/VImageCarousel.vue b/src/components/VImageCarousel.vue new file mode 100644 index 0000000000..50ab1d7ee9 --- /dev/null +++ b/src/components/VImageCarousel.vue @@ -0,0 +1,96 @@ + + + diff --git a/src/components/VOldHomepageContent.vue b/src/components/VOldHomepageContent.vue new file mode 100644 index 0000000000..c794a3cd28 --- /dev/null +++ b/src/components/VOldHomepageContent.vue @@ -0,0 +1,120 @@ + + + diff --git a/src/components/VSourcesTable.vue b/src/components/VSourcesTable.vue index a4af9eaa93..c9b89f8e7d 100644 --- a/src/components/VSourcesTable.vue +++ b/src/components/VSourcesTable.vue @@ -2,7 +2,7 @@ diff --git a/src/composables/use-match-routes.ts b/src/composables/use-match-routes.ts index cbcccaf007..c2cdb79418 100644 --- a/src/composables/use-match-routes.ts +++ b/src/composables/use-match-routes.ts @@ -7,6 +7,7 @@ import { } from "@nuxtjs/composition-api" import { ALL_MEDIA, searchTypes, supportedSearchTypes } from "~/constants/media" +import usePages from "~/composables/use-pages" /** * Reactive property that returns true only on the matching routes. @@ -63,4 +64,14 @@ export const useMatchSingleResultRoutes = () => { return useMatchRoute(routes) } +/** + * Matches the content pages (about, search help, etc.) and the preferences page. + */ +export const useMatchContentPageRoutes = () => { + const routes = usePages() + .all.filter((page) => page.link.startsWith("/")) + .map((page) => page.id) + routes.push("preferences") + return useMatchRoute(routes) +} export const useMatchHomeRoute = () => useMatchRoute(["index"]) diff --git a/src/layouts/default.vue b/src/layouts/default.vue index a105a755b2..e3a5c47d75 100644 --- a/src/layouts/default.vue +++ b/src/layouts/default.vue @@ -1,45 +1,59 @@