koel/docs/.vitepress/components/SponsorLogo.vue

34 lines
527 B
Vue
Raw Normal View History

2024-03-17 18:28:39 +00:00
<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>
2024-04-04 20:13:35 +00:00
<style scoped lang="postcss">
2024-03-17 18:28:39 +00:00
img {
opacity: 0.8;
&:hover {
opacity: 1;
}
}
.dark img {
2024-06-26 14:04:29 +00:00
filter: grayscale(1) invert(1);
2024-03-17 18:28:39 +00:00
}
</style>