Skip to content

Commit 51fe239

Browse files
committed
Prettying up the Event Show
1 parent 720f147 commit 51fe239

File tree

2 files changed

+45
-2
lines changed

2 files changed

+45
-2
lines changed

src/components/BaseIcon.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ export default {
2828
.icon-wrapper {
2929
display: inline-flex;
3030
align-items: center;
31-
color: rgba(0, 0, 0, 0.4);
3231
font-size: 1rem;
3332
font-weight: 600;
3433
}
3534
.icon {
35+
color: rgba(0, 0, 0, 0.4);
3636
stroke: currentColor;
3737
stroke-width: 2;
3838
stroke-linecap: round;

src/views/EventShow.vue

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,28 @@
11
<template>
2-
<h1>Showing event {{ event.title }}</h1>
2+
<div>
3+
<div class="event-header">
4+
<span class="eyebrow">@{{ event.time }} on {{ event.date }}</span>
5+
<h1 class="title">{{ event.title }}</h1>
6+
<h5>Organized by {{ event.organizer }}</h5>
7+
<h5>Category: {{ event.category }}</h5>
8+
</div>
9+
10+
<BaseIcon name="map"><h2>Location</h2></BaseIcon>
11+
12+
<address>{{ event.___location }}</address>
13+
14+
<h2>Event details</h2>
15+
<p>{{ event.description }}</p>
16+
17+
<h2>Attendees
18+
<span class="badge -fill-gradient">{{ event.attendees.length }}</span>
19+
</h2>
20+
<ul class="list-group">
21+
<li v-for="(attendee, index) in event.attendees" :key="index" class="list-item">
22+
<b>{{ attendee.name }}</b>
23+
</li>
24+
</ul>
25+
</div>
326
</template>
427
<script>
528
import EventService from '@/services/EventService.js'
@@ -22,3 +45,23 @@ export default {
2245
}
2346
}
2447
</script>
48+
<style scoped>
49+
.___location {
50+
margin-bottom: 0;
51+
}
52+
.___location > .icon {
53+
margin-left: 10px;
54+
}
55+
.event-header > .title {
56+
margin: 0;
57+
}
58+
.list-group {
59+
margin: 0;
60+
padding: 0;
61+
list-style: none;
62+
}
63+
.list-group > .list-item {
64+
padding: 1em 0;
65+
border-bottom: solid 1px #e5e5e5;
66+
}
67+
</style>

0 commit comments

Comments
 (0)