Skip to content

Commit 5ffacc9

Browse files
author
aafomin
committed
fix bugs in weather
1 parent 4545b8a commit 5ffacc9

File tree

4 files changed

+31
-14
lines changed

4 files changed

+31
-14
lines changed

src/components/Main/imageGrid.vue

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,6 @@
1515
<p>To continue</p>
1616
<p>you need to register</p>
1717
</div>
18-
<!-- <div class="text-xs-center">
19-
<v-btn round large color="brown darken-4" dark>
20-
<h2>Начать</h2>
21-
</v-btn>
22-
</div>-->
2318
</v-flex>
2419
</v-layout>
2520
</v-container>

src/components/Weather/card-weather.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,8 @@ export default {
203203
.card {
204204
width: 95vw;
205205
height: 40%;
206-
margin: auto;
207206
.card__center {
208-
font-size: 0.75rem;
207+
font-size: 1rem;
209208
.center__icon {
210209
width: 32vw;
211210
height: 20vh;
@@ -226,7 +225,7 @@ export default {
226225
.card__datails {
227226
margin: auto;
228227
width: 95vw;
229-
height: 40vh;
228+
height: 42vh;
230229
}
231230
}
232231
</style>

src/components/Weather/weather.vue

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<div v-click-outside>
66
<v-layout v-show="!isLoading" class="weather__search">
77
<v-layout column>
8-
<v-text-field label="Search" clearable v-model="searchText"></v-text-field>
8+
<v-text-field class="weather__search-input" label="Search" clearable v-model="searchText"></v-text-field>
99
<search-list v-if="selectCityShow" :items="items" @selectItem="getWeatherByCity"></search-list>
1010
</v-layout>
1111
<v-btn fab dark color="brown darken-4" small @click="searchCity">
@@ -14,7 +14,7 @@
1414
<v-divider></v-divider>
1515
</v-layout>
1616
</div>
17-
<v-flex xs8 offset-sm3 v-show="!isLoading">
17+
<v-flex class="weather__card" xs8 v-show="!isLoading">
1818
<div v-for="(city, index) in cities" :key="index">
1919
<card :city="city"></card>
2020
</div>
@@ -47,7 +47,12 @@ export default {
4747
"SEARCH_CITY",
4848
"GET_WEATHER_CITY"
4949
]),
50-
...mapState("weatherStore", ["cities", "items", "isLoading", "searchLoading"])
50+
...mapState("weatherStore", [
51+
"cities",
52+
"items",
53+
"isLoading",
54+
"searchLoading"
55+
])
5156
},
5257
created() {
5358
this.INIT_STATE;
@@ -88,15 +93,25 @@ export default {
8893
<style lang="scss" scoped>
8994
.weather {
9095
position: relative;
96+
.weather__card {
97+
margin: auto;
98+
}
9199
.weather__search {
92-
margin-left: 25%;
93-
width: 750px;
100+
margin: auto;
101+
width: 650px;
102+
.weather__search-input {
103+
font-size: 1.75rem;
104+
width: 600px;
105+
}
94106
}
95107
}
96108
@media screen and (max-width: 800px) {
97109
.weather {
98110
.weather__search {
99-
width: 70%;
111+
width: 85%;
112+
.weather__search-input {
113+
width: 100%;
114+
}
100115
}
101116
}
102117
}

src/views/loading.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,12 @@ export default {
3030
margin-top: 15%;
3131
}
3232
}
33+
@media screen and (max-width: 800px) {
34+
.text-xs-center {
35+
.circular {
36+
margin-top: 20%;
37+
margin-left: -12vw;
38+
}
39+
}
40+
}
3341
</style>

0 commit comments

Comments
 (0)