-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCityView.vue
65 lines (61 loc) · 1.42 KB
/
CityView.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
<script setup>
// TODO Remove this rule with step 2
/* eslint-disable no-unused-vars */
import { reactive, ref } from 'vue'
import LMap from '../components/LMap.vue'
const props = defineProps({
cityName: {
type: String,
required: true
}
})
const cityLatitude = ref(45.183916)
const cityLongitude = ref(5.703630)
const weather = reactive({
date: 20201004,
temp2m: { max: 31, min: 26 },
max: 31,
min: 26,
weather: 'ishower',
wind10m_max: 3
})
</script>
<template>
<h1 class="title">Cities weather</h1>
<article class="panel is-primary">
<div class="panel-heading"><h2>GRENOBLE</h2></div>
<div class="panel-block">
<l-map :zoom="13" :lat="cityLatitude" :long="cityLongitude" />
</div>
<div class="panel-block">
<table class="table is-flex-grow-1">
<thead>
<tr>
<th>Date</th>
<th>Weather</th>
<th>Min</th>
<th>Max</th>
</tr>
</thead>
<tbody>
<tr>
<td>Aujourd’hui</td>
<td><img src="http://www.7timer.info/img/misc/about_civil_clear.png" alt="" width="80" /></td>
<td>0 °C</td>
<td>30 °C</td>
</tr>
</tbody>
</table>
</div>
<div class="panel-block">
<router-link to="/" class="button is-rounded">
Go back home
</router-link>
</div>
</article>
</template>
<style scoped>
td {
vertical-align: middle;
}
</style>