% rebase('webpage_base.tpl')

<div id="map">
    <div id="maptools" class="mt-3 px-3" style="z-index: 1002; position: relative;">
        <div class="row">
            <div class="col-auto me-auto pt-3"></div>
            <div class="col-auto">
                <p class="d-inline-flex gap-1">
                    <button id="filters-button" type="button" class="btn btn-outline-primary" data-bs-toggle="button" onclick="toggleFiltersPanel();"><i class="fa-solid fa-filter"></i> Filters</button>
                    <button id="display-button" type="button" class="btn btn-outline-primary" data-bs-toggle="button" onclick="toggleDisplayPanel();"><i class="fa-solid fa-desktop"></i> Display</button>
                </p>
            </div>
        </div>

        <div id="filters-area" class="appearing-panel card mb-3">
            <div class="card-header text-white bg-primary">
                <div class="row">
                    <div class="col-auto me-auto">
                        Filters
                    </div>
                    <div class="col-auto d-inline-flex">
                        <button id="close-filters-button" type="button" class="btn-close btn-close-white" aria-label="Close" onclick="closeFiltersPanel();"></button>
                    </div>
                </div>

            </div>
            <div class="card-body">
                <div class="row row-cols-1 g-4 mb-4">
                    <div class="col">
                        <div class="card">
                            <div class="card-body">
                                <h5 class="card-title">Bands</h5>
                                <p id="band-options" class="card-text spothole-card-text"></p>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row row-cols-1 row-cols-md-4 g-4">
                    <div class="col">
                        <div class="card">
                            <div class="card-body">
                                <h5 class="card-title">DX Continent</h5>
                                <p id="dx-continent-options" class="card-text spothole-card-text"></p>
                            </div>
                        </div>
                    </div>
                    <div class="col">
                        <div class="card">
                            <div class="card-body">
                                <h5 class="card-title">DE Continent</h5>
                                <p id="de-continent-options" class="card-text spothole-card-text"></p>
                            </div>
                        </div>
                    </div>
                    <div class="col">
                        <div class="card">
                            <div class="card-body">
                                <h5 class="card-title">Modes</h5>
                                <p id="mode-options" class="card-text spothole-card-text"></p>
                            </div>
                        </div>
                    </div>
                    <div class="col">
                        <div class="card">
                            <div class="card-body">
                                <h5 class="card-title">Sources</h5>
                                <p id="source-options" class="card-text spothole-card-text"></p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div id="display-area" class="appearing-panel card mb-3">
            <div class="card-header text-white bg-primary">
                <div class="row">
                    <div class="col-auto me-auto">
                        Display
                    </div>
                    <div class="col-auto d-inline-flex">
                        <button id="close-display-button" type="button" class="btn-close btn-close-white" aria-label="Close" onclick="closeDisplayPanel();"></button>
                    </div>
                </div>

            </div>
            <div class="card-body">
                <div id="display-container" class="row row-cols-1 row-cols-md-4 g-4">
                    <div class="col">
                        <div class="card">
                            <div class="card-body">
                                <h5 class="card-title">Spot Age</h5>
                                <p class="card-text spothole-card-text">Last
                                    <select id="max-spot-age" class="storeable-select form-select ms-2 me-2 d-inline-block" oninput="filtersUpdated();" style="width: 5em; display: inline-block;">
                                        <option value="300">5</option>
                                        <option value="600">10</option>
                                        <option value="1800" selected>30</option>
                                        <option value="3600">60</option>
                                    </select>
                                    minutes
                                </p>
                            </div>
                        </div>
                    </div>
                    <div class="col">
                        <div class="card">
                            <div class="card-body">
                                <h5 class="card-title">Map Features</h5>
                                <div class="form-group">
                                    <div class="form-check form-check-inline">
                                      <input class="form-check-input storeable-checkbox" type="checkbox" id="mapShowGeodesics" value="mapShowGeodesics" oninput="displayUpdated();">
                                      <label class="form-check-label" for="mapShowGeodesics">Geodesic Lines</label>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet@1.9.4/dist/leaflet.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet-extra-markers@1.2.2/dist/css/leaflet.extra-markers.min.css">
<script src="https://cdn.jsdelivr.net/npm/leaflet@1.9.4/dist/leaflet.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/leaflet-providers@2.0.0/leaflet-providers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/leaflet-extra-markers@1.2.2/src/assets/js/leaflet.extra-markers.min.js" type="module"></script>
<script src="https://cdn.jsdelivr.net/npm/leaflet.geodesic"></script>
<script src="https://cdn.jsdelivr.net/npm/@joergdietrich/leaflet.terminator@1.1.0/L.Terminator.min.js"></script>

<script src="/js/common.js"></script>
<script src="/js/spotandmap.js"></script>
<script src="/js/map.js"></script>
<script>$(document).ready(function() { $("#nav-link-map").addClass("active"); }); <!-- highlight active page in nav --></script>