1
1
<template >
2
2
<div class =" launch-list" >
3
- <h1 class =" launch-list__header" v-if =" title" >
3
+ <div class =" launch-list__header" v-if =" title" >
4
4
<font-awesome-icon v-if =" icon" :icon =" icon" />
5
- <span >{{ filter }}</span >
6
- <span >{{ search }}</span >
7
- </h1 >
5
+ <h1 >
6
+ <span >{{ filter }}</span >
7
+ <span >{{ search }}</span >
8
+ </h1 >
9
+ <subscribe-button
10
+ v-if =" state && filter"
11
+ :id =" filter" :topic =" state"
12
+ />
13
+ </div >
8
14
<launch-card-featured v-if =" featured" :launch =" featured" :forced =" true" />
9
15
<div class =" launch-list__content" >
10
16
<h2 class =" launch-list__heading" >
20
26
:launch =" launch"
21
27
/>
22
28
</section >
23
- <base-button v-if =" more.next" @click.native =" fetchMoreNext" text =" Load more" :loading =" loading.next" />
29
+ <base-button class = " launch-list__more-button " v-if =" more.next" @click.native =" fetchMoreNext" text =" Load more" :loading =" loading.next" />
24
30
<h3 v-else class =" launch-list__heading --medium" >phew... that was the last one!</h3 >
25
31
</template >
26
32
<h3 v-else class =" launch-list__heading --tall" >No upcoming Launches</h3 >
38
44
:ticker =" false"
39
45
/>
40
46
</section >
41
- <base-button v-if =" more.past" @click.native =" fetchMorePast" text =" Load more" :loading =" loading.past" />
47
+ <base-button class = " launch-list__more-button " v-if =" more.past" @click.native =" fetchMorePast" text =" Load more" :loading =" loading.past" />
42
48
<h3 v-else class =" launch-list__heading --medium" >phew... that was the last one!</h3 >
43
49
</template >
44
50
<h3 v-else class =" launch-list__heading --tall" >No past launches</h3 >
48
54
49
55
<script >
50
56
import { mapState , mapActions } from ' vuex'
51
- import LaunchCard from ' ./LaunchCard.vue'
52
- import LaunchCardFeatured from ' ./LaunchCardFeatured.vue'
53
- import BaseButton from ' ./BaseButton.vue'
57
+ import LaunchCard from ' ./LaunchCard'
58
+ import LaunchCardFeatured from ' ./LaunchCardFeatured'
59
+ import BaseButton from ' ./BaseButton'
60
+ import SubscribeButton from ' ./SubscribeButton'
54
61
55
62
export default {
56
- components: { LaunchCard, LaunchCardFeatured, BaseButton },
63
+ components: { LaunchCard, LaunchCardFeatured, BaseButton, SubscribeButton },
57
64
name: ' LaunchList' ,
58
65
props: {
59
66
state: {
@@ -124,6 +131,13 @@ export default {
124
131
}),
125
132
},
126
133
methods: {
134
+ ... mapActions ({
135
+ getMoreNext: ' launches/getMoreNextLaunches' ,
136
+ getMorePast: ' launches/getMorePastLaunches' ,
137
+ unsetState: ' launches/unsetState' ,
138
+ getNext: ' launches/getNextLaunches' ,
139
+ getPast: ' launches/getPastLaunches' ,
140
+ }),
127
141
fetchMoreNext : async function () {
128
142
this .loading .next = true
129
143
const fetched = await this .getMoreNext ({
@@ -144,13 +158,6 @@ export default {
144
158
if (fetched === 0 ) this .more .past = false
145
159
this .loading .past = false
146
160
},
147
- ... mapActions ({
148
- getMoreNext: ' launches/getMoreNextLaunches' ,
149
- getMorePast: ' launches/getMorePastLaunches' ,
150
- unsetState: ' launches/unsetState' ,
151
- getNext: ' launches/getNextLaunches' ,
152
- getPast: ' launches/getPastLaunches' ,
153
- }),
154
161
},
155
162
created : async function () {
156
163
const { state , getQuery , filter } = this
@@ -178,23 +185,28 @@ export default {
178
185
}
179
186
180
187
& __header {
181
- font-size : calc (.8em + 5vw );
182
188
display : flex ;
183
189
flex-flow : column ;
184
190
justify-content : center ;
185
191
align-items : center ;
186
192
text-align : center ;
187
193
min-height : calc (35vh - 77px );
188
194
margin : 0 10px ;
195
+ font-size : 1.6em ;
196
+ padding : 1em 0 ;
189
197
190
198
@media only screen and (min-width : 640px ) {
191
199
min-height : calc (40vh - 77px );
192
- font-size : 4 em ;
200
+ font-size : 2 em ;
193
201
}
194
202
195
203
svg {
196
- margin-bottom : .4em ;
197
- font-size : 1.4em ;
204
+ font-size : 4em ;
205
+ }
206
+
207
+ .base-button {
208
+ font-size : .6em ;
209
+ margin : 0 ;
198
210
}
199
211
}
200
212
@@ -231,7 +243,7 @@ export default {
231
243
}
232
244
}
233
245
234
- .base -button {
246
+ & __more -button {
235
247
margin : 60px 0 ;
236
248
font-weight : 500 ;
237
249
align-self : center ;
0 commit comments