From eae48b3762ff062932ff7bff86963442a23c5b57 Mon Sep 17 00:00:00 2001 From: daudix Date: Wed, 2 Oct 2024 03:41:21 +0300 Subject: [PATCH] Focus search bar when open and allow opening it with [/] --- CHANGELOG.md | 5 + templates/partials/search.html | 358 +++++++++++++++++---------------- 2 files changed, 188 insertions(+), 175 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ba0f002..656ffd1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased](https://codeberg.org/daudix/duckquill/compare/v5.3.2...main) +### Changed + +- Allow opening search by pressing the slash key. +- Focus search after opening it. + ## [5.3.2](https://codeberg.org/daudix/duckquill/compare/v5.3.1...v5.3.2) ### Fixed diff --git a/templates/partials/search.html b/templates/partials/search.html index 6f0a4a3..5e6fb5f 100644 --- a/templates/partials/search.html +++ b/templates/partials/search.html @@ -1,206 +1,214 @@ {#- Based on https://github.com/getzola/zola/blob/1ac1231de1e342bbaf4d7a51a8a9a40ea152e246/docs/static/search.js -#}