|
|
@ -47,10 +47,10 @@ |
|
|
|
</div> |
|
|
|
<div class="header__col"> |
|
|
|
<Logo /> |
|
|
|
<div v-if="!selectedOrig.iata && !isPickerVisible" class="logo-blurb"> |
|
|
|
<div v-if="!selectedOrig.iata && !isPickerVisible && isMapReady" class="logo-blurb"> |
|
|
|
from one of <strong>{{ airports_orig.length }}</strong> <span style="color: white;">local</span> airports |
|
|
|
</div> |
|
|
|
<div v-if="selectedOrig.iata && !selectedDest.iata && airports_dest.length > 1 && !isPickerVisible" class="logo-blurb"> |
|
|
|
<div v-if="selectedOrig.iata && !selectedDest.iata && airports_dest.length > 1 && !isPickerVisible && isMapReady" class="logo-blurb"> |
|
|
|
to one of <strong>{{ airports_dest.length }}</strong> {{ getCompliment() }} destinations |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -61,7 +61,7 @@ |
|
|
|
{{ selectedDest }} |
|
|
|
</pre> --> |
|
|
|
<main> |
|
|
|
<nav v-if="isMounted" :class="['nav', { 'nav--show': isPickerVisible },{ 'nav--hide': !isPickerVisible }]"> |
|
|
|
<nav v-if="isMapReady" :class="['nav', { 'nav--show': isPickerVisible },{ 'nav--hide': !isPickerVisible }]"> |
|
|
|
<AirportPicker |
|
|
|
:airports="airports_orig" |
|
|
|
:selected-airport="selectedOrig" |
|
|
@ -88,6 +88,7 @@ |
|
|
|
@make-destination="makeDestination" |
|
|
|
@clear-origin="clearOrigin" |
|
|
|
@clear-destination="clearDestination" |
|
|
|
@map-ready="mapReady" |
|
|
|
/> |
|
|
|
<div :class="['flyout-container',{ 'flyout-container--hide': !selectedOrig.iata || !selectedDest.iata },{ 'flyout-container--show': selectedOrig.iata && selectedDest.iata }]"> |
|
|
|
<FlightsFlyout |
|
|
@ -106,7 +107,7 @@ export default { |
|
|
|
// components: { AirportPicker }, |
|
|
|
data () { |
|
|
|
return { |
|
|
|
isMounted: false, |
|
|
|
isMapReady: false, |
|
|
|
color: 'red', |
|
|
|
isSidebarVisible: false, |
|
|
|
isPickerVisible: false, |
|
|
@ -202,6 +203,9 @@ export default { |
|
|
|
return array.join('') |
|
|
|
} |
|
|
|
}, |
|
|
|
beforeCreate () { |
|
|
|
this.isMapReady = false |
|
|
|
}, |
|
|
|
created () { |
|
|
|
// console.log(this.$route.path) |
|
|
|
|
|
|
@ -212,15 +216,15 @@ export default { |
|
|
|
this.fetchSingleAirport(this.$route.params.d, false) |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted () { |
|
|
|
this.isMounted = true |
|
|
|
}, |
|
|
|
// watch: { |
|
|
|
// history (to, from) { |
|
|
|
// console.log(`routed from ${from} to ${to}`) |
|
|
|
// } |
|
|
|
// }, |
|
|
|
methods: { |
|
|
|
mapReady () { |
|
|
|
this.isMapReady = true |
|
|
|
}, |
|
|
|
getCompliment () { |
|
|
|
const arr = [ |
|
|
|
'beautiful', 'gorgeous', 'breathtaking', 'wild', 'adventurous', 'amazing', 'majestic', 'uncharted', 'unpredictable', 'pristine', 'untamed' |
|
|
@ -365,6 +369,9 @@ export default { |
|
|
|
</script> |
|
|
|
|
|
|
|
<style scoped> |
|
|
|
main { |
|
|
|
background: black; |
|
|
|
} |
|
|
|
|
|
|
|
.logo-blurb { |
|
|
|
position: absolute; |
|
|
|