koel/docs/.vitepress/components/SponsorLogo.vue
2024-07-06 17:44:48 +02:00

33 lines
525 B
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<a :href="sponsor.url" :title="`${sponsor.name} ${sponsor.slogan}`">
<img :alt="`${sponsor.name} logo`" :src="sponsor.logo" v-bind="$attrs">
</a>
</template>
<script setup lang="ts">
interface Sponsor {
name: string
url: string
logo: string
slogan: string
}
const sponsor = defineProps<Sponsor>()
defineOptions({
inheritAttrs: false
})
</script>
<style scoped lang="scss">
img {
opacity: 0.8;
&:hover {
opacity: 1;
}
}
.dark img {
filter: brightness(0) invert(1);
}
</style>