2 import PageLink from './PageLink.svelte';
3 import ReverseLink from './ReverseLink.svelte';
4 import LastUpdated from './LastUpdated.svelte';
5 import Error from './Error.svelte';
7 import { map_store, page } from '../lib/stores.js';
10 $: page_title = Nominatim_Config.Page_Title;
11 $: reverse_only = Nominatim_Config.Reverse_Only;
16 map_store.subscribe(map => {
19 map.on('move', function () {
20 map_lat = map.getCenter().lat;
21 map_lon = map.getCenter().lng;
27 .navbar-brand :global(a:hover) {
28 text-decoration: none;
38 display: inline-block;
52 @media (max-width: 600px) {
60 background-color: #f5f5f5;
61 border-top: 2px solid #ddd;
62 border-bottom: 2px solid #ddd;
66 <header class="container-fluid">
67 <nav class="navbar navbar-expand-sm navbar-light">
68 <div class="container-fluid">
70 <div class="navbar-brand">
71 <PageLink page={reverse_only ? 'reverse' : 'search'}>
72 <img alt="logo" id="theme-logo" src="theme/logo.png" />
76 <!-- Toggler (hamburger button) -->
77 <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
78 <span class="navbar-toggler-icon"></span>
80 <div class="collapse navbar-collapse" id="navbarSupportedContent">
81 <!-- Left-aligned links -->
82 <ul class="navbar-nav me-auto">
85 <PageLink page="search" extra_classes="nav-link {view === 'search' ? 'active' : ''}">Search</PageLink>
89 <ReverseLink lat={map_lat} lon={map_lon} extra_classes="nav-link {view === 'reverse' ? 'active' : ''}">Reverse</ReverseLink>
92 <PageLink page="details" extra_classes="nav-link {view === 'details' ? 'active' : ''}">Search By ID</PageLink>
96 <!-- Right aligned links -->
97 <ul class="navbar-nav">
99 <PageLink page="about" extra_classes="nav-link {view === 'about' ? 'active' : ''}">About & Help</PageLink>
105 <section class="page-title-section">
108 <section class="search-section">