-
-
Notifications
You must be signed in to change notification settings - Fork 424
Expand file tree
/
Copy pathLogoList.vue
More file actions
79 lines (76 loc) · 2.2 KB
/
LogoList.vue
File metadata and controls
79 lines (76 loc) · 2.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<script setup lang="ts">
type BaseItem = {
name: string
url: string
logo:
| string
| {
dark: string
light: string
}
}
type GroupItem = {
name: string
items: BaseItem[]
}
const props = defineProps<{
list: (BaseItem | GroupItem)[]
}>()
</script>
<template>
<ul class="flex flex-wrap gap-4 md:gap-x-6 md:gap-y-4 list-none">
<li v-for="item in list" :key="item.name">
<a
v-if="'logo' in item"
:href="item.url"
target="_blank"
rel="noopener noreferrer"
class="flex items-center justify-center h-full min-w-11 rounded-md hover:bg-fg/10 transition-colors p-1"
:aria-label="item.name"
>
<AboutLogoImg :src="item.logo" :alt="item.name" />
</a>
<div v-else-if="item.items" class="relative flex items-center justify-center">
<svg
width="11"
height="38"
viewBox="0 0 11 38"
fill="none"
xmlns="http://www.w3.org/2000/svg"
aria-hidden="true"
>
<path
d="M5.62151 0C-1.8519 10.6931 -1.89574 27.2683 5.62151 37.9997H10.6709C3.15538 27.2683 3.19922 10.6931 10.6709 0H5.62151Z"
fill="currentColor"
/>
</svg>
<ul class="flex items-center justify-center h-full gap-0.5 list-none">
<li v-for="groupItem in item.items" :key="groupItem.name">
<a
:href="groupItem.url"
target="_blank"
rel="noopener noreferrer"
class="flex items-center justify-center h-full min-w-10 rounded-md hover:bg-fg/10 transition-colors p-0.5"
:aria-label="groupItem.name"
>
<AboutLogoImg :src="groupItem.logo" :alt="groupItem.name" />
</a>
</li>
</ul>
<svg
width="11"
height="38"
viewBox="0 0 11 38"
fill="none"
xmlns="http://www.w3.org/2000/svg"
aria-hidden="true"
>
<path
d="M5.04935 0H0C7.4734 10.6931 7.51725 27.2683 0 37.9997H5.04935C12.5648 27.2683 12.521 10.6931 5.04935 0Z"
fill="currentColor"
/>
</svg>
</div>
</li>
</ul>
</template>