Skip to content

Commit 9099426

Browse files
committed
Added overview
1 parent 0f99471 commit 9099426

File tree

11 files changed

+244
-57
lines changed

11 files changed

+244
-57
lines changed

components/Footer/index.vue

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,13 @@
11
<template>
22
<div class="wrap-footer">
33
<footer>
4-
<Search />
5-
<!-- <p>© 2020 COVID-19 Tracker</p> -->
64
</footer>
75
</div>
86
</template>
97

108
<script>
11-
import Search from '~/components/Search'
12-
139
export default {
1410
name: 'Footer',
15-
components: {
16-
Search
17-
},
1811
data() {
1912
return {}
2013
}
@@ -23,7 +16,7 @@ export default {
2316

2417
<style lang="scss" scoped>
2518
.wrap-footer {
26-
position: relative;
19+
position: absolute;
2720
z-index: 1;
2821
padding: 0 16px;
2922
flex-shrink: 0;
@@ -35,5 +28,17 @@ export default {
3528
text-transform: uppercase;
3629
color: #ffffff;
3730
}
31+
32+
p {
33+
// margin-bottom: 30px;
34+
}
35+
36+
a {
37+
display: inline-block;
38+
font-weight: 400;
39+
text-transform: uppercase;
40+
text-decoration: none;
41+
color: #ffffff;
42+
}
3843
}
3944
</style>

components/Map/index.vue

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default {
3131
zoom: 1.6
3232
})
3333
34-
map.addControl(new mapboxgl.NavigationControl())
34+
// map.addControl(new mapboxgl.NavigationControl())
3535
3636
const addLayers = map => {
3737
map.addSource('covid', {
@@ -55,11 +55,11 @@ export default {
5555
'circle-color': [
5656
'step',
5757
['get', 'point_count'],
58-
'#ffa332',
58+
'#ffdb99',
5959
2,
60-
'#ff9719',
60+
'#ffc04c',
6161
4,
62-
'#ff8c00'
62+
'#ffa500'
6363
],
6464
'circle-radius': [
6565
'step',
@@ -91,10 +91,10 @@ export default {
9191
source: 'covid',
9292
filter: ['!', ['has', 'point_count']],
9393
paint: {
94-
'circle-color': '#ffa332',
94+
'circle-color': '#ffa500',
9595
'circle-radius': 7,
9696
'circle-stroke-width': 1,
97-
'circle-stroke-color': '#ffa332'
97+
'circle-stroke-color': '#ffa500'
9898
}
9999
})
100100
}
@@ -168,16 +168,12 @@ export default {
168168
</script>
169169

170170
<style lang="scss" scoped>
171-
body {
172-
margin: 0;
173-
padding: 0;
174-
}
175-
176171
#map {
177172
position: absolute;
178173
top: 0;
179174
bottom: 0;
180175
width: 100%;
176+
height: 100%;
181177
}
182178
183179
/deep/ .popup {
@@ -189,7 +185,7 @@ body {
189185
}
190186
&.item_confirmed {
191187
span:last-child {
192-
color: #ffa332;
188+
color: #ffa500;
193189
}
194190
}
195191
&.item_recovered {

components/Search/index.vue

Lines changed: 50 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<template>
2-
<div class="search">
2+
<div
3+
class="search"
4+
:class="{
5+
'is-open': isOpen
6+
}">
7+
<div class="form">
8+
<!-- <select>
9+
<option value="">Test</option>
10+
</select> -->
11+
</div>
312
<div
413
class="icon"
514
@click="onClick">
@@ -12,41 +21,64 @@
1221
export default {
1322
name: 'Search',
1423
data() {
15-
return {}
24+
return {
25+
isOpen: false
26+
}
1627
},
1728
methods: {
1829
onClick() {
30+
this.isOpen = !this.isOpen
1931
console.log('clicked')
2032
}
2133
}
2234
}
2335
</script>
2436

2537
<style lang="scss" scoped>
38+
.search {
39+
position: absolute;
40+
z-index: 1;
41+
bottom: 0;
42+
width: 100%;
43+
height: 0;
44+
transition: .5s ease;
45+
46+
&.is-open {
47+
// width: 80vw;
48+
49+
.icon {
50+
// transform: translate3d(calc(-80vw + 32px), -50%, 0);
51+
}
52+
}
53+
}
54+
55+
.form {
56+
// position: absolute;
57+
// z-index: 1;
58+
// width: 100%;
59+
// height: 100vh;
60+
// background-color: #1e1e1e;
61+
// box-shadow: 0px 0px 24px rgba(153, 0, 0, 1);
62+
// overflow: hidden;
63+
// background-color: rgba(39, 39, 39, 1);
64+
// box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 4px -1px, rgba(0, 0, 0, 0.14) 0px 4px 5px 0px, rgba(0, 0, 0, 0.12) 0px 1px 10px 0px;
65+
}
66+
2667
.icon {
68+
position: absolute;
69+
left: 50%;
70+
bottom: 0;
71+
z-index: 1;
72+
transform: translate3d(0, -16px, 0);
2773
display: flex;
2874
justify-content: center;
2975
align-items: center;
3076
border-radius: 100%;
31-
margin: 16px auto;
3277
width: 64px;
3378
height: 64px;
3479
cursor: pointer;
35-
background-color: rgba(39, 39, 39, 1);
80+
background-color: rgba(153, 0, 0, 1);
3681
box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 4px -1px, rgba(0, 0, 0, 0.14) 0px 4px 5px 0px, rgba(0, 0, 0, 0.12) 0px 1px 10px 0px;
37-
animation: float-up 1s infinite alternate;
38-
39-
&:hover {
40-
animation-play-state: paused;
41-
}
42-
}
43-
44-
@keyframes float-up {
45-
0% {
46-
transform: translate3d(0, 0px, 0);
47-
}
48-
100% {
49-
transform: translate3d(0, 5px, 0);
50-
}
82+
transition: .5s ease;
5183
}
5284
</style>

layouts/default.vue

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
<template>
22
<div class="wrapper">
3-
<Header />
3+
<!-- <Header /> -->
44
<div class="main-content">
55
<nuxt />
66
</div>
7-
<Footer />
7+
<!-- <Footer /> -->
88
</div>
99
</template>
1010

1111
<script>
1212
import { mapGetters } from 'vuex'
13-
import Header from '~/components/Header'
14-
import Footer from '~/components/Footer'
13+
// import Header from '~/components/Header'
14+
// import Footer from '~/components/Footer'
1515
1616
export default {
17-
components: {
18-
Header,
19-
Footer
20-
},
17+
// components: {
18+
// Header,
19+
// Footer
20+
// },
2121
head () {
2222
return {
2323
title: 'COVID-19 Tracker',

package-lock.json

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"dependencies": {
2222
"@nuxtjs/axios": "^5.9.5",
2323
"@nuxtjs/pwa": "^3.0.0-beta.20",
24+
"animated-number-vue": "^1.0.0",
2425
"babel-runtime": "^6.26.0",
2526
"cross-env": "^5.2.0",
2627
"mapbox-gl": "^1.8.1",

0 commit comments

Comments
 (0)