added search suggestions

This commit is contained in:
partisan 2024-08-21 22:36:45 +02:00
parent 56e527d337
commit fd78b1d4fa
4 changed files with 482 additions and 0 deletions

View file

@ -9,6 +9,7 @@
<link rel="search" type="application/opensearchdescription+xml" title="Ocásek" href="/opensearch.xml">
</head>
<body>
<script defer src="/static/js/autocomplete.js"></script>
<script>
document.addEventListener('DOMContentLoaded', function () {
// Define the updateSettings function first
@ -83,6 +84,10 @@
<div class="wrapper">
<input type="text" name="q" autofocus id="search-input" placeholder="Type to search..." />
<button id="search-wrapper-ico" class="material-icons-round" name="t" value="text" type="submit">search</button>
<div class="autocomplete">
<ul>
</ul>
</div>
<!-- <a id="clearSearch" class="material-icons-round">close</a> -->
</div>
<div class="search-button-wrapper">