add autofocus to search field
This commit is contained in:
parent
cbbf5abf04
commit
f30522fbd4
@ -1,8 +1,8 @@
|
|||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
|
|
||||||
<link rel="stylesheet" href="https://unpkg.com/leaflet@^1.7.1/dist/leaflet.css" />
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet@1.9.4/dist/leaflet.min.css" />
|
||||||
|
|
||||||
<script src="https://unpkg.com/leaflet@^1.7.1/dist/leaflet.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/leaflet@1.9.4/dist/leaflet.min.js"></script>
|
||||||
|
|
||||||
<main data-pagefind-body>
|
<main data-pagefind-body>
|
||||||
<section class="section pb-0">
|
<section class="section pb-0">
|
||||||
|
@ -17,11 +17,16 @@
|
|||||||
<link rel="shortcut icon" href="{{ `media/favicon.png` | absURL }}" type="image/x-icon">
|
<link rel="shortcut icon" href="{{ `media/favicon.png` | absURL }}" type="image/x-icon">
|
||||||
<link rel="icon" href="{{ `media/favicon.png` | absURL }}" type="image/x-icon">
|
<link rel="icon" href="{{ `media/favicon.png` | absURL }}" type="image/x-icon">
|
||||||
|
|
||||||
|
{{ range .Site.Params.plugins.head_js }}
|
||||||
|
<script src="{{ . | absURL }}" type="text/javascript"></script>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
<link href="/pagefind/pagefind-ui.css" rel="stylesheet">
|
<link href="/pagefind/pagefind-ui.css" rel="stylesheet">
|
||||||
<script src="/pagefind/pagefind-ui.js" type="text/javascript"></script>
|
<script src="/pagefind/pagefind-ui.js" type="text/javascript"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
window.addEventListener('DOMContentLoaded', (event) => {
|
($ => {
|
||||||
|
$(window).on('DOMContentLoaded', () => {
|
||||||
new PagefindUI({
|
new PagefindUI({
|
||||||
element: "#search",
|
element: "#search",
|
||||||
translations: {
|
translations: {
|
||||||
@ -30,14 +35,14 @@
|
|||||||
clear_search: "Löschen"
|
clear_search: "Löschen"
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('#search').addEventListener('shown.bs.modal', () => {
|
||||||
|
$('.pagefind-ui__search-input input').focus();
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
})(jQuery);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
{{ range .Site.Params.plugins.head_js }}
|
|
||||||
<script src="{{ . | absURL }}"></script>
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var _paq = window._paq = window._paq || [];
|
var _paq = window._paq = window._paq || [];
|
||||||
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
|
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user