modified: app.py
modified: templates/base.html modified: templates/index.html
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
<svg class="home-search-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||
<circle cx="11" cy="11" r="8"/><path d="m21 21-4.35-4.35"/>
|
||||
</svg>
|
||||
<input type="hidden" name="lang" value="{{ lang }}">
|
||||
<input type="text" name="ort" id="home-ort" placeholder="{{ T.home_placeholder }}" required autofocus/>
|
||||
<ul class="ac-list" id="home-ac"></ul>
|
||||
</div>
|
||||
@@ -61,7 +62,7 @@ document.getElementById("btn-location").addEventListener("click", function() {
|
||||
this.textContent = _i18n.locating;
|
||||
this.disabled = true;
|
||||
navigator.geolocation.getCurrentPosition(
|
||||
pos => { window.location = `/wetter?lat=${pos.coords.latitude}&lon=${pos.coords.longitude}&ort=Mein+Standort`; },
|
||||
pos => { window.location = `/wetter?lat=${pos.coords.latitude}&lon=${pos.coords.longitude}&ort=Mein+Standort&lang={{ lang }}`; },
|
||||
() => { this.textContent = _i18n.locationUnavailable; this.disabled = false; }
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user