Add explicit flight origin selector

This commit is contained in:
TopherMayor
2026-04-30 21:21:06 -07:00
parent 16a0252647
commit 86733522eb

View File

@@ -136,6 +136,23 @@
min-width: 120px;
}
#map-search-input::placeholder { color: #7a8499; }
#flight-origin-select {
background: transparent;
border: none;
border-left: 1px solid #252a38;
color: #e0e6f0;
font-size: 0.72rem;
font-weight: 700;
padding: 8px 10px;
outline: none;
cursor: pointer;
flex-shrink: 0;
max-width: 96px;
}
#flight-origin-select option {
background: #13161f;
color: #e0e6f0;
}
.provider-tabs {
display: flex;
align-items: center;
@@ -1541,6 +1558,10 @@
<div id="map-search-wrap">
<span style="color:#7a8499;font-size:0.8rem;padding-left:8px;flex-shrink:0;">🔍</span>
<input type="text" id="map-search-input" placeholder="Search Los Cabos…" autocomplete="off" />
<select id="flight-origin-select" aria-label="Flight origin airport">
<option value="LAX">LAX</option>
<option value="ONT">ONT</option>
</select>
<div class="provider-tabs">
<button class="provider-tab active-yelp" id="tab-yelp" onclick="setProvider('yelp')">🍴 Yelp</button>
<button class="provider-tab" id="tab-osm" onclick="setProvider('osm')">📍 OSM</button>
@@ -3128,7 +3149,8 @@
function quickBook(type) {
const q = (document.getElementById('map-search-input').value || '').trim() || 'Los Cabos Mexico';
const origin = /ont\b/i.test(q) ? 'ONT' : /lax\b/i.test(q) ? 'LAX' : 'LAX';
const originSelect = document.getElementById('flight-origin-select');
const origin = originSelect?.value || (/ont\b/i.test(q) ? 'ONT' : /lax\b/i.test(q) ? 'LAX' : 'LAX');
const depart = '2027-02-03';
const ret = '2027-02-07';
const googleFlightsQuery = `Flights from ${origin} to SJD on ${depart} to ${ret}`;