Skip to content

Commit f1f3c33

Browse files
committed
fix: borderColor
1 parent ba374bc commit f1f3c33

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

apps/web/app/composables/useSponsor.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,13 @@ export function useSponsor() {
2323
.exhaustive()
2424
}
2525

26-
return { color }
26+
function borderColor(tag: string[]) {
27+
if (tag.includes('platinum')) return '#6E8F2E'
28+
if (tag.includes('gold')) return '#E5AF00'
29+
if (tag.includes('silver')) return '#1A8191'
30+
if (tag.includes('bronze')) return '#CC4F39'
31+
return '#35495E'
32+
}
33+
34+
return { color, borderColor }
2735
}

apps/web/app/pages/sponsors/[id]/index.vue

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const { data: speakers } = await useAsyncData('speakers', async () => {
2929
const speakerData = speakers.value?.data as Speaker[]
3030
3131
const currentLocale = useLocaleCurrent().locale
32-
const { color } = useSponsor()
32+
const { color, borderColor } = useSponsor()
3333
3434
useHead({
3535
titleTemplate: (titleChunk) => `${sponsorData[0].name} | ${conferenceTitle}`,
@@ -60,7 +60,7 @@ useHead({
6060

6161
<div class="detailhead-body">
6262
<div class="detailhead-left">
63-
<p class="detailhead-img">
63+
<p class="detailhead-img" :style="{ border: `1px solid ${borderColor(sponsorData[0].tag)}` }">
6464
<img
6565
:src="`${sponsorData[0].image_url}`"
6666
:alt="sponsorData[0].name"
@@ -226,8 +226,7 @@ useHead({
226226
width: var(--head-img-width);
227227
height: auto;
228228
aspect-ratio: 690 / 388;
229-
box-shadow: 0px 4px 4px 0px #00000040;
230-
border-radius: calc(var(--space-8) * 1);
229+
border-radius: calc(var(--unit) * 1.5);
231230
}
232231
233232
.detailhead-img img {

0 commit comments

Comments
 (0)