Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
Adjust styles of `VContentLink` (#785)
Krystle Salazar8214217f8409
diff --git a/src/components/VAllResultsGrid/VAllResultsGrid.vue b/src/components/VAllResultsGrid/VAllResultsGrid.vueindex dee5eb9c6..2b3748593 100644--- a/src/components/VAllResultsGrid/VAllResultsGrid.vue+++ b/src/components/VAllResultsGrid/VAllResultsGrid.vue@@ -4,14 +4,14 @@v-if="!noResults"class="results-grid grid grid-cols-2 lg:grid-cols-5 2xl:grid-cols-6 gap-4 mb-4">- <NuxtLink+ <VContentLinkv-for="[key, item] in results":key="key"+ :media-type="key"+ :results-count="item.count":to="localePath({ path: `/search/${key}`, query: $route.query })"- class="lg:col-span-2 focus:bg-white focus:border-tx focus:ring focus:ring-pink focus:outline-none focus:shadow-ring focus:text-black rounded-sm"- >- <VContentLink :results-count="item.count" :media-type="key" />- </NuxtLink>+ class="lg:col-span-2"+ /></div><GridSkeletonv-if="resultsLoading && allMedia.length === 0"diff --git a/src/components/VContentLink/VContentLink.vue b/src/components/VContentLink/VContentLink.vueindex d0989d22e..6cca93859 100644--- a/src/components/VContentLink/VContentLink.vue+++ b/src/components/VContentLink/VContentLink.vue@@ -1,18 +1,19 @@<template>- <div- class="text-dark-charcoal bg-white border border-dark-charcoal/20 rounded-sm flex flex-col hover:bg-dark-charcoal hover:text-white overflow-hidden items-start py-4 ps-4 pe-12 w-full lg:flex-row lg:justify-between lg:items-center lg:p-6 focus:bg-white focus:border-tx focus:ring focus:ring-pink focus:outline-none focus:shadow-ring focus:text-black"+ <NuxtLink+ :to="to"+ class="text-dark-charcoal bg-white border border-dark-charcoal/20 rounded-sm flex flex-col md:flex-row md:justify-between items-start md:items-center hover:bg-dark-charcoal hover:text-white hover:no-underline focus:border-tx overflow-hidden py-4 ps-4 pe-12 w-full md:p-6">- <div class="flex flex-col items-start lg:flex-row lg:items-center">+ <div class="flex flex-col items-start md:flex-row md:items-center"><VIcon :icon-path="iconPath" />- <p class="hidden lg:block font-semibold pt-1 lg:ps-2 lg:text-2xl">+ <p class="hidden md:block font-semibold pt-1 md:pt-0 md:ps-2 md:text-2xl">{{ $t(`search-type.see-${mediaType}`) }}</p>- <p class="block lg:hidden font-semibold pt-1 lg:ps-2 lg:text-2xl">+ <p class="block md:hidden font-semibold pt-1 md:pt-0 md:ps-2 md:text-2xl">{{ $t(`search-type.${mediaType}`) }}</p></div>- <span class="text-sr lg:text-base">{{ resultsCountLabel }}</span>- </div>+ <span class="text-sr">{{ resultsCountLabel }}</span>+ </NuxtLink></template><script>@@ -48,6 +49,12 @@ export default defineComponent({type: Number,required: true,},+ /**+ * The route target of the link.+ */+ to: {+ type: String,+ },},setup(props) {const iconPath = computed(() => iconMapping[props.mediaType])