element-plus/docs/.vitepress/vitepress/components/vp-sponsor-small.vue

40 lines
817 B
Vue
Raw Normal View History

<script setup lang="ts">
import { isDark } from '../composables/dark'
import { goldSponsors } from '../../config/sponsors'
</script>
<template>
2022-04-03 17:28:59 +08:00
<div class="sponsor-container">
<a
v-for="item in goldSponsors"
:key="item.name"
2022-04-03 17:28:59 +08:00
:class="[
'sponsor-item inline-flex items-center',
item.isDark && isDark ? 'filter invert' : '',
]"
:href="item.url"
:title="`${item.name_cn || item.name} - ${item.slogan_cn || item.slogan}`"
target="_blank"
>
2022-04-03 17:28:59 +08:00
<img :src="item.img" :alt="item.name" />
</a>
</div>
</template>
<style scoped lang="scss">
2022-04-03 17:28:59 +08:00
.sponsor-container {
display: flex;
align-items: center;
.sponsor-item {
margin-right: 4px;
2022-04-03 16:59:06 +08:00
height: 36px;
width: 36px;
2022-04-03 16:59:06 +08:00
img {
height: 100%;
width: 100%;
}
}
}
</style>