Skip to content

Commit af6f90a

Browse files
committed
event cover and share
1 parent a447f13 commit af6f90a

File tree

2 files changed

+5
-14
lines changed

2 files changed

+5
-14
lines changed

components/TCover.vue

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
11
<template>
22
<div>
3-
<TIcon
4-
v-if="!src"
5-
:name="fallback"
6-
:style="`width: ${width}px; height: ${height}px;`"
7-
/>
8-
<img
9-
v-else
10-
:src="src"
11-
:style="`width: ${width}px; height: ${height}px;`"
12-
alt="Cover photo"
13-
/>
3+
<div class="bg-gray-900" :style="`width: ${width}px; height: ${height}px;`">
4+
<img v-if="src" :src="src" class="w-full" alt="Cover photo" />
5+
</div>
146
</div>
157
</template>
168

pages/events/_id/index.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,8 @@
6666
class="grid grid-cols-1"
6767
:class="$route.query.variant ? 'md:grid-cols-2' : ''"
6868
>
69-
<div v-if="doc.cover" class="relative aspect-square overflow-hidden">
70-
<img :src="doc.cover" :alt="doc.name" class="absolute w-full" />
71-
<div class="square bg-indigo-500"></div>
69+
<div v-if="doc.cover" class="relative overflow-hidden">
70+
<img :src="doc.cover" :alt="doc.name" class="w-full" />
7271
</div>
7372

7473
<div class="md:border-l">

0 commit comments

Comments
 (0)