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

52 lines
783 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-07-08 12:51:49 +00:00
a {
display: block;
padding: .5rem .7rem;
background: rgba(0, 0, 0, .05);
border-radius: 4px;
2024-03-17 18:28:39 +00:00
&:hover {
2024-07-08 12:51:49 +00:00
background: rgba(0, 0, 0, .1);
2024-03-17 18:28:39 +00:00
}
}
2024-07-08 12:51:49 +00:00
.dark {
a {
background: rgba(255, 255, 255, .2);
img {
filter: grayscale(1) invert(1);
}
&:hover {
background: #fff;
img {
filter: none;
}
}
}
2024-03-17 18:28:39 +00:00
}
</style>