Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
Replace PDM logo (#411)
Krystle Salazarf8fb6f0fda5e
diff --git a/src/assets/licenses/nc.svg b/src/assets/licenses/nc.svgindex 3d158db07..27d8a1726 100644--- a/src/assets/licenses/nc.svg+++ b/src/assets/licenses/nc.svg@@ -1,4 +1,4 @@-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30">+<svg viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg"><g id="icon" fill="currentColor"><path d="M14.973 0c4.214 0 7.768 1.446 10.66 4.339C28.544 7.232 30 10.786 30 15c0 4.215-1.429 7.723-4.287 10.527C22.678 28.51 19.097 30 14.973 30c-4.072 0-7.59-1.482-10.553-4.446C1.474 22.607 0 19.09 0 15c0-4.107 1.474-7.66 4.42-10.66C7.313 1.446 10.83 0 14.973 0zM3.375 10.956c-.446 1.232-.67 2.58-.67 4.045 0 3.321 1.214 6.196 3.642 8.624 2.447 2.412 5.34 3.617 8.679 3.617 3.375 0 6.285-1.223 8.733-3.67.875-.839 1.561-1.714 2.061-2.626l-5.651-2.518a3.866 3.866 0 01-1.433 2.317c-.76.598-1.657.943-2.693 1.031v2.304h-1.74v-2.304c-1.661-.017-3.18-.615-4.554-1.794l2.063-2.089c.981.91 2.098 1.366 3.348 1.366.517 0 .96-.116 1.326-.349.366-.231.55-.615.55-1.151 0-.376-.135-.68-.402-.911l-1.447-.617-1.767-.804-2.384-1.044-7.661-3.427zm11.652-8.278c-3.41 0-6.295 1.206-8.652 3.616-.59.59-1.143 1.26-1.66 2.01l5.732 2.571a3.513 3.513 0 011.42-1.888c.695-.473 1.508-.737 2.437-.79V5.893h1.741v2.304c1.376.071 2.625.535 3.75 1.392L17.84 11.6c-.84-.59-1.697-.884-2.572-.884-.464 0-.88.09-1.245.267-.366.179-.55.483-.55.911 0 .125.045.25.134.375l1.902.858 1.313.59 2.41 1.07 7.687 3.429c.25-1.054.375-2.125.375-3.214 0-3.447-1.196-6.349-3.588-8.707-2.375-2.41-5.27-3.616-8.68-3.616z"/></g>diff --git a/src/assets/licenses/pdm.svg b/src/assets/licenses/pdm.svgindex f59ace3b1..33f9bebad 100644--- a/src/assets/licenses/pdm.svg+++ b/src/assets/licenses/pdm.svg@@ -1,5 +1,5 @@<svg viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg">- <g id="icon" fill="currentColor">- <path d="M14.973 0c4.213 0 7.772 1.451 10.674 4.353C28.549 7.254 30 10.803 30 15s-1.43 7.705-4.287 10.526C22.696 28.51 19.115 30 14.973 30c-4.072 0-7.585-1.474-10.54-4.42C1.477 22.633 0 19.107 0 15S1.474 7.34 4.42 4.34C7.313 1.446 10.83 0 14.973 0zm.04 2.706c-3.401 0-6.281 1.196-8.638 3.589C3.93 8.777 2.705 11.679 2.705 15c0 3.321 1.215 6.196 3.643 8.624 2.429 2.429 5.321 3.642 8.679 3.642 3.357 0 6.267-1.222 8.732-3.67 2.357-2.285 3.536-5.151 3.536-8.598 0-3.428-1.197-6.33-3.589-8.705-2.393-2.392-5.291-3.588-8.692-3.588zM7.956 19.072v-8.304h4.125c2.036 0 3.054.937 3.054 2.813 0 .321-.05.629-.148.924a2.82 2.82 0 01-.509.884c-.24.295-.602.536-1.084.723-.482.187-1.054.282-1.714.282h-1.634v2.678h-2.09zm2.063-6.75v2.517h1.767c.429 0 .75-.12.965-.362.215-.24.322-.54.322-.897 0-.84-.447-1.26-1.34-1.26h-1.714v.001zm5.678 6.75v-8.304h3.215c1.32 0 2.356.34 3.107 1.018.75.678 1.124 1.723 1.124 3.134 0 1.41-.375 2.456-1.124 3.134-.75.678-1.786 1.018-3.107 1.018h-3.215zm2.063-6.563v4.822h1.205c.732 0 1.264-.218 1.594-.657.33-.437.495-1.021.495-1.754 0-.732-.165-1.316-.495-1.754-.33-.438-.87-.656-1.62-.656H17.76z"/>- </g>-</svg>+ <g id="icon" fill="currentColor">+ <path d="M15 0C6.716 0 0 6.716 0 15c0 8.283 6.716 15 15 15 8.284 0 15-6.717 15-15 0-8.284-6.716-15-15-15zm0 27.187C8.28 27.187 2.812 21.72 2.812 15c0-1.407.243-2.758.683-4.015l4.767 2.122a10.081 10.081 0 00-.198 1.991c0 5.988 4.47 7.675 7.282 7.675a7.314 7.314 0 004.217-1.32c.214-.153.407-.307.585-.464l-2.187-2.657a2.496 2.496 0 01-.2.206c-.85.806-1.785.806-1.994.806-2.288 0-3.246-2.414-3.258-4.348l13.137 5.85c.015.002.028.002.041.005-2.073 3.774-6.086 6.336-10.687 6.336zm11.745-9.073l-13.55-6.048c.489-.885 1.267-1.55 2.431-1.55.675 0 1.21.223 1.632.506.175.126.327.252.456.38l2.442-2.514c-1.64-1.41-3.505-1.663-4.725-1.663-2.866 0-4.895 1.24-6.09 3.121L4.81 8.326C6.99 5.007 10.743 2.811 15 2.811c6.72 0 12.188 5.467 12.188 12.188 0 1.088-.145 2.14-.414 3.145-.011-.01-.018-.02-.03-.03z" />+ </g>+</svg>\ No newline at end of filediff --git a/src/components/AudioTrack/layouts/Row.vue b/src/components/AudioTrack/layouts/Row.vueindex 1c9e74009..d4a91b823 100644--- a/src/components/AudioTrack/layouts/Row.vue+++ b/src/components/AudioTrack/layouts/Row.vue@@ -58,7 +58,7 @@{{ $t('interpunct') }}</template></div>- <License :license="audio.license" />+ <VLicense :license="audio.license" /></div></div></div>@@ -80,11 +80,11 @@<script>import { computed } from '@nuxtjs/composition-api'import AudioThumbnail from '~/components/AudioThumbnail/AudioThumbnail.vue'-import License from '~/components/License/License.vue'+import VLicense from '~/components/License/VLicense.vue'export default {name: 'Row',- components: { AudioThumbnail, License },+ components: { AudioThumbnail, VLicense },props: ['audio', 'size'],setup(props) {/* Utils */diff --git a/src/components/License/License.vue b/src/components/License/VLicense.vuesimilarity index 86%rename from src/components/License/License.vuerename to src/components/License/VLicense.vueindex f7abf3c2b..682ed6605 100644--- a/src/components/License/License.vue+++ b/src/components/License/VLicense.vue@@ -1,5 +1,5 @@<template>- <div class="license text-dark-charcoal-70 flex flex-row items-center gap-2">+ <div class="license flex flex-row items-center gap-2"><div class="flex gap-1"><VIconv-if="isCC"@@ -27,7 +27,7 @@ import { computed } from '@nuxtjs/composition-api'import VIcon from '~/components/VIcon/VIcon.vue'import {- ALL_LICENCES,+ ALL_LICENSES,CC_LICENSES,LICENSE_ICON_MAPPING,} from '~/constants/license.js'@@ -45,7 +45,7 @@ import sa from '~/assets/licenses/sa.svg'* license.*/export default {- name: 'License',+ name: 'VLicense',components: { VIcon },props: {/**@@ -55,14 +55,16 @@ export default {license: {type: String,required: true,- validator: (val) => ALL_LICENCES.includes(val),+ validator: (val) => ALL_LICENSES.includes(val),},},setup(props) {const icons = computed(() =>props.license.split(/[-\s]/).map((term) => LICENSE_ICON_MAPPING[term]))- const isCC = computed(() => CC_LICENSES.includes(props.license))+ const isCC = computed(+ () => CC_LICENSES.includes(props.license) || props.license === 'cc0'+ )return {ccLogo,diff --git a/src/components/License/meta/License.stories.mdx b/src/components/License/meta/VLicense.stories.mdxsimilarity index 88%rename from src/components/License/meta/License.stories.mdxrename to src/components/License/meta/VLicense.stories.mdxindex 124bba6aa..2304ac20d 100644--- a/src/components/License/meta/License.stories.mdx+++ b/src/components/License/meta/VLicense.stories.mdx@@ -6,21 +6,21 @@ import {Story,} from '@storybook/addon-docs'-import License from '~/components/License/License'+import VLicense from '~/components/License/VLicense'-<Meta title="Components/License" component={License} />+<Meta title="Components/VLicense" component={VLicense} />export const Template = (args, { argTypes }) => ({- template: `<License v-bind="$props" />`,- components: { License },+ template: `<VLicense v-bind="$props" />`,+ components: { VLicense },props: Object.keys(argTypes),})-# License+# VLicense-<Description of={License} />+<Description of={VLicense} />-<ArgsTable of={License} />+<ArgsTable of={VLicense} />It can display CC licenses.diff --git a/src/constants/license.js b/src/constants/license.jsindex 600605b22..86e44f100 100644--- a/src/constants/license.js+++ b/src/constants/license.js@@ -9,7 +9,7 @@ export const CC_LICENSES = [export const NON_CC_LICENSES = ['cc0', 'pdm']-export const ALL_LICENCES = [...CC_LICENSES, ...NON_CC_LICENSES]+export const ALL_LICENSES = [...CC_LICENSES, ...NON_CC_LICENSES]export const LICENSE_ICON_MAPPING = {by: 'by',