Browse Source

missed changes from last commit

master
Spencer Flagg 3 years ago
parent
commit
6e720386bc
5 changed files with 24 additions and 29 deletions
  1. +8
    -5
      assets/css/main.css
  2. +2
    -1
      components/Map.vue
  3. +0
    -8
      pages/dates.vue
  4. +0
    -8
      pages/flights.vue
  5. +14
    -7
      pages/go.vue

+ 8
- 5
assets/css/main.css View File

@ -53,6 +53,7 @@ main {
justify-content: center;
align-items: flex-end;
flex-wrap: wrap;
overflow: hidden;
}
:root {
@ -62,15 +63,17 @@ main {
}
.nav--hide {
transition: margin-top var(--m-s) linear var(--h-s), max-height var(--h-s) linear 0s;
margin-top: 0;
transition: padding-top var(--m-s) linear var(--h-s), max-height var(--h-s) linear 0s;
padding-top: 0;
max-height: 0;
overflow: hidden;
}
.nav--show {
margin-top: 3.5rem;
max-height: 250px;
transition: margin-top var(--m-s) linear 0s, max-height var(--h-s) linear var(--m-s);
padding-top: 3.5rem;
max-height: 18rem;
transition: padding-top var(--m-s) linear 0s, max-height var(--h-s) linear var(--m-s);
overflow: visible;
}
.btn {

+ 2
- 1
components/Map.vue View File

@ -7,7 +7,7 @@
selectedDest: {{ selectedDest.key }}
</pre> -->
<client-only>
<l-map ref="flMap" v-bind="map">
<l-map ref="flMap" v-bind="map" @ready="$emit('map-ready')">
<v-marker-cluster v-if="!selectedOrigNorm.key">
<l-marker
v-for="airport in airportsOrig"
@ -314,6 +314,7 @@ export default {
.leaflet-container {
font-size: 1rem;
background: black;
}
.leaflet-popup {

+ 0
- 8
pages/dates.vue View File

@ -60,14 +60,6 @@ export default {
const today = new Date().toLocaleDateString('en-CA')
// function addDays (date, days) {
// const result = new Date(date)
// result.setDate(result.getDate() + days)
// return result
// }
// const tomorrow = addDays(new Date(), 1).toLocaleDateString('en-CA')
const scheduleFetchFilterFormula = `AND(Is_Current="Yes",Origin_IATA="${this.$route.params.o}",Destination_IATA="${this.$route.params.d}",Effective_End>"${today}")`
const scheduleFetchSort = '&sort[0][field]=Departure_TimeL&sort[0][direction]=asc'

+ 0
- 8
pages/flights.vue View File

@ -192,14 +192,6 @@ export default {
const today = new Date().toLocaleDateString('en-CA')
// function addDays (date, days) {
// const result = new Date(date)
// result.setDate(result.getDate() + days)
// return result
// }
// const tomorrow = addDays(new Date(), 1).toLocaleDateString('en-CA')
const scheduleFetchFilterFormula = `AND(Is_Current="Yes",Origin_IATA="${this.$route.params.o}",Destination_IATA="${this.$route.params.d}",Effective_End>"${today}",SEARCH("${new Date(this.$route.params.departure).getUTCDay()}",Frequency)>0)`
// console.log(scheduleFetchFilterFormula)
const scheduleFetchSort = '&sort[0][field]=Departure_TimeL&sort[0][direction]=asc'

+ 14
- 7
pages/go.vue View File

@ -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;

Loading…
Cancel
Save