-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathalumni.vue
46 lines (45 loc) · 1.54 KB
/
alumni.vue
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
<template>
<div class="px-4">
<div class="mx-md-16 my-8">
<div class="text-h3 my-8 text-center font-weight-medium text--uppercase primary--text">
Alumni
</div>
<v-row justify="center" class="mx-md-16">
<v-col cols="12" sm="4" md="3" xl="2" v-for="alumnus in alumni" v-bind:key="alumnus.name" class="text-center">
<v-card class="rounded-xl mx-auto" height="300" width="200">
<v-img :src="getImagePath(alumnus.image)" class="fill-height"></v-img>
</v-card>
<p class="mt-2">
{{alumnus.name}}
<!-- <span v-if="alumnus.gradYear || alumnus.subteam">
(<span v-if="alumnus.subteam">{{ alumnus.subteam }}</span><span v-if="alumnus.gradYear && alumnus.subteam"> </span><span v-if="alumnus.gradYear">'{{ alumnus.gradYear }}</span>)
</span> -->
</p>
</v-col>
</v-row>
</div>
</div>
</template>
<script>
import alumni from '~/assets/json/alumni.json';
export default {
name: 'Alumni',
head: {
title: 'Alumni'
},
data() {
return {
alumni: alumni
}
},
methods: {
getImagePath(imageName) {
try {
return require(`../assets/img/headshots/alumni/${imageName}`);
} catch {
return require(`../assets/img/headshots/default.jpg`);
}
}
}
}
</script>