Skip to content

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.

Create the `VFooter` component (#1814)

Dhruv Bhanushali82c202c5268b
diff --git a/src/assets/wordpress.svg b/src/assets/wordpress.svg
new file mode 100644
index 000000000..9cc751a95
--- /dev/null
+++ b/src/assets/wordpress.svg
@@ -0,0 +1,13 @@
+<svg width="113" height="23" viewBox="0 0 113 23" xmlns="http://www.w3.org/2000/svg">
+ <g id="wordpress" fill="currentColor">
+ <path d="M64.0102 8.53906H59.4435V9.0242C60.8721 9.0242 61.1017 9.33088 61.1017 11.1452V14.4163C61.1017 16.2306 60.8721 16.5631 59.4435 16.5631C58.3469 16.4097 57.6065 15.8221 56.5864 14.6972L55.4133 13.4196C56.9942 13.1387 57.8362 12.1419 57.8362 11.0176C57.8362 9.61178 56.6372 8.53906 54.3925 8.53906H49.9023V9.0242C51.3309 9.0242 51.5605 9.33088 51.5605 11.1452V14.4163C51.5605 16.2306 51.3309 16.5631 49.9023 16.5631V17.0482H54.9791V16.5631C53.5506 16.5631 53.3209 16.2306 53.3209 14.4163V13.4962H53.7544L56.5864 17.0482H64.0102C67.6584 17.0482 69.24 15.1063 69.24 12.7804C69.24 10.4545 67.6584 8.53906 64.0102 8.53906ZM53.3209 12.7037V9.3051H54.3668C55.5149 9.3051 56.0249 10.0976 56.0249 11.0176C56.0249 11.9119 55.5149 12.7037 54.3668 12.7037H53.3209ZM64.0868 16.2537H63.91C62.9915 16.2537 62.8641 16.0237 62.8641 14.8478V9.3051H64.0888C66.742 9.3051 67.227 11.2477 67.227 12.7553C67.2249 14.3145 66.7399 16.2537 64.0868 16.2537Z"/>
+ <path d="M35.6909 13.6515L37.452 8.43785C37.962 6.93021 37.7324 6.49597 36.0973 6.49597V5.98505H40.8929V6.49597C39.2863 6.49597 38.9036 6.87932 38.2655 8.74521L35.359 17.485H35.0278L32.4254 9.48614L29.7695 17.485H29.4376L26.6062 8.74521C25.9966 6.87932 25.5855 6.49597 24.1055 6.49597V5.98505H29.7695V6.49597C28.2637 6.49597 27.856 6.85354 28.3917 8.43785L30.1007 13.6515L32.6746 5.98438H33.1596L35.6909 13.6515Z"/>
+ <path d="M44.3603 17.3818C41.554 17.3818 39.2578 15.3117 39.2578 12.7815C39.2578 10.2778 41.554 8.20703 44.3603 8.20703C47.1666 8.20703 49.4628 10.2778 49.4628 12.7815C49.4628 15.3117 47.1666 17.3818 44.3603 17.3818ZM44.3603 9.0002C42.0133 9.0002 41.1971 11.1205 41.1971 12.7815C41.1971 14.469 42.0133 16.5642 44.3603 16.5642C46.731 16.5642 47.5493 14.469 47.5493 12.7815C47.5493 11.1205 46.7331 9.0002 44.3603 9.0002Z"/>
+ <path d="M75.5368 16.5385V17.0494H69.6953V16.5385C71.4043 16.5385 71.7104 16.1043 71.7104 13.5484V9.45968C71.7104 6.90443 71.4043 6.49529 69.6953 6.49529V5.98438H74.9786C77.6061 5.98438 79.0604 7.34139 79.0604 9.153C79.0604 10.9171 77.6061 12.2965 74.9786 12.2965H73.5244V13.5484C73.5244 16.1043 73.8278 16.5385 75.5368 16.5385ZM74.9759 6.90375H73.5244V11.35H74.9786C76.4072 11.35 77.0703 10.354 77.0703 9.15232C77.0676 7.92694 76.4045 6.90443 74.9759 6.90443V6.90375Z"/>
+ <path d="M96.5837 14.6449L96.4564 15.1049C96.2267 15.9483 95.9456 16.2583 94.1344 16.2583H93.7768C92.4498 16.2583 92.2189 15.9517 92.2189 14.1373V12.9588C94.2089 12.9588 94.362 13.1372 94.362 14.4664H94.847V10.658H94.362C94.362 11.9871 94.2089 12.1656 92.2189 12.1656V9.30366H93.6223C95.4336 9.30366 95.714 9.61034 95.9436 10.4571L96.0716 10.9429H96.478L96.2999 8.54102H88.8023V9.02615C90.2308 9.02615 90.4605 9.33283 90.4605 11.1472V14.4182C90.4605 16.0785 90.2654 16.4965 89.1389 16.5562C88.0687 16.392 87.3338 15.8098 86.3279 14.6991L85.1548 13.4215C86.7364 13.1406 87.5783 12.1439 87.5783 11.0196C87.5783 9.61373 86.3794 8.54102 84.134 8.54102H79.6445V9.02615C81.0724 9.02615 81.302 9.33283 81.302 11.1472V14.4182C81.302 16.2326 81.0724 16.565 79.6445 16.565V17.0502H84.7247V16.565C83.2961 16.565 83.0665 16.2326 83.0665 14.4182V13.4948H83.5L86.3313 17.0468H96.8167L96.9698 14.6449H96.5837ZM83.0631 12.7023V9.30366H84.1089C85.2564 9.30366 85.7671 10.0961 85.7671 11.0162C85.7671 11.9105 85.2564 12.7023 84.1089 12.7023H83.0631Z"/>
+ <path d="M101.766 17.3838C100.745 17.3838 99.8515 16.8471 99.4695 16.5147C99.2593 16.7631 99.1191 17.0631 99.0631 17.3838H98.5781V13.8556H99.0888C99.2921 15.5417 100.466 16.5384 101.972 16.5384C102.784 16.5384 103.451 16.0784 103.451 15.3117C103.451 14.6474 102.864 14.1365 101.819 13.6507L100.364 12.9613C99.3435 12.4748 98.5781 11.6321 98.5781 10.5072C98.5781 9.28111 99.7296 8.23349 101.309 8.23349C102.15 8.23349 102.866 8.54018 103.298 8.89775C103.426 8.7953 103.553 8.51372 103.63 8.20703H104.114V11.223H103.579C103.4 10.022 102.737 9.02531 101.385 9.02531C100.67 9.02531 100.007 9.43241 100.007 10.0729C100.007 10.7372 100.542 11.0954 101.768 11.6572L103.171 12.3473C104.395 12.9349 104.879 13.8807 104.879 14.6474C104.877 16.2568 103.475 17.3838 101.766 17.3838Z"/>
+ <path d="M109.481 17.3838C108.46 17.3838 107.567 16.8471 107.184 16.5147C106.974 16.7632 106.834 17.0632 106.778 17.3838H106.293V13.8556H106.803C107.006 15.5417 108.181 16.5384 109.686 16.5384C110.499 16.5384 111.166 16.0784 111.166 15.3117C111.166 14.6474 110.579 14.1365 109.533 13.6507L108.079 12.9613C107.058 12.4748 106.293 11.6321 106.293 10.5072C106.293 9.28111 107.444 8.23349 109.023 8.23349C109.865 8.23349 110.581 8.54018 111.013 8.89775C111.14 8.7953 111.267 8.51372 111.344 8.20703H111.829V11.223H111.293C111.114 10.022 110.451 9.02531 109.099 9.02531C108.385 9.02531 107.722 9.43241 107.722 10.0729C107.722 10.7372 108.257 11.0954 109.483 11.6572L110.885 12.3473C112.111 12.9349 112.595 13.8807 112.595 14.6474C112.593 16.2568 111.189 17.3838 109.481 17.3838Z"/>
+ <path d="M11.4818 0.690041C13.6319 0.68649 15.7336 1.3294 17.5149 2.53558C18.6638 3.31296 19.6535 4.30328 20.4309 5.45315C21.6356 7.23759 22.2794 9.34243 22.2794 11.4966C22.2794 13.6508 21.6356 15.7556 20.4309 17.5401C19.6544 18.6916 18.6645 19.6832 17.5149 20.461C15.7333 21.6671 13.6321 22.3115 11.4818 22.3115C9.33144 22.3115 7.23029 21.6671 5.44862 20.461C3.71331 19.289 2.35454 17.638 1.53691 15.7081C0.837309 14.0515 0.561826 12.2462 0.735473 10.4559C0.909119 8.66567 1.5264 6.94721 2.53127 5.45654C3.70295 3.71768 5.35339 2.35694 7.2822 1.53953C8.61073 0.976162 10.0391 0.687229 11.4818 0.690041ZM11.4818 8.00921e-08C9.21117 -0.000268296 6.99147 0.673932 5.10337 1.93735C3.21528 3.20076 1.74359 4.99664 0.874418 7.09788C0.00524523 9.19913 -0.222378 11.5114 0.220334 13.7422C0.663046 15.973 1.75621 18.0223 3.36158 19.6308C4.96696 21.2393 7.01245 22.3348 9.23938 22.7788C11.4663 23.2228 13.7747 22.9953 15.8725 22.1251C17.9704 21.255 19.7636 19.7812 21.0253 17.8902C22.287 15.9992 22.9606 13.7758 22.9608 11.5014C22.961 8.45142 21.7518 5.52631 19.5991 3.36943C17.4464 1.21255 14.5265 0.000539886 11.4818 8.00921e-08Z"/>
+ <path d="M1.91406 11.4968C1.91382 13.2965 2.41947 15.06 3.37312 16.5852C4.32678 18.1105 5.6899 19.3359 7.30645 20.1213L2.7445 7.59543C2.19635 8.82276 1.91335 10.1523 1.91406 11.4968ZM17.9395 11.0131C17.9395 9.82839 17.5148 9.00875 17.1511 8.36689C16.6661 7.57711 16.2116 6.90946 16.2116 6.11968C16.2116 5.23762 16.8781 4.41866 17.8176 4.41866C17.8603 4.41866 17.9002 4.42341 17.9415 4.42613C16.92 3.48941 15.7076 2.78607 14.3881 2.36472C13.0687 1.94338 11.6736 1.81408 10.2993 1.98577C8.92507 2.15746 7.60442 2.62603 6.42867 3.35911C5.25293 4.09219 4.25012 5.07227 3.48958 6.23163C3.71446 6.23841 3.92579 6.24316 4.10529 6.24316C5.10574 6.24316 6.65552 6.12171 6.65552 6.12171C7.17098 6.09118 7.23127 6.85043 6.71648 6.91149C6.71648 6.91149 6.19763 6.97188 5.6212 7.00241L9.1055 17.3836L11.1992 11.0938L9.70902 7.00309C9.19355 6.97256 8.70518 6.91217 8.70518 6.91217C8.18972 6.88164 8.25 6.09186 8.76614 6.12239C8.76614 6.12239 10.3457 6.24384 11.2859 6.24384C12.2863 6.24384 13.8354 6.12239 13.8354 6.12239C14.3516 6.09186 14.4119 6.8511 13.8964 6.91217C13.8964 6.91217 13.3775 6.97256 12.8018 7.00309L16.2563 17.3042L17.2432 14.1715C17.6828 12.8023 17.9395 11.832 17.9395 11.0117V11.0131ZM11.6489 12.3348L8.77834 20.6886C10.7057 21.2575 12.763 21.2041 14.6584 20.5359C14.6318 20.4928 14.6091 20.4474 14.5907 20.4002L11.6489 12.3348ZM19.8767 6.89928C19.92 7.22588 19.9415 7.55501 19.9411 7.88447C19.9411 8.85677 19.7589 9.94984 19.2129 11.317L16.2915 19.7787C18.4467 18.5228 20.0274 16.4739 20.697 14.068C21.3666 11.6622 21.0723 9.08962 19.8767 6.89792V6.89928Z"/>
+ </g>
+</svg>
diff --git a/src/components/VAudioTrack/VWaveform.vue b/src/components/VAudioTrack/VWaveform.vue
index d535b001d..9f1303675 100644
--- a/src/components/VAudioTrack/VWaveform.vue
+++ b/src/components/VAudioTrack/VWaveform.vue
@@ -148,8 +148,6 @@
import {
computed,
defineComponent,
- onBeforeUnmount,
- onMounted,
PropType,
ref,
toRef,
@@ -161,6 +159,8 @@ import { useSeekable } from '~/composables/use-seekable'
import type { AudioFeature } from '~/constants/audio'
+import useResizeObserver from '~/composables/use-resize-observer'
+
import { hash, rand as prng } from '~/utils/prng'
import { defineEvent } from '~/types/emits'
@@ -305,26 +305,7 @@ export default defineComponent({
/* Element dimensions */
const el = ref<HTMLElement | null>(null) // template ref
- const waveformDimens = ref({ width: 0, height: 0 })
- const updateWaveformDimens = () => {
- waveformDimens.value = {
- width: el.value?.clientWidth || 0,
- height: el.value?.clientHeight || 0,
- }
- }
- let observer: ResizeObserver | undefined
- onMounted(() => {
- if (window.ResizeObserver && el.value) {
- observer = new ResizeObserver(updateWaveformDimens)
- observer.observe(el.value)
- }
- updateWaveformDimens()
- })
- onBeforeUnmount(() => {
- if (observer) {
- observer.disconnect()
- }
- })
+ const { dimens: waveformDimens } = useResizeObserver(el)
/* Features */
diff --git a/src/components/VBrand/VBrand.vue b/src/components/VBrand/VBrand.vue
new file mode 100644
index 000000000..dd9c3b7aa
--- /dev/null
+++ b/src/components/VBrand/VBrand.vue
@@ -0,0 +1,41 @@
+<template>
+ <!-- Using `flex` to center the group of SVGs inside the bounding box. -->
+ <div class="flex flex-row items-center">
+ <!-- Using `flex` to place two SVGs side by side. -->
+ <span class="inline-flex h-[1em] flex-row gap-[0.4em]" aria-hidden="true">
+ <OpenverseLogo class="h-full w-auto" />
+ <OpenverseBrand class="h-full w-auto" />
+ </span>
+ <span v-if="srText" class="sr-only">{{ srText }}</span>
+ </div>
+</template>
+
+<script lang="ts">
+import { defineComponent } from '@nuxtjs/composition-api'
+
+import OpenverseLogo from '~/assets/logo.svg?inline'
+import OpenverseBrand from '~/assets/brand.svg?inline'
+
+/**
+ * Render the openverse logo and wordmark next to each other, while being
+ * accessible to screen-readers.
+ */
+export default defineComponent({
+ name: 'VBrand',
+ components: {
+ OpenverseLogo,
+ OpenverseBrand,
+ },
+ props: {
+ /**
+ * the screen-reader text to put inside the component; Can be set to a blank
+ * string to not read anything at all.
+ */
+ srText: {
+ type: String,
+ required: false,
+ default: 'Openverse',
+ },
+ },
+})
+</script>
diff --git a/src/components/VBrand/meta/VBrand.stories.mdx b/src/components/VBrand/meta/VBrand.stories.mdx
new file mode 100644
index 000000000..0d499ea76
--- /dev/null
+++ b/src/components/VBrand/meta/VBrand.stories.mdx
@@ -0,0 +1,38 @@
+import { Description, Canvas, Meta, Story } from '@storybook/addon-docs'
+
+import VBrand from '~/components/VBrand/VBrand.vue'
+
+<Meta title="Components/VBrand" component={VBrand} />
+
+export const Template = (args) => ({
+ template: `<VBrand v-bind="args"/>`,
+ components: { VBrand },
+ setup() {
+ return { args }
+ },
+})
+
+# VBrand
+
+<Description of={VBrand} />
+
+<Canvas>
+ <Story name="Default">{Template.bind({})}</Story>
+</Canvas>
+
+## Resizing
+
+The component always renders at a height of `1em`. This means that it will take
+up the text-size as specified by its parent. This can be achieved using `text-*`
+utilities, including JIT values like `text-[18px]`.
+
+<Canvas>
+ <Story
+ name="Resized"
+ args={{
+ class: 'text-6xl',
+ }}
+ >
+ {Template.bind({})}
+ </Story>
+</Canvas>
diff --git a/src/components/VFooter/VFooter.vue b/src/components/VFooter/VFooter.vue
new file mode 100644
index 000000000..5eac5c8c4
--- /dev/null
+++ b/src/components/VFooter/VFooter.vue
@@ -0,0 +1,159 @@
+<template>
+ <footer
+ ref="footerEl"
+ class="footer flex flex-col gap-10 px-6 py-10"
+ :class="variantNames"
+ >
+ <!-- Logo and links -->
+ <div v-if="isContentMode" class="logo-and-links flex flex-col gap-10">
+ <VLink href="/" class="text-dark-charcoal">
+ <VBrand class="text-[18px]" />
+ </VLink>
+ <nav>
+ <ul class="nav-list grid grid-cols-2 gap-6 text-sm">
+ <li v-for="page in allPages" :key="page.id">
+ <VLink
+ class="text-dark-charcoal"
+ :href="page.link"
+ show-external-icon
+ >{{ $t(`navigation.${page.id}`) }}</VLink
+ >
+ </li>
+ </ul>
+ </nav>
+ </div>
+
+ <!-- Locale chooser and WordPress affiliation graphic -->
+ <div class="locale-and-wp flex flex-col justify-between gap-10">
+ <div
+ class="language flex h-10 w-full w-full items-center justify-center rounded-sm border border-dark-charcoal-20 bg-white"
+ >
+ {{ $t('footer.wip') }}
+ </div>
+ <VLink
+ href="https://wordpress.org"
+ class="text-dark-charcoal hover:no-underline"
+ >
+ <i18n
+ tag="div"
+ path="footer.wordpress-affiliation"
+ class="flex h-full flex-row items-center gap-2 text-sm"
+ >
+ <template #wordpress>
+ <WordPress class="aria-hidden" />
+ <span class="sr-only">WordPress</span>
+ </template>
+ </i18n>
+ </VLink>
+ </div>
+ </footer>
+</template>
+
+<script lang="ts">
+import {
+ computed,
+ defineComponent,
+ PropType,
+ ref,
+} from '@nuxtjs/composition-api'
+
+import usePages from '~/composables/use-pages'
+
+import useResizeObserver from '~/composables/use-resize-observer'
+
+import { SCREEN_SIZES } from '~/constants/screens'
+
+import VLink from '~/components/VLink.vue'
+import VBrand from '~/components/VBrand/VBrand.vue'
+
+import WordPress from '~/assets/wordpress.svg?inline'
+
+/**
+ * The footer is the section displayed at the bottom of a page. It can contain
+ * some branding, links to other pages and an option to change the language.
+ */
+export default defineComponent({
+ name: 'VFooter',
+ components: {
+ VLink,
+ VBrand,
+ WordPress,
+ },
+ props: {
+ /**
+ * whether the footer is being rendered on a content page or an internal
+ * page; This determines whether the Openverse logo and other links are
+ * displayed.
+ */
+ mode: {
+ type: String as PropType<'internal' | 'content'>,
+ required: false,
+ default: undefined,
+ },
+ },
+ setup(props) {
+ const { all: allPages, current: currentPage } = usePages(true)
+
+ const isContentMode = computed(() => {
+ if (props.mode) {
+ return props.mode === 'content'
+ } else {
+ return ['search', 'audio', 'image'].some((prefix) =>
+ currentPage.value?.startsWith(prefix)
+ )
+ }
+ })
+
+ /** JS-based responsiveness */
+ const footerEl = ref<HTMLElement | null>(null)
+ const { dimens: footerDimens } = useResizeObserver(footerEl)
+ const variantNames = computed(() =>
+ Array.from(SCREEN_SIZES)
+ .filter(([, val]) => footerDimens.value.width >= val)
+ .map(([key]) => `footer-${key}`)
+ )
+
+ return {
+ isContentMode,
+ allPages,
+
+ footerEl,
+ variantNames,
+ }
+ },
+})
+</script>
+
+<style>
+.footer.footer-sm .nav-list {
+ @apply flex flex-row gap-8;
+}
+
+.footer.footer-sm .locale-and-wp {
+ @apply flex-row;
+}
+
+.footer.footer-sm .language {
+ @apply w-50;
+}
+
+.footer.footer-md .logo-and-links {
+ @apply flex-row items-center justify-between;
+}
+
+.footer.footer-lg {
+ @apply px-10;
+}
+
+.footer.footer-xl {
+ @apply flex-row gap-8;
+}
+
+.footer.footer-xl .logo-and-links {
+ @apply flex-grow;
+}
+
+.footer.footer-xl .locale-and-wp {
+ @apply flex-grow;
+}
+</style>
diff --git a/src/components/VFooter/meta/VFooter.stories.mdx b/src/components/VFooter/meta/VFooter.stories.mdx
new file mode 100644
index 000000000..5301c7870
--- /dev/null
+++ b/src/components/VFooter/meta/VFooter.stories.mdx
@@ -0,0 +1,57 @@
+import {
+ ArgsTable,
+ Canvas,
+ Description,
+ Meta,
+ Story,
+} from '@storybook/addon-docs'
+
+import VFooter from '~/components/VFooter/VFooter.vue'
+
+<Meta title="Components/VFooter" component={VFooter} />
+
+export const Template = (args) => ({
+ template: '<VFooter v-bind="args" />',
+ components: { VFooter },
+ setup() {
+ return { args }
+ },
+})
+
+# VFooter
+
+<Description of={VFooter} />
+
+<ArgsTable of={VFooter} />
+
+## Content footer
+
+This version of the footer is to be used in results and single content details.
+It contains links to internal pages.
+
+<Canvas>
+ <Story
+ name="Content"
+ height="200px"
+ parameters={{ layout: 'fullscreen' }}
+ args={{ mode: 'content' }}
+ >
+ {Template.bind({})}
+ </Story>
+</Canvas>
+
+## Internal footer
+
+This version of the footer is to be used in content pages when the links to
+internal pages move to the header instead.
+
+<Canvas>
+ <Story
+ name="Internal"
+ height="200px"
+ parameters={{ layout: 'fullscreen' }}
+ args={{ mode: 'internal' }}
+ >
+ {Template.bind({})}
+ </Story>
+</Canvas>
diff --git a/src/components/VFourOhFour.vue b/src/components/VFourOhFour.vue
index d67dfe059..e9881ae23 100644
--- a/src/components/VFourOhFour.vue
+++ b/src/components/VFourOhFour.vue
@@ -1,48 +1,53 @@
<template>
- <main class="page-404 relative h-screen overflow-x-hidden bg-yellow">
- <VLink href="/" class="relative z-10 text-dark-charcoal">
- <span class="sr-only">Openverse</span>
- <span
- class="flex h-auto w-30 flex-row pt-6 text-dark-charcoal ms-6 lg:pt-8 lg:ms-10"
- aria-hidden="true"
- >
- <OpenverseLogo />
- <OpenverseBrand class="ms-1" />
- </span>
- </VLink>
+ <div
+ class="error relative flex min-h-screen flex-col overflow-x-hidden bg-yellow"
+ >
<Oops
aria-hidden="true"
- class="pointer-events-none absolute z-0 -mt-[10%] -ml-[20%] w-[140%] fill-dark-charcoal px-6 opacity-5 lg:mx-auto lg:w-full lg:px-16"
+ class="pointer-events-none absolute top-20 z-0 -mt-[10%] -ml-[20%] w-[140%] fill-dark-charcoal px-6 opacity-5 lg:mx-auto lg:w-full lg:px-16"
/>
- <header
- class="absolute top-1/4 left-0 right-0 z-10 mx-auto space-y-4 px-6 lg:max-w-2xl lg:space-y-6 lg:px-0"
+
+ <div>
+ <VLink href="/" class="relative z-10 text-dark-charcoal">
+ <VBrand class="m-6 text-[18px] lg:mx-10 lg:my-8" />
+ </VLink>
+ </div>
+
+ <main
+ class="page-404 flex w-full flex-shrink-0 flex-grow flex-col overflow-x-hidden px-6 lg:mx-auto lg:max-w-2xl lg:px-0"
>
- <h1 class="mb-6 text-3xl lg:mb-10 lg:text-6xl lg:leading-tight">
- {{ $t('404.title') }}
- </h1>
- <p class="font-semibold">
- <i18n path="404.main">
- <template #link>
- <VLink
- class="text-current underline hover:text-current active:text-current"
- href="/"
- >Openverse</VLink
- >
- </template>
- </i18n>
- </p>
- <VSearchBar
- :value="searchTerm"
- :label-text="$t('404.search-placeholder')"
- field-id="404-search"
- :placeholder="$t('404.search-placeholder').toString()"
- :is404="true"
- size="standalone"
- @input="setSearchTerm"
- @submit="handleSearch"
- />
- </header>
- </main>
+ <!-- Push content by 1/4th height without absolute positioning. -->
+ <div class="spacer grow" />
+ <div class="z-10 grow-[3] space-y-4 lg:space-y-6">
+ <h1 class="mb-6 text-3xl lg:mb-10 lg:text-6xl lg:leading-tight">
+ {{ $t('404.title') }}
+ </h1>
+ <p class="font-semibold">
+ <i18n path="404.main">
+ <template #link>
+ <VLink
+ class="text-current underline hover:text-current active:text-current"
+ href="/"
+ >Openverse</VLink
+ >
+ </template>
+ </i18n>
+ </p>
+ <VSearchBar
+ :value="searchTerm"
+ :label-text="$t('404.search-placeholder')"
+ field-id="404-search"
+ :placeholder="$t('404.search-placeholder').toString()"
+ :is404="true"
+ size="standalone"
+ @input="setSearchTerm"
+ @submit="handleSearch"
+ />
+ </div>
+ </main>
+
+ <VFooter v-if="isNewHeaderEnabled" mode="internal" />
+ </div>
</template>
<script>
@@ -56,21 +61,23 @@ import {
import { useMediaStore } from '~/stores/media'
import { useSearchStore } from '~/stores/search'
+import { useFeatureFlagStore } from '~/stores/feature-flag'
+
import VSearchBar from '~/components/VHeaderOld/VSearchBar/VSearchBar.vue'
import VLink from '~/components/VLink.vue'
+import VBrand from '~/components/VBrand/VBrand.vue'
+import VFooter from '~/components/VFooter/VFooter.vue'
import Oops from '~/assets/oops.svg?inline'
-import OpenverseLogo from '~/assets/logo.svg?inline'
-import OpenverseBrand from '~/assets/brand.svg?inline'
export default defineComponent({
name: 'VFourOhFour',
components: {
- OpenverseLogo,
- OpenverseBrand,
Oops,
VLink,
VSearchBar,
+ VBrand,
+ VFooter,
},
props: ['error'],
setup() {
@@ -98,10 +105,14 @@ export default defineComponent({
)
}
+ const featureFlagStore = useFeatureFlagStore()
+ const isNewHeaderEnabled = featureFlagStore.isOn('new_header')
+
return {
searchTerm,
setSearchTerm,
handleSearch,
+ isNewHeaderEnabled,
}
},
head: {
diff --git a/src/components/VLink.vue b/src/components/VLink.vue
index c4ae68132..0cc53c80a 100644
--- a/src/components/VLink.vue
+++ b/src/components/VLink.vue
@@ -1,7 +1,18 @@
<template>
- <Component :is="linkComponent" v-bind="linkProperties" v-on="$listeners"
- ><slot
- /></Component>
+ <Component
+ :is="linkComponent"
+ v-bind="linkProperties"
+ :class="{ 'inline-flex flex-row items-center gap-2': showExternalIcon }"
+ v-on="$listeners"
+ >
+ <slot /><VIcon
+ v-if="showExternalIcon && !isInternal"
+ :icon-path="externalLinkIcon"
+ class="inline-block"
+ :size="4"
+ rtl-flip
+ />
+ </Component>
</template>
<script lang="ts">
@@ -16,6 +27,10 @@
*/
import { computed, defineComponent, useContext } from '@nuxtjs/composition-api'
+import VIcon from '~/components/VIcon/VIcon.vue'
+
+import externalLinkIcon from '~/assets/icons/external-link.svg'
+
const defaultProps = Object.freeze({
target: '_blank',
rel: 'noopener noreferrer',
@@ -23,6 +38,7 @@ const defaultProps = Object.freeze({
export default defineComponent({
name: 'VLink',
+ components: { VIcon },
props: {
href: {
type: String,
@@ -30,10 +46,20 @@ export default defineComponent({
validator: (v: string | undefined) =>
(typeof v === 'string' && v.length > 0) || typeof v === 'undefined',
},
+ /**
+ * whether to render the external link icon next to links that point away
+ * from Openverse
+ */
+ showExternalIcon: {
+ type: Boolean,
+ default: false,
+ },
},
setup(props) {
const { app } = useContext()
- function checkHref(p: typeof props): p is { href: string } {
+ function checkHref(
+ p: typeof props
+ ): p is { href: string; showExternalIcon: boolean } {
return typeof p.href === 'string' && !['', '#'].includes(p.href)
}
@@ -53,7 +79,7 @@ export default defineComponent({
: null
)
- return { linkProperties, linkComponent }
+ return { linkProperties, linkComponent, isInternal, externalLinkIcon }
},
})
</script>
diff --git a/src/components/VMediaInfo/VMediaReuse.vue b/src/components/VMediaInfo/VMediaReuse.vue
index f66ea0267..76fdbb84e 100644
--- a/src/components/VMediaInfo/VMediaReuse.vue
+++ b/src/components/VMediaInfo/VMediaReuse.vue
@@ -3,7 +3,7 @@
:aria-label="$t('media-details.reuse.title').toString()"
class="media-reuse"
>
- <h2 class="mb-4 heading-6 md:heading-5">
+ <h2 class="heading-6 md:heading-5 mb-4">
{{ $t('media-details.reuse.title') }}
</h2>
<p class="text-base font-normal leading-[130%]">
diff --git a/src/components/VMetaSearch/VMetaSearchForm.vue b/src/components/VMetaSearch/VMetaSearchForm.vue
index 59b24f420..19fd19b19 100644
--- a/src/components/VMetaSearch/VMetaSearchForm.vue
+++ b/src/components/VMetaSearch/VMetaSearchForm.vue
@@ -2,7 +2,7 @@
<section
:key="type"
ref="sectionRef"
- class="meta-search mb-16 flex flex-row place-items-center justify-center p-4"
+ class="meta-search flex flex-row place-items-center justify-center p-4"
data-testid="meta-search-form"
@keydown.tab.exact="handleTab"
>
diff --git a/src/components/VScrollButton.vue b/src/components/VScrollButton.vue
index 41dd551e8..f8c389aab 100644
--- a/src/components/VScrollButton.vue
+++ b/src/components/VScrollButton.vue
@@ -2,7 +2,7 @@
<button
:aria-label="$t('browse-page.aria.scroll')"
type="button"
- class="scroll fixed bottom-4 h-14 w-14 rounded-full bg-pink text-center text-white transition-all duration-100 ease-linear hover:bg-dark-pink hover:shadow-md"
+ class="scroll sticky bottom-4 mb-4 h-14 w-14 rounded-full bg-pink text-center text-white transition-all duration-100 ease-linear ms-auto hover:bg-dark-pink hover:shadow-md"
:class="hClass"
@click="scrollToTop"
@keydown.tab.exact="$emit('tab', $event)"
diff --git a/src/composables/use-pages.ts b/src/composables/use-pages.ts
index 7cd72b159..70417fb83 100644
--- a/src/composables/use-pages.ts
+++ b/src/composables/use-pages.ts
@@ -1,50 +1,77 @@
import { computed, useContext, useRoute } from '@nuxtjs/composition-api'
-export default function usePages() {
+export default function usePages(isNew = false) {
const { app } = useContext()
- const pages = [
- {
- id: 'about',
- name: 'header.about-nav-item',
- link: app.localePath('/about'),
- },
- {
- id: 'sources',
- name: 'header.source-nav-item',
- link: app.localePath('/sources'),
- },
- {
- id: 'licenses',
- name: 'header.licenses-nav-item',
- link: 'https://creativecommons.org/about/cclicenses/',
- },
- {
- id: 'search-help',
- name: 'header.search-guide-nav-item',
- link: app.localePath('/search-help'),
- },
- {
- id: 'meta-search',
- name: 'header.meta-search-nav-item',
- link: app.localePath('/meta-search'),
- },
- {
- id: 'feedback',
- name: 'header.feedback-nav-item',
- link: app.localePath('/feedback'),
- },
- {
- id: 'api',
- name: 'header.api-nav-item',
- link: 'https://api.openverse.engineering/v1/',
- },
- {
- id: 'privacy',
- name: 'header.privacy-nav-item',
- link: 'https://wordpress.org/privacy',
- },
- ]
+ const pages = isNew
+ ? [
+ {
+ id: 'about',
+ link: app.localePath('/about'),
+ },
+ {
+ id: 'licenses',
+ link: 'https://creativecommons.org/about/cclicenses/',
+ },
+ {
+ id: 'get-involved',
+ link: 'https://github.com/WordPress/openverse/',
+ },
+ {
+ id: 'api',
+ link: 'https://api.openverse.engineering/v1/',
+ },
+ {
+ id: 'privacy',
+ link: 'https://wordpress.org/privacy',
+ },
+ {
+ id: 'feedback',
+ link: app.localePath('/feedback'),
+ },
+ ]
+ : [
+ {
+ id: 'about',
+ name: 'header.about-nav-item',
+ link: app.localePath('/about'),
+ },
+ {
+ id: 'sources',
+ name: 'header.source-nav-item',
+ link: app.localePath('/sources'),
+ },
+ {
+ id: 'licenses',
+ name: 'header.licenses-nav-item',
+ link: 'https://creativecommons.org/about/cclicenses/',
+ },
+ {
+ id: 'search-help',
+ name: 'header.search-guide-nav-item',
+ link: app.localePath('/search-help'),
+ },
+ {
+ id: 'meta-search',
+ name: 'header.meta-search-nav-item',
+ link: app.localePath('/meta-search'),
+ },
+ {
+ id: 'feedback',
+ name: 'header.feedback-nav-item',
+ link: app.localePath('/feedback'),
+ },
+ {
+ id: 'api',
+ name: 'header.api-nav-item',
+ link: 'https://api.openverse.engineering/v1/',
+ },
+ {
+ id: 'privacy',
+ name: 'header.privacy-nav-item',
+ link: 'https://wordpress.org/privacy',
+ },
+ ]
const route = useRoute()
const currentPageId = computed(() => route.value.name)
diff --git a/src/composables/use-resize-observer.ts b/src/composables/use-resize-observer.ts
new file mode 100644
index 000000000..36409ba6d
--- /dev/null
+++ b/src/composables/use-resize-observer.ts
@@ -0,0 +1,35 @@
+import { ref, onMounted, onBeforeUnmount } from '@nuxtjs/composition-api'
+
+import type { Ref } from '@nuxtjs/composition-api'
+
+/**
+ * Configure a `ResizeObserver` to observe the given `HTMLElement` and update
+ * the dimensions whenever it is resized.
+ *
+ * @param elem - the ref pointing to the `HTMLElement` to observe
+ */
+export default function useResizeObserver(elem: Ref<HTMLElement | null>) {
+ const dimens = ref({ width: 0, height: 0 })
+ const updateDimens = () => {
+ dimens.value = {
+ width: elem.value?.clientWidth || 0,
+ height: elem.value?.clientHeight || 0,
+ }
+ }
+
+ let observer: ResizeObserver | undefined
+ onMounted(() => {
+ if (window.ResizeObserver && elem.value) {
+ observer = new ResizeObserver(updateDimens)
+ observer.observe(elem.value)
+ }
+ updateDimens()
+ })
+ onBeforeUnmount(() => {
+ if (observer) {
+ observer.disconnect()
+ }
+ })
+
+ return { dimens }
+}
diff --git a/src/layouts/default.vue b/src/layouts/default.vue
index 6b191d2cf..7ddbe379f 100644
--- a/src/layouts/default.vue
+++ b/src/layouts/default.vue
@@ -1,5 +1,5 @@
<template>
- <div class="app relative grid">
+ <div class="app flex min-h-screen flex-col">
<div class="sticky top-0 z-40 block">
<VTeleportTarget name="skip-to-content" :force-destroy="true" />
<VMigrationNotice />
@@ -7,19 +7,26 @@
<VHeader v-if="isNewHeaderEnabled" />
<VHeaderOld v-else />
</div>
+
<main
- class="main embedded w-screen md:w-full"
+ class="main embedded w-screen flex-shrink-0 flex-grow md:w-full"
:class="[
{ 'has-sidebar': isSidebarVisible },
isNewHeaderEnabled ? 'new-layout' : 'old-layout',
]"
>
- <Nuxt class="main-page min-w-0" />
+ <div v-if="isNewHeaderEnabled">
+ <Nuxt class="main-page min-w-0" />
+ <VFooter class="border-t border-dark-charcoal-20" />
+ </div>
+ <Nuxt v-else class="main-page min-w-0" />
+
<VSidebarTarget
class="sidebar fixed overflow-y-auto bg-dark-charcoal-06 end-0"
:class="{ 'border-dark-charcoal-20 border-s': isSidebarVisible }"
/>
</main>
+
<VModalTarget class="modal" />
<VGlobalAudioSection />
</div>
@@ -42,6 +49,7 @@ import VHeaderOld from '~/components/VHeaderOld/VHeaderOld.vue'
import VModalTarget from '~/components/VModal/VModalTarget.vue'
import VSidebarTarget from '~/components/VModal/VSidebarTarget.vue'
import VGlobalAudioSection from '~/components/VGlobalAudioSection/VGlobalAudioSection.vue'
+import VFooter from '~/components/VFooter/VFooter.vue'
const embeddedPage = {
name: 'embedded',
@@ -50,6 +58,7 @@ const embeddedPage = {
VTranslationStatusBanner,
VHeaderOld,
VHeader: () => import('~/components/VHeader/VHeader.vue'),
+ VFooter,
VModalTarget,
VTeleportTarget,
VSidebarTarget,
@@ -71,8 +80,8 @@ const embeddedPage = {
const isSidebarVisible = computed(() => {
return isNewHeaderEnabled
- ? isSearchRoute.value && isMinScreenMd.value && isFilterVisible.value
- : isSearchRoute.value && isMinScreenLg.value && isFilterVisible.value
+ ? isSearchRoute.value && isMinScreenLg.value && isFilterVisible.value
+ : isSearchRoute.value && isMinScreenMd.value && isFilterVisible.value
})
const isHeaderScrolled = ref(false)
@@ -118,16 +127,11 @@ export default embeddedPage
width: var(--filter-sidebar-width);
}
-.app {
- grid-template-rows: auto 1fr;
-}
/* TODO: remove these styles when new header is enabled */
@screen md {
/** Display the search filter sidebar and results as independently-scrolling. **/
.main.old-layout {
- height: 100%;
- display: grid;
- grid-template-columns: 1fr var(--filter-sidebar-width);
+ @apply grid h-full grid-cols-[1fr_var(--filter-sidebar-width)];
}
/** Make the main content area span both grid columns when the sidebar is closed... **/
.main.old-layout > *:first-child {
@@ -142,9 +146,7 @@ export default embeddedPage
@screen lg {
/** Display the search filter sidebar and results as independently-scrolling. **/
.main.new-layout {
- height: 100%;
- display: grid;
- grid-template-columns: 1fr var(--filter-sidebar-width);
+ @apply grid h-full grid-cols-[1fr_var(--filter-sidebar-width)];
}
/** Make the main content area span both grid columns when the sidebar is closed... **/
.main.new-layout > *:first-child {
diff --git a/src/locales/en.json b/src/locales/en.json
index a26832d68..2c48cba75 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -59,6 +59,14 @@
"with-count": "{count} Filter|{count} Filters"
}
},
+ "navigation": {
+ "about": "About",
+ "licenses": "Licenses",
+ "get-involved": "Get involved",
+ "api": "API",
+ "privacy": "Privacy",
+ "feedback": "Feedback"
+ },
"about": {
"title": "About {openverse}",
"description": {
@@ -669,5 +677,9 @@
"nonexistent": "Nonexistent",
"on": "On",
"off": "Off"
+ },
+ "footer": {
+ "wordpress-affiliation": "Powered by {wordpress}",
+ "wip": "\uD83D\uDEA7"
}
}
diff --git a/src/pages/index.vue b/src/pages/index.vue
index ba1df1a70..97c558bc2 100644
--- a/src/pages/index.vue
+++ b/src/pages/index.vue
@@ -13,18 +13,10 @@
/>
<div class="z-10 mx-auto w-full px-6 lg:w-auto lg:pe-0 lg:ps-24">
- <VLink href="/" class="hidden lg:block">
- <h1>
- <span class="sr-only">Openverse</span>
- <!-- width and height chosen w.r.t. viewBox "0 0 280 42" -->
- <span
- aria-hidden="true"
- class="flex flex-row items-center text-dark-charcoal"
- >
- <OpenverseLogo class="me-5 xl:me-5" height="46" width="50" />
- <OpenverseBrand height="46" width="234" />
- </span>
- </h1>
+ <VLink href="/" class="hidden text-dark-charcoal lg:block">
+ <!-- eslint-disable vuejs-accessibility/heading-has-content -->
+ <h1><VBrand class="text-[46px]" /></h1>
+ <!-- eslint-enable vuejs-accessibility/heading-has-content -->
</VLink>
<h2
class="mt-auto mb-2 max-w-[80%] text-[27px] font-normal leading-[35px] md:mt-16 md:mb-4 md:text-[46px] md:leading-[60px]"
@@ -153,16 +145,14 @@ import VLogoButtonOld from '~/components/VHeaderOld/VLogoButtonOld.vue'
import VSearchBar from '~/components/VHeaderOld/VSearchBar/VSearchBar.vue'
import VSearchTypeRadio from '~/components/VContentSwitcherOld/VSearchTypeRadio.vue'
import VSearchTypePopover from '~/components/VContentSwitcherOld/VSearchTypePopover.vue'
+import VBrand from '~/components/VBrand/VBrand.vue'
import imageInfo from '~/assets/homepage_images/image_info.json'
-import OpenverseLogo from '~/assets/logo.svg?inline'
-import OpenverseBrand from '~/assets/brand.svg?inline'
export default defineComponent({
name: 'HomePage',
components: {
- OpenverseLogo,
- OpenverseBrand,
+ VBrand,
VSearchTypePopover,
VSearchTypeRadio,
VSearchBar,
diff --git a/tailwind.config.js b/tailwind.config.js
index d3dadb8f5..c32fdd786 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -89,6 +89,7 @@ module.exports = {
24: '6.00rem',
30: '7.50rem',
40: '10.00rem',
+ 50: '12.50rem',
64: '16.00rem',
70: '17.50rem',
80: '20.00rem',
diff --git a/test/playwright/visual-regression/components/external-sources-section.spec.ts-snapshots/external-image-sources-popover-rtl-linux.png b/test/playwright/visual-regression/components/external-sources-section.spec.ts-snapshots/external-image-sources-popover-rtl-linux.png
index 4c7618d9c..29b5611e6 100644
Binary files a/test/playwright/visual-regression/components/external-sources-section.spec.ts-snapshots/external-image-sources-popover-rtl-linux.png and b/test/playwright/visual-regression/components/external-sources-section.spec.ts-snapshots/external-image-sources-popover-rtl-linux.png differ
diff --git a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-ltr-2xl-linux.png b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-ltr-2xl-linux.png
index 36e2170d1..28750eeaf 100644
Binary files a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-ltr-2xl-linux.png and b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-ltr-2xl-linux.png differ
diff --git a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-ltr-lg-linux.png b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-ltr-lg-linux.png
index a3c62f63f..ccf29f838 100644
Binary files a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-ltr-lg-linux.png and b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-ltr-lg-linux.png differ
diff --git a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-ltr-xl-linux.png b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-ltr-xl-linux.png
index 8b5e72112..6ba9b1660 100644
Binary files a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-ltr-xl-linux.png and b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-ltr-xl-linux.png differ
diff --git a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-rtl-2xl-linux.png b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-rtl-2xl-linux.png
index 094c9240c..73d81cb64 100644
Binary files a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-rtl-2xl-linux.png and b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-rtl-2xl-linux.png differ
diff --git a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-rtl-lg-linux.png b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-rtl-lg-linux.png
index 2ab592fdc..d5e1b02e1 100644
Binary files a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-rtl-lg-linux.png and b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-rtl-lg-linux.png differ
diff --git a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-rtl-xl-linux.png b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-rtl-xl-linux.png
index 2753c10f6..afa0978fd 100644
Binary files a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-rtl-xl-linux.png and b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-rtl-xl-linux.png differ
diff --git a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/unfocused-search-rtl-2xl-linux.png b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/unfocused-search-rtl-2xl-linux.png
index 91b9cd2c0..5f45c44f2 100644
Binary files a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/unfocused-search-rtl-2xl-linux.png and b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/unfocused-search-rtl-2xl-linux.png differ
diff --git a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/non-existent-ltr-md-linux.png b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/non-existent-ltr-md-linux.png
index ef9c584c7..043926d7a 100644
Binary files a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/non-existent-ltr-md-linux.png and b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/non-existent-ltr-md-linux.png differ
diff --git a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/non-existent-ltr-sm-linux.png b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/non-existent-ltr-sm-linux.png
index d6654640e..5f429318d 100644
Binary files a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/non-existent-ltr-sm-linux.png and b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/non-existent-ltr-sm-linux.png differ
diff --git a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/non-existent-ltr-xs-linux.png b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/non-existent-ltr-xs-linux.png
index eb9d17445..621504605 100644
Binary files a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/non-existent-ltr-xs-linux.png and b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/non-existent-ltr-xs-linux.png differ
diff --git a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/non-existent-rtl-2xl-linux.png b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/non-existent-rtl-2xl-linux.png
index e466abb6b..009f6c372 100644
Binary files a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/non-existent-rtl-2xl-linux.png and b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/non-existent-rtl-2xl-linux.png differ
diff --git a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/non-existent-rtl-lg-linux.png b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/non-existent-rtl-lg-linux.png
index 130273fe9..dea7cdeea 100644
Binary files a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/non-existent-rtl-lg-linux.png and b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/non-existent-rtl-lg-linux.png differ
diff --git a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/non-existent-rtl-md-linux.png b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/non-existent-rtl-md-linux.png
index 35c8ac4cd..f2d8df9dc 100644
Binary files a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/non-existent-rtl-md-linux.png and b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/non-existent-rtl-md-linux.png differ
diff --git a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/non-existent-rtl-sm-linux.png b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/non-existent-rtl-sm-linux.png
index fd6a99bf9..752c8e17a 100644
Binary files a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/non-existent-rtl-sm-linux.png and b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/non-existent-rtl-sm-linux.png differ
diff --git a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/non-existent-rtl-xl-linux.png b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/non-existent-rtl-xl-linux.png
index 0e37fc190..34134a844 100644
Binary files a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/non-existent-rtl-xl-linux.png and b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/non-existent-rtl-xl-linux.png differ
diff --git a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/non-existent-rtl-xs-linux.png b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/non-existent-rtl-xs-linux.png
index 0dfd21906..48eeb6fef 100644
Binary files a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/non-existent-rtl-xs-linux.png and b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/non-existent-rtl-xs-linux.png differ