]> git.openstreetmap.org Git - nominatim-ui.git/commitdiff
cut lines at 100, spacing changes for linter
authormarc tobias <mtmail@gmx.net>
Mon, 26 Jun 2023 20:14:32 +0000 (22:14 +0200)
committermarc tobias <mtmail@gmx.net>
Mon, 26 Jun 2023 20:14:32 +0000 (22:14 +0200)
16 files changed:
src/components/DetailsLink.svelte
src/components/DetailsOneRow.svelte
src/components/DetailsPostcodeHint.svelte
src/components/Error.svelte
src/components/Header.svelte
src/components/LastUpdated.svelte
src/components/MapPosition.svelte
src/components/PageLink.svelte
src/components/ResultsList.svelte
src/components/ReverseLink.svelte
src/components/SearchSection.svelte
src/components/SearchSectionDetails.svelte
src/components/UrlSubmitForm.svelte
src/pages/AboutPage.svelte
src/pages/DetailsPage.svelte
src/pages/StatusPage.svelte

index d91407945207b2399f25132b7bfb0bd003663b5c..17851799d3357f55715faa20a3e65d4be80a5b8c 100644 (file)
@@ -49,4 +49,6 @@
   }
 </script>
 
-<a on:click|preventDefault|stopPropagation={handleClick} href={href} class={extra_classes}><slot></slot></a>
+<a on:click|preventDefault|stopPropagation={handleClick} href={href} class={extra_classes}>
+  <slot></slot>
+</a>
index 67c5152be865481d5b7b3119103b07bd8e24a332..cbbad24c45e89a5d2109873a1325f8ff7ef5e612 100644 (file)
   <td>{@html formatDistance(addressLine.distance, bDistanceInMeters)}</td>
   <td>
     {#if addressLine.osm_id}
-      <DetailsLink feature={addressLine}>details</DetailsLink>
+      <DetailsLink feature={addressLine}>
+        details
+      </DetailsLink>
     {:else if !reverse_only && addressLine.type.match(/^country/)}
-      <PageLink page='search' params_hash={{ country: addressLine.localname }}>search by name</PageLink>
+      <PageLink page='search' params_hash={{ country: addressLine.localname }}>
+        search by name
+      </PageLink>
     {:else if !reverse_only && addressLine.type === 'postcode'}
-      <PageLink page='search' params_hash={{ postalcode: addressLine.localname }}>search by name</PageLink>
+      <PageLink page='search' params_hash={{ postalcode: addressLine.localname }}>
+        search by name
+      </PageLink>
     {/if}
   </td>
 </tr>
index 5946d2ad62c0396aa5e46f9b6c146ce9d5bb8301..13ac99b656b45aff5479a28127f9bd45a5802413 100644 (file)
 (<a href="#openHint" on:click|preventDefault|stopPropagation={openHint}>how?</a>)
 
 <div id="postcode-hint" class="my-2 p-2">
-  <button type="button" class="btn-close float-end m-1" aria-label="Close" on:click|stopPropagation={closeHint} />
-
+  <button type="button"
+          class="btn-close float-end m-1"
+          aria-label="Close"
+          on:click|stopPropagation={closeHint}
+  />
   <p>
     Nightly calculated from nearby places having this postcode.
-    <a href="https://nominatim.org/release-docs/latest/admin/Maintenance/#updating-postcodes">Documentation</a>.
+    <a href="https://nominatim.org/release-docs/latest/admin/Maintenance/#updating-postcodes">
+      Documentation
+    </a>.
   </p>
   <p>
-    You can search for those with an <a href={url} target="_blank" rel="noreferrer">Overpass Turbo query</a>.
+    You can search for those with an
+    <a href={url} target="_blank" rel="noreferrer">Overpass Turbo query</a>.
   </p>
   <p>
-    <a href="https://nominatim.org/2022/06/26/state-of-postcodes.html" target="_blank" rel="noreferrer">How Nominatim uses postcodes</a>.
+    <a href="https://nominatim.org/2022/06/26/state-of-postcodes.html"
+       target="_blank" rel="noreferrer">How Nominatim uses postcodes</a>.
+  </p>
 </div>
 
 <style>
@@ -66,4 +74,4 @@
     background-color: #ededff;
     display: none;
   }
-</style>
\ No newline at end of file
+</style>
index e8702b9098bd1a2fb11874807d75f10acaaa98b9..fad20eb9e7e32cbecb6362f3f3064c1f7716fc7e 100644 (file)
@@ -14,6 +14,9 @@
   <div id="error" class="container-fluid alert-danger py-3 px-4">
     {error_message}
 
-    <button type="button" class="btn-close float-end" aria-label="dismiss" on:click={dismiss_message}></button>
+    <button type="button"
+            class="btn-close float-end"
+            aria-label="dismiss"
+            on:click={dismiss_message}></button>
   </div>
 {/if}
index 0fbead9ae9839ca7f20bf77dabcdfa4ffff33323..97cbebdd4d0f3d2a4aa8189903c16a53b2dcc80b 100644 (file)
         </PageLink>
       </div>
       <!-- Toggler (hamburger button) -->
-      <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
+      <button class="navbar-toggler"
+              type="button"
+              data-bs-toggle="collapse"
+              data-bs-target="#navbarSupportedContent"
+              aria-controls="navbarSupportedContent"
+              aria-expanded="false"
+              aria-label="Toggle navigation">
         <span class="navbar-toggler-icon"></span>
       </button>
       <div class="collapse navbar-collapse" id="navbarSupportedContent">
         <ul class="navbar-nav me-auto">
           {#if !reverse_only}
             <li class="nav-item">
-              <PageLink page="search" extra_classes="nav-link {view === 'search' ? 'active' : ''}">Search</PageLink>
+              <PageLink page="search"
+                        extra_classes="nav-link {view === 'search' ? 'active' : ''}">
+                Search
+              </PageLink>
             </li>
           {/if}
           <li class="nav-item">
-            <ReverseLink lat={map_lat} lon={map_lon} extra_classes="nav-link {view === 'reverse' ? 'active' : ''}">Reverse</ReverseLink>
+            <ReverseLink lat={map_lat}
+                         lon={map_lon}
+                         extra_classes="nav-link {view === 'reverse' ? 'active' : ''}">
+              Reverse
+            </ReverseLink>
           </li>
           <li class="nav-item">
-            <PageLink page="details" extra_classes="nav-link {view === 'details' ? 'active' : ''}">Search By ID</PageLink>
+            <PageLink page="details"
+                      extra_classes="nav-link {view === 'details' ? 'active' : ''}">
+              Search By ID
+            </PageLink>
           </li>
         </ul>
       </div>
       <!-- Right aligned links -->
       <ul class="navbar-nav">
         <li class="nav-item">
-          <PageLink page="about" extra_classes="nav-link {view === 'about' ? 'active' : ''}">About & Help</PageLink>
+          <PageLink page="about"
+                    extra_classes="nav-link {view === 'about' ? 'active' : ''}">
+            About & Help
+          </PageLink>
         </li>
       </ul>
     </div>
index 08be5d9aa54b3b51692c5166958ba65a4441c350..0d7768d3f34d76ac36d0a2d7f9840bb1c9f5582f 100644 (file)
@@ -65,7 +65,9 @@
     <div class="col-sm-6 text-end">
       {#if last_updated_date}
         Data last updated:
-        <abbr id="data-date" title="{last_updated_date} (UTC timezone)">{timeago.format(new Date(last_updated_date))}</abbr>
+        <abbr id="data-date" title="{last_updated_date} (UTC timezone)">
+          {timeago.format(new Date(last_updated_date))}
+        </abbr>
       {/if}
       (<PageLink page="status">Details</PageLink>)
     </div>
index 30d6bd97ac08957f9b088c18e88352390ab34e7f..074774d475d983d6017e52ef0549833f42a46588 100644 (file)
     text-align: right;
   }
 
-  
-  
-
   @media (max-width: 768px) {
     #map-position {
       top: 20px;
index df124f70e7e0a69e313e22712b76f02557e25fdb..0e2920aaa04e97fe305be07e0b814ec81c3e95c6 100644 (file)
@@ -16,4 +16,6 @@
   }
 </script>
 
-<a on:click|preventDefault|stopPropagation={handleClick} href={href} class={extra_classes}><slot></slot></a>
+<a on:click|preventDefault|stopPropagation={handleClick} href={href} class={extra_classes}>
+  <slot></slot>
+</a>
index 2fc6828e7f9034ce5ab9cec5bdef8c7c1a698d88..3b6c7133945a564e1098608e75325d611ef23976 100644 (file)
   <div id="searchresults">
 
     {#each aSearchResults as aResult, iResNum}
-      <div class="result" class:highlight={iResNum === iHighlightNum} data-position="{iResNum}" on:click|stopPropagation={handleClick}>
+      <div class="result"
+           class:highlight={iResNum === iHighlightNum}
+           data-position="{iResNum}"
+           on:click|stopPropagation={handleClick}>
         <div style="float:right">
           <MapIcon aPlace={aResult} />
         </div>
@@ -64,7 +67,9 @@
         <span class="type">{formatLabel(aResult)}</span>
         <p class="coords">{aResult.lat},{aResult.lon}</p>
 
-        <DetailsLink extra_classes="btn btn-outline-secondary btn-sm" feature={aResult}>details</DetailsLink>
+        <DetailsLink extra_classes="btn btn-outline-secondary btn-sm" feature={aResult}>
+          details
+        </DetailsLink>
       </div>
     {/each}
 
   }
 
   .result .coords {
-    display: none;  
+    display: none;
   }
 
   .noresults{
index bbd54d77cc0b0f4214be3975d2e7c26a92d9814d..cfea7c196beaf6b0bb1503c6482ccd137f42078b 100644 (file)
@@ -30,4 +30,8 @@ $: {
 }
 </script>
 
-<a on:click|preventDefault|stopPropagation={() => refresh_page('reverse', params)} href={href} class={extra_classes}><slot></slot></a>
+<a on:click|preventDefault|stopPropagation={() => refresh_page('reverse', params)}
+    href={href}
+    class={extra_classes}>
+  <slot></slot>
+</a>
index e50bbdfff59247ef12591f2190efcdbe5601f983..a43ad75866ace053f2b96083f14bc34591a80579 100644 (file)
 
 <ul class="nav nav-tabs">
   <li class="nav-item">
-    <a class="nav-link" class:active={!bStructuredSearch} data-bs-toggle="tab" href="#simple">Simple</a>
+    <a class="nav-link" class:active={!bStructuredSearch} data-bs-toggle="tab" href="#simple">
+      Simple
+    </a>
   </li>
   <li class="nav-item">
-    <a class="nav-link" class:active={bStructuredSearch} data-bs-toggle="tab" href="#structured">Structured</a>
+    <a class="nav-link" class:active={bStructuredSearch} data-bs-toggle="tab" href="#structured">
+      Structured
+    </a>
   </li>
 </ul>
 
       </div>
       <div class="col-auto">
         <button type="submit" class="btn btn-primary btn-sm mx-1">Search</button>
-        <input type="hidden" name="viewbox" value="{sViewBox || ''}" />
-        <input type="hidden" name="dedupe" value="{api_request_params.dedupe === 0 ? 0 : 1}" />
-        <input type="hidden" name="bounded" value="{api_request_params.bounded ? 1 : ''}" />
-        <input type="hidden" name="accept-language" value="{api_request_params['accept-language'] || ''}" />
-        <input type="hidden" name="countrycodes" value="{api_request_params.countrycodes || ''}"
-                                                      pattern="^[a-zA-Z]{'{2}'}(,[a-zA-Z]{'{2}'})*$" />
-        <input type="hidden" name="limit" value="{api_request_params.limit || ''}" />
-        <input type="hidden" name="polygon_threshold" value="{api_request_params.polygon_threshold || ''}" />
+        <input type="hidden"
+               name="viewbox" value="{sViewBox || ''}" />
+        <input type="hidden"
+               name="dedupe" value="{api_request_params.dedupe === 0 ? 0 : 1}" />
+        <input type="hidden"
+               name="bounded" value="{api_request_params.bounded ? 1 : ''}" />
+        <input type="hidden"
+               name="accept-language"value="{api_request_params['accept-language'] || ''}" />
+        <input type="hidden"
+               name="countrycodes" value="{api_request_params.countrycodes || ''}"
+                                   pattern="^[a-zA-Z]{'{2}'}(,[a-zA-Z]{'{2}'})*$" />
+        <input type="hidden"
+               name="limit" value="{api_request_params.limit || ''}" />
+        <input type="hidden"
+               name="polygon_threshold" value="{api_request_params.polygon_threshold || ''}" />
       </div>
     </UrlSubmitForm>
   </div>
       </div>
       <div class="col-auto">
         <button type="submit" class="btn btn-primary btn-sm">Search</button>
-        <input type="hidden" name="viewbox" value="{sViewBox || ''}" />
-        <input type="hidden" name="dedupe" value="{api_request_params.dedupe === 0 ? 0 : 1}" />
-        <input type="hidden" name="bounded" value="{api_request_params.bounded ? 1 : ''}" />
-        <input type="hidden" name="accept-language" value="{api_request_params['accept-language'] || ''}" />
-        <input type="hidden" name="countrycodes" value="{api_request_params.countrycodes || ''}"
-                                                pattern="^[a-zA-Z]{'{2}'}(,[a-zA-Z]{'{2}'})*$" />
-        <input type="hidden" name="limit" value="{api_request_params.limit || ''}" />
-        <input type="hidden" name="polygon_threshold" value="{api_request_params.polygon_threshold || ''}" />
+        <input type="hidden"
+               name="viewbox" value="{sViewBox || ''}" />
+        <input type="hidden"
+               name="dedupe" value="{api_request_params.dedupe === 0 ? 0 : 1}" />
+        <input type="hidden"
+               name="bounded" value="{api_request_params.bounded ? 1 : ''}" />
+        <input type="hidden"
+               name="accept-language" value="{api_request_params['accept-language'] || ''}" />
+        <input type="hidden"
+               name="countrycodes" value="{api_request_params.countrycodes || ''}"
+                                   pattern="^[a-zA-Z]{'{2}'}(,[a-zA-Z]{'{2}'})*$" />
+        <input type="hidden"
+               name="limit" value="{api_request_params.limit || ''}" />
+        <input type="hidden"
+               name="polygon_threshold" value="{api_request_params.polygon_threshold || ''}" />
       </div>
     </UrlSubmitForm>
   </div>
     <li>
       <div class="form-check form-check-inline">
         <label class="form-check-label" for="option_dedupe">deduplicate results</label>
-        <input type="checkbox" class="form-check-input api-param-setting"
-               id="option_dedupe" checked={api_request_params.dedupe === 0 ? 0 : 1} on:change={set_dedupe}>
+        <input type="checkbox"
+               class="form-check-input api-param-setting"
+               id="option_dedupe"
+               checked={api_request_params.dedupe === 0 ? 0 : 1}
+               on:change={set_dedupe}>
       </div>
     </li>
 
     <li>
       <label for="option_limit">Maximum number of results</label>
-      <input type="number" class="form-control form-control-sm d-inline w-auto api-param-setting"
+      <input type="number"
+             class="form-control form-control-sm d-inline w-auto api-param-setting"
              data-api-param="limit" id="option_limit" min="1" max="50"
              value="{api_request_params.limit || ''}"
              on:change={set_api_param}>
 
     <li>
       <label for="option_polygon_threshold">Polygon simplification</label>
-      <input type="number" class="form-control form-control-sm d-inline w-auto api-param-setting"
-             data-api-param="polygon_threshold" id="option_polygon_threshold" min="0.0"  max="1.0" step="0.001"
+      <input type="number"
+             class="form-control form-control-sm d-inline w-auto api-param-setting"
+             data-api-param="polygon_threshold" id="option_polygon_threshold"
+             min="0.0" max="1.0" step="0.001"
              value="{api_request_params.polygon_threshold || ''}"
              on:change={set_api_param}>
     </li>
 
     <li>
       <label for="accept_lang">Languages</label>
-      <input type="text" placeholder="e.g. en,zh-Hant" class="form-control form-control-sm d-inline w-auto api-param-setting"
+      <input type="text" placeholder="e.g. en,zh-Hant"
+             class="form-control form-control-sm d-inline w-auto api-param-setting"
              data-api-param="accept-language" id="accept_lang" size="15"
              value="{api_request_params['accept-language'] || ''}"
              on:change={set_api_param}>
 
     <li>
       <label for="option_ccode">Country Codes</label>
-      <input type="text" placeholder="e.g. de,gb" class="form-control form-control-sm d-inline w-auto api-param-setting"
+      <input type="text" placeholder="e.g. de,gb"
+            class="form-control form-control-sm d-inline w-auto api-param-setting"
              data-api-param="countrycodes" id="option_ccode" size="15"
              value="{api_request_params.countrycodes || ''}"
              pattern="^[a-zA-Z]{'{2}'}(,[a-zA-Z]{'{2}'})*$"
index c30f057ead9e89f8e84d85d6a5248c6a9c020050..276b56af6acbf18b485bc4390253f809ca0fe087 100644 (file)
   </div>
 </form>
 <small class="form-text text-muted">
-  OSM type+id (<em>N123</em>, <em>n123</em>, <em>W123</em>, <em>w123</em>, <em>R123</em>, <em>r123</em>),
+  OSM type+id (<em>N123</em>,
+               <em>n123</em>,
+               <em>W123</em>,
+               <em>w123</em>,
+               <em>R123</em>,
+               <em>r123</em>),
   Place id (<em>1234</em>) or
   URL (<em>https://openstreetmap.org/way/123</em>)
 </small>
index 01feea1e020935af537f0475b7df2bf2e46927a0..01f5a57dd6a182b141154e092273d097b1927e0b 100644 (file)
   }
 </script>
 
-<form on:submit|preventDefault={handle_submit} class="form-inline" role="search" accept-charset="UTF-8" action="">
+<form on:submit|preventDefault={handle_submit}
+      class="form-inline"
+      role="search"
+      accept-charset="UTF-8"
+      action="">
   <div class="row g-2">
     <slot></slot>
   </div>
index e4807304ba56164ddf8732996851193dd18076c0..6ce6a935f43d5dc03eff34b6ab2bad4aafa8f5fa 100644 (file)
@@ -16,4 +16,4 @@
     max-width: 800px;
     padding: 4em;
   }
-</style>
\ No newline at end of file
+</style>
index e5325e29ef59e59e33d62f64ec256e381a0563dd..1f6d84e079ff61be6922a711576828ddc64a9ac7 100644 (file)
               <InfoRow title="Admin Level">{aPlace.admin_level}</InfoRow>
             {/if}
             <InfoRow title="Search Rank">{aPlace.rank_search}</InfoRow>
-            <InfoRow title="Address Rank">{aPlace.rank_address} ({formatAddressRank(aPlace.rank_address)})</InfoRow>
+            <InfoRow title="Address Rank">
+              {aPlace.rank_address} ({formatAddressRank(aPlace.rank_address)})
+            </InfoRow>
             {#if aPlace.calculated_importance}
               <InfoRow title="Importance">
                   {aPlace.calculated_importance}
             <InfoRow title="OSM">{@html osmLink(aPlace)}</InfoRow>
             <InfoRow title="Place Id">
                {aPlace.place_id}
-               (<a href="https://nominatim.org/release-docs/develop/api/Output/#place_id-is-not-a-persistent-id">on this server</a>)
+               (<a href="https://nominatim.org/release-docs/develop/api/Output/#place_id-is-not-a-persistent-id">
+                 on this server
+               </a>)
             </InfoRow>
             {#if aPlace.calculated_wikipedia}
               <InfoRow title="Wikipedia Calculated">{@html wikipediaLink(aPlace)}</InfoRow>
             <InfoRow title="Computed Postcode">
               {#if aPlace.calculated_postcode}
                 {aPlace.calculated_postcode}
-                <DetailsPostcodeHint postcode={aPlace.calculated_postcode} lat={aPlace.centroid.coordinates[1]} lon={aPlace.centroid.coordinates[0]} />
+                <DetailsPostcodeHint postcode={aPlace.calculated_postcode}
+                                     lat={aPlace.centroid.coordinates[1]}
+                                     lon={aPlace.centroid.coordinates[0]} />
               {/if}
             </InfoRow>
             <InfoRow title="Address Tags"><InfoRowList items={aPlace.addresstags} /></InfoRow>
           <tbody>
             {#if aPlace.address}
               {#each aPlace.address as addressLine}
-                <DetailsOneRow addressLine={addressLine} bMarkUnusedLines={true} bDistanceInMeters={false} />
+                <DetailsOneRow addressLine={addressLine}
+                               bMarkUnusedLines={true}
+                               bDistanceInMeters={false} />
               {/each}
             {/if}
 
             {#if aPlace.linked_places}
               <tr class="all-columns"><td colspan="7"><h2>Linked Places</h2></td></tr>
               {#each aPlace.linked_places as addressLine}
-                <DetailsOneRow addressLine={addressLine} bMarkUnusedLines={true} bDistanceInMeters={true} />
+                <DetailsOneRow addressLine={addressLine}
+                               bMarkUnusedLines={true}
+                               bDistanceInMeters={true} />
               {/each}
             {/if}
 
   }
 
   tr.all-columns {
-    background-color: white !important; 
+    background-color: white !important;
     border: none;
   }
   tr.all-columns td {
index c3bfb78ed5e046683820b154ce928fa1d2fef9c3..1a29d56fe8daf225a03eda15bc92db29fc9c68d7 100644 (file)
 
       <dl>
         <dt>API Endpoint</dt>
-        <dd><a href={configuration.Nominatim_API_Endpoint}>{configuration.Nominatim_API_Endpoint}</a></dd>
+        <dd>
+          <a href={configuration.Nominatim_API_Endpoint}>
+            {configuration.Nominatim_API_Endpoint}
+          </a>
+        </dd>
 
         <dt>Software version</dt>
         <dd>{aStatusData.software_version}</dd>