From 4a310dcbbedcdc7221bdab3b5197d3eba2b25bc9 Mon Sep 17 00:00:00 2001 From: isUnknown Date: Tue, 9 Apr 2024 17:10:43 +0200 Subject: [PATCH] add icon to search field --- assets/css/src/html.css | 4 ++++ assets/css/src/nav.css | 23 ++++++++++++++++++++++- assets/images/icons/search.svg | 1 + site/snippets/nav.php | 23 ++++++++++++++++++++--- site/snippets/text-item.php | 10 ++++++---- site/templates/category.php | 2 +- site/templates/linear.php | 6 +++--- 7 files changed, 57 insertions(+), 12 deletions(-) create mode 100644 assets/images/icons/search.svg diff --git a/assets/css/src/html.css b/assets/css/src/html.css index 6c0a435..41f9c16 100644 --- a/assets/css/src/html.css +++ b/assets/css/src/html.css @@ -30,6 +30,10 @@ nav hr { margin-left: 0; } +input[type="text"]:focus-visible { + outline: none; +} + /* ================= SCROLLBAR ================= */ body, html { diff --git a/assets/css/src/nav.css b/assets/css/src/nav.css index 7a593a2..48bca91 100644 --- a/assets/css/src/nav.css +++ b/assets/css/src/nav.css @@ -61,7 +61,28 @@ overflow: auto; } -.panel > ul { +.search { + position: relative; +} +.search__input { + width: 100%; + background-color: transparent; + border: none; + border-bottom: 1px solid #fff; + color: #fff; + font-size: var(--font-size-m); + font-weight: var(--font-weight-light); + margin-bottom: var(--unit--vertical); +} +.search__icon { + position: absolute; + width: 1.1rem; + height: 1.1rem; + top: 0; + right: calc(var(--unit--horizontal) / 2); +} + +.panel__result .panel__items { margin-bottom: calc(var(--unit--vertical) * 4); } diff --git a/assets/images/icons/search.svg b/assets/images/icons/search.svg new file mode 100644 index 0000000..dfaf53a --- /dev/null +++ b/assets/images/icons/search.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/site/snippets/nav.php b/site/snippets/nav.php index 0bac55b..0161f19 100644 --- a/site/snippets/nav.php +++ b/site/snippets/nav.php @@ -10,8 +10,25 @@ >categories -