From 17b12bbceddcb3f0a036035feddc35e3e4b64cb7 Mon Sep 17 00:00:00 2001 From: SIGSTACKFAULT Date: Wed, 15 May 2024 13:46:17 -0400 Subject: [PATCH 01/37] add search icon --- static/assets/search.svg | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 static/assets/search.svg diff --git a/static/assets/search.svg b/static/assets/search.svg new file mode 100644 index 0000000000..ad0c592403 --- /dev/null +++ b/static/assets/search.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file From 8ec45158756aa0b9ed17479a9aa8c2e52c56d3ed Mon Sep 17 00:00:00 2001 From: SIGSTACKFAULT Date: Sun, 26 May 2024 21:12:54 -0400 Subject: [PATCH 02/37] on second thought, hard-code the svg. --- sass/components/_search.scss | 5 +++++ sass/site.scss | 1 + static/assets/search.svg | 4 ---- templates/layouts/base.html | 4 ++++ templates/macros/search.html | 14 ++++++++++++++ 5 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 sass/components/_search.scss delete mode 100644 static/assets/search.svg create mode 100644 templates/macros/search.html diff --git a/sass/components/_search.scss b/sass/components/_search.scss new file mode 100644 index 0000000000..f64f3964ef --- /dev/null +++ b/sass/components/_search.scss @@ -0,0 +1,5 @@ +.search__icon { + height: 1em; + fill: $default-color; + aspect-ratio: 1/1; +} diff --git a/sass/site.scss b/sass/site.scss index 1f9f0e089e..3e0f6429e4 100644 --- a/sass/site.scss +++ b/sass/site.scss @@ -45,6 +45,7 @@ @import "components/on-this-page"; @import "components/page-with-menu"; @import "components/pr-list"; +@import "components/search"; @import "components/sponsors"; @import "components/syntax-theme"; @import "components/tree-menu"; diff --git a/static/assets/search.svg b/static/assets/search.svg deleted file mode 100644 index ad0c592403..0000000000 --- a/static/assets/search.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/templates/layouts/base.html b/templates/layouts/base.html index b109aceaad..74075af571 100644 --- a/templates/layouts/base.html +++ b/templates/layouts/base.html @@ -1,4 +1,5 @@ {% import "macros/header.html" as header_macros %} +{% import "macros/search.html" as search %} {% import "macros/public_draft.html" as public_draft %} {# Shortcut to get the section/page. This variable will have a value except in some special pages like `404.html`. #} @@ -162,6 +163,9 @@ {% block mobile_page_menu %}{% endblock mobile_page_menu %}