-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathBuildingMap.vue
75 lines (65 loc) · 1.26 KB
/
BuildingMap.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
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
<template>
<v-container fluid class="content">
<v-row class="ma-0">
<v-col class="pa-0">
<page-title back-arrow="secondary"></page-title>
</v-col>
</v-row>
<v-row class="ma-0">
<v-col class="grow pa-0 pa-md-2">
<div class="map-container">
<img v-if="building" class="map d-block" :src="require(`assets/building-${building.name.toLowerCase()}.png`)">
</div>
</v-col>
</v-row>
</v-container>
</template>
<script>
import { mapGetters } from 'vuex'
import PageTitle from '@/components/PageTitle'
export default {
name: 'BuildingMap',
components: {
PageTitle
},
props: {
buildingName: {
type: String,
required: true
}
},
computed: {
building () {
return this.buildings[this.buildingName]
},
...mapGetters([
'buildings'
])
},
metaInfo () {
return {
title: `Building ${this.buildingName}`
}
}
}
</script>
<style scoped>
.map-container {
width: 100%;
height: 100%;
}
.map {
max-width: 100%;
max-height: calc(100vh - 100px);
object-fit: contain;
margin-left: auto;
margin-right: auto;
}
@media (min-width: 960px) {
.map {
max-height: calc(100vh - 320px);
margin-left: 0;
margin-right: 0;
}
}
</style>