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; justify-content: center;
align-items: flex-end; align-items: flex-end;
flex-wrap: wrap; flex-wrap: wrap;
overflow: hidden;
} }
:root { :root {
@ -62,15 +63,17 @@ main {
} }
.nav--hide { .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; max-height: 0;
overflow: hidden;
} }
.nav--show { .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 { .btn {

+ 2
- 1
components/Map.vue View File

@ -7,7 +7,7 @@
selectedDest: {{ selectedDest.key }} selectedDest: {{ selectedDest.key }}
</pre> --> </pre> -->
<client-only> <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"> <v-marker-cluster v-if="!selectedOrigNorm.key">
<l-marker <l-marker
v-for="airport in airportsOrig" v-for="airport in airportsOrig"
@ -314,6 +314,7 @@ export default {
.leaflet-container { .leaflet-container {
font-size: 1rem; font-size: 1rem;
background: black;
} }
.leaflet-popup { .leaflet-popup {

+ 0
- 8
pages/dates.vue View File

@ -60,14 +60,6 @@ export default {
const today = new Date().toLocaleDateString('en-CA') 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 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' 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') 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)` 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) // console.log(scheduleFetchFilterFormula)
const scheduleFetchSort = '&sort[0][field]=Departure_TimeL&sort[0][direction]=asc' const scheduleFetchSort = '&sort[0][field]=Departure_TimeL&sort[0][direction]=asc'

+ 14
- 7
pages/go.vue View File

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

Loading…
Cancel
Save