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

61 lines
1.1 KiB
Vue
Raw Normal View History

<script setup lang="ts">
import { platinumSponsors } from '../../config/sponsors'
2022-04-04 12:07:33 +08:00
defineProps({
itemClass: String,
itemStyle: [String, Object, Array],
})
</script>
2021-11-03 15:14:45 +08:00
<template>
2022-04-03 17:28:59 +08:00
<div class="sponsor-container">
<a
v-for="item in platinumSponsors"
:key="item.name"
:href="item.url"
:title="`${item.name_cn || item.name} - ${item.slogan_cn || item.slogan}`"
2022-04-04 12:07:33 +08:00
:class="['sponsor-item inline-flex', itemClass]"
:style="itemStyle"
2022-04-03 17:28:59 +08:00
target="_blank"
>
<img :src="item.banner_img" :alt="item.name" />
</a>
2021-11-03 15:14:45 +08:00
</div>
</template>
<style scoped lang="scss">
2022-04-03 17:53:02 +08:00
@use '../styles/mixins.scss' as *;
2021-11-03 15:14:45 +08:00
.sponsor-item {
margin-bottom: 8px;
2022-04-03 16:59:06 +08:00
height: 60px;
2022-04-03 17:53:02 +08:00
width: 196px;
2022-04-04 12:07:33 +08:00
@include respond-to('max') {
2022-04-03 17:53:02 +08:00
width: 236px;
2022-04-03 18:37:29 +08:00
height: 72px;
2022-04-03 17:53:02 +08:00
}
@media (max-width: 767px) {
width: 236px;
height: 72px;
}
2021-11-03 15:14:45 +08:00
img {
border-radius: 8px;
overflow: hidden;
2022-04-03 17:53:02 +08:00
height: 100%;
width: 100%;
2021-11-03 15:14:45 +08:00
}
}
2022-04-03 17:53:02 +08:00
@media (max-width: 768px) {
.sponsor-item {
img {
border-radius: 4px;
min-height: 45px;
}
}
}
2021-11-03 15:14:45 +08:00
</style>