From b2a2b49abec5e0962ac064c0313e900bc2491c50 Mon Sep 17 00:00:00 2001 From: Asaf Gartner Date: Thu, 10 Feb 2022 22:27:28 +0200 Subject: [PATCH] Added the search bar to the footer --- public/style.css | 8 ++------ src/rawdata/scss/_core.scss | 6 ------ src/templates/src/include/footer.html | 5 +++++ src/templates/types.go | 1 + src/website/base_data.go | 1 + 5 files changed, 9 insertions(+), 12 deletions(-) diff --git a/public/style.css b/public/style.css index 2ceadad..374ef74 100644 --- a/public/style.css +++ b/public/style.css @@ -7793,12 +7793,8 @@ article code { vertical-align: top; width: 90%; } -.site-search { - width: 100%; } - .site-search:focus { - width: 200%; } - .site-search[type=text].lite { - transition: border-bottom-color 60ms ease-in-out, width 300ms ease; } +.site-search[type=text].lite { + transition: border-bottom-color 60ms ease-in-out, width 300ms ease; } #search_button_homepage { margin: 0px; diff --git a/src/rawdata/scss/_core.scss b/src/rawdata/scss/_core.scss index e1419e3..53015ef 100644 --- a/src/rawdata/scss/_core.scss +++ b/src/rawdata/scss/_core.scss @@ -720,12 +720,6 @@ footer { } .site-search { - width: 100%; - - &:focus { - width: 200%; - } - &[type=text].lite { // wow CSS selector priority sucks diff --git a/src/templates/src/include/footer.html b/src/templates/src/include/footer.html index cdf25b4..2d1ed7a 100644 --- a/src/templates/src/include/footer.html +++ b/src/templates/src/include/footer.html @@ -29,4 +29,9 @@ Contact +
+ + + +
diff --git a/src/templates/types.go b/src/templates/types.go index 915a1e7..84832df 100644 --- a/src/templates/types.go +++ b/src/templates/types.go @@ -75,6 +75,7 @@ type Footer struct { ProjectIndexUrl string ForumsUrl string ContactUrl string + SearchActionUrl string } type Thread struct { diff --git a/src/website/base_data.go b/src/website/base_data.go index 9a46527..2960253 100644 --- a/src/website/base_data.go +++ b/src/website/base_data.go @@ -84,6 +84,7 @@ func getBaseData(c *RequestContext, title string, breadcrumbs []templates.Breadc ProjectIndexUrl: hmnurl.BuildProjectIndex(1), ForumsUrl: hmnurl.HMNProjectContext.BuildForum(nil, 1), ContactUrl: hmnurl.BuildContactPage(), + SearchActionUrl: "https://duckduckgo.com", }, }