Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add the hb.theme_start.search_input_text parameter #79

Merged
merged 1 commit into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion exampleSite/config/_default/params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ hb:
github: hbstack/theme-start
paypal: razonyang
kofi: razonyang
# theme_start:
theme_start:
search_input_text: HB Framework
# search_engines:
# google:
# weight: 1
Expand Down
22 changes: 11 additions & 11 deletions exampleSite/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ replace (

require (
github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/v2 v2.21100.20000 // indirect
github.com/hbstack/background-image v0.1.1 // indirect
github.com/hbstack/base v0.2.1 // indirect
github.com/hbstack/footer v0.2.4 // indirect
github.com/hbstack/hb v0.7.1 // indirect
github.com/hbstack/header v0.9.0 // indirect
github.com/hbstack/header/modules/language-picker v0.1.14 // indirect
github.com/hbstack/header/modules/socials v0.1.20 // indirect
github.com/hbstack/header/modules/theme-toggle v0.1.14 // indirect
github.com/hbstack/background-image v0.2.0 // indirect
github.com/hbstack/base v0.4.1 // indirect
github.com/hbstack/footer v0.2.7 // indirect
github.com/hbstack/hb v0.8.0 // indirect
github.com/hbstack/header v0.12.4 // indirect
github.com/hbstack/header/modules/language-picker v0.1.23 // indirect
github.com/hbstack/header/modules/socials v0.1.28 // indirect
github.com/hbstack/header/modules/theme-toggle v0.4.3 // indirect
github.com/hbstack/theme-start v0.0.0-20230915145637-74af94a738a8 // indirect
github.com/hbstack/theme-start/engines/baidu v0.0.0-00010101000000-000000000000 // indirect
github.com/hbstack/theme-start/engines/bing v0.0.0-00010101000000-000000000000 // indirect
Expand All @@ -33,8 +33,8 @@ require (
github.com/hbstack/theme-start/engines/wikipedia v0.0.0-00010101000000-000000000000 // indirect
github.com/hbstack/theme-start/engines/yahoo v0.0.0-00010101000000-000000000000 // indirect
github.com/hbstack/theme-start/engines/yandex v0.0.0-00010101000000-000000000000 // indirect
github.com/hugomods/icons/vendors/bootstrap v0.5.0 // indirect
github.com/hugomods/icons/vendors/bootstrap v0.5.2 // indirect
github.com/hugomods/icons/vendors/font-awesome v0.6.1 // indirect
github.com/hugomods/icons/vendors/simple-icons v1.0.13 // indirect
github.com/hugomods/seo/modules/favicons v0.2.0 // indirect
github.com/hugomods/icons/vendors/simple-icons v1.0.26 // indirect
github.com/hugomods/seo/modules/favicons v0.2.1 // indirect
)
22 changes: 22 additions & 0 deletions exampleSite/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,48 @@ github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/v2 v2.21100.20000 h1:GZxx4Hc+y
github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/v2 v2.21100.20000/go.mod h1:mFberT6ZtcchrsDtfvJM7aAH2bDKLdOnruUHl0hlapI=
github.com/hbstack/background-image v0.1.1 h1:bI/yeQDnISAadXl/TGEpQBPhSF6uKmtSMxxqZ47byNo=
github.com/hbstack/background-image v0.1.1/go.mod h1:KsoEKad66gNJQmFiudqrrPq8XKkIkrHn53tp32DzfSY=
github.com/hbstack/background-image v0.2.0 h1:wJJ4okZIUasDWcVNmkwSj9oxlj40Fpl3KKHVZ+1BFII=
github.com/hbstack/background-image v0.2.0/go.mod h1:2lZhfQwZy7SWVmRU/kPEaEgzgXypBnXBlipQweJbWPQ=
github.com/hbstack/base v0.2.1 h1:u3lkO9MhjA6HomkJ6hzt0R7sA0u330bo6lbxVrF1FiI=
github.com/hbstack/base v0.2.1/go.mod h1:6SqazoH3UBSuwSHV1kyEDWcIJg+Cef++w8p45VSsSHQ=
github.com/hbstack/base v0.4.1 h1:rRmnQonYwixoo/MzDAGOH5S1aIB6/ArPRueRDil0cnc=
github.com/hbstack/base v0.4.1/go.mod h1:ihI8NSFogNNXLpt7vWEYTGgSWE9UvgnfyFKJqmyOauU=
github.com/hbstack/footer v0.2.4 h1:zWB1BaanVxCQ/rpmo4bpREo4OyNo7sYTL3wjPH9Y35E=
github.com/hbstack/footer v0.2.4/go.mod h1:L0ZYdYRROlGUGLRA9QchkYeByHIff/EU4WKRdAUW+E8=
github.com/hbstack/footer v0.2.7 h1:JJgBZWJyB7UzXSifH2KMFd9ma5yLL3m/pSroMaX+kc4=
github.com/hbstack/footer v0.2.7/go.mod h1:MqglUBsBvlatiE5utMwLlnwHxLLOPe89zFmuD4HM37M=
github.com/hbstack/hb v0.7.1 h1:bnlE/KrhOKADI5aydZG822kT1o9QR8I8TdOWugqaMJE=
github.com/hbstack/hb v0.7.1/go.mod h1:S/08mx1tK6yxjQIkSqvpqG8HrBzMBDJq1WC5QjXW9p0=
github.com/hbstack/hb v0.8.0 h1:HvHXRGhma74DcpZD+VEkyYa07aZTbxhCEXU/j0sz7Lo=
github.com/hbstack/hb v0.8.0/go.mod h1:Z+gW6UsRwuivPcqqEb67h7vSQwSCWOr7KxNXkhcsEzM=
github.com/hbstack/header v0.9.0 h1:lhFJYaaOSuuQ7/vavg9pULZ/po2JcoZrAiISh9Iqw70=
github.com/hbstack/header v0.9.0/go.mod h1:ihpMPmzro0155ZHtd3t95C1R5NN61JUZ/0Hng3GpiGo=
github.com/hbstack/header v0.12.4 h1:IF8pjf7QL2ZllENfxSoF1CmiBHXj4aK9ndag1ruL4Xk=
github.com/hbstack/header v0.12.4/go.mod h1:4XKdpn0KyL9VN8tFRsVqU8AF5eOM1Gw5+vvhXlsF/X0=
github.com/hbstack/header/modules/language-picker v0.1.14 h1:TqbubJw1QZksJ/q/jqcHcRhY3PLDDmoYnY+3bCowjsE=
github.com/hbstack/header/modules/language-picker v0.1.14/go.mod h1:rHukdXlCDa5duCRq74+gMSdYlx7iyTMYwq3gdYrDGRA=
github.com/hbstack/header/modules/language-picker v0.1.23 h1:apumx/b8JvN3BmDH4GwY2OOZbsokeLOGsNKtbibWbMU=
github.com/hbstack/header/modules/language-picker v0.1.23/go.mod h1:rLN2zbcsGXWsyOfVedSEZk8V7N4/Nk/iyuVm8wjBkuM=
github.com/hbstack/header/modules/socials v0.1.20 h1:gA9SoyapmMxMhdKXvVepuZhkvqaenl8zkHtV+bpVi/4=
github.com/hbstack/header/modules/socials v0.1.20/go.mod h1:6XZezBRhEqDighVhF57mdJlUzlgpnmLy2UsI/blFBac=
github.com/hbstack/header/modules/socials v0.1.28 h1:C7E+aBhFdoLUgzlYtj5d2/Lxqbv6jGH0SMwyffTnk8E=
github.com/hbstack/header/modules/socials v0.1.28/go.mod h1:N3tqnzmImktAMRJlwEBp7CX9zb2xrc4nyV4eSjNmGNM=
github.com/hbstack/header/modules/theme-toggle v0.1.14 h1:iC7ZRbNo72qn1Vudnu5DAn2pr0gONrTunrrMbG2lPok=
github.com/hbstack/header/modules/theme-toggle v0.1.14/go.mod h1:7W99Yalps+pF9HviB0UB+M7bjX/Xd+LA17O0JqKceUs=
github.com/hbstack/header/modules/theme-toggle v0.4.3 h1:dIJAJRMnXJ6GSWhlokxWNLXW2BJzD8kjSavke7jvp6o=
github.com/hbstack/header/modules/theme-toggle v0.4.3/go.mod h1:RnAxM/75D5uPWQ/9xsYIImgxfJEFGwS/BBklOXxd4hM=
github.com/hugomods/icons v0.6.0 h1:G6RU93okhPPRDh/jqcew9gwkcYpSpg0rCBv4S6yUAFw=
github.com/hugomods/icons/vendors/bootstrap v0.5.0 h1:CHEGk677heq2kJZa7XsGHRc3Hwizl9NFkmNw146OVm0=
github.com/hugomods/icons/vendors/bootstrap v0.5.0/go.mod h1:kfC17VWV+tNi6PGF4AY7CJBBa1/HEgWxCYq2kNOdcdI=
github.com/hugomods/icons/vendors/bootstrap v0.5.2 h1:A/6sY9tcTY0kGdz+yJOotRutWaXLXHbwHgI5NDZ4nvk=
github.com/hugomods/icons/vendors/bootstrap v0.5.2/go.mod h1:O+9YwW2aJiOIC7R/zmSnoiZjiix1HMJD5J7NRLxRg+M=
github.com/hugomods/icons/vendors/font-awesome v0.6.1 h1:MyYF67fPthN4EDkT/IwY0ydowxzE6J/oKFTltOCY2vY=
github.com/hugomods/icons/vendors/font-awesome v0.6.1/go.mod h1:kmMci4qX8yTQPT28sskzKRudJiQAAiZZugjNbkakRhk=
github.com/hugomods/icons/vendors/simple-icons v1.0.13 h1:zLR5GIZbCOjH2Ez+0xjbR0Bea5ViAz2I9iRZ0HuDD/4=
github.com/hugomods/icons/vendors/simple-icons v1.0.13/go.mod h1:Ks+LDP1NgOaceeXthrkv6z/r8cJYPMp5uaYPpSrs13M=
github.com/hugomods/icons/vendors/simple-icons v1.0.26 h1:mqT9Iu0u/8O/2W0pF/7c7/3r0cwEKTFusqJWPGqnfME=
github.com/hugomods/icons/vendors/simple-icons v1.0.26/go.mod h1:TM3sfNzBmqrckH18wYC0ksdsqvZFpZULE0gnbSeNoUY=
github.com/hugomods/seo/modules/favicons v0.2.0 h1:pzQMocbHHMNNiuE5vsCxE4qqaJBprYAUX4EOoiF+ynM=
github.com/hugomods/seo/modules/favicons v0.2.0/go.mod h1:xFDhrpWUZR4NMMVkilzT6xFBHiF5eyCQ8PlzOS2K9lY=
github.com/hugomods/seo/modules/favicons v0.2.1 h1:9FP4DIbdmBhmUpBuJVJYo60iwv9Xc/XNQX1mT8zCNj0=
github.com/hugomods/seo/modules/favicons v0.2.1/go.mod h1:xFDhrpWUZR4NMMVkilzT6xFBHiF5eyCQ8PlzOS2K9lY=
1 change: 1 addition & 0 deletions hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ icon = "images/logo.png"
[params.hb.header]

[params.hb.theme_start]
search_input_text = ""
2 changes: 2 additions & 0 deletions layouts/partials/hb/modules/theme-start/form.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{{- $engines := partialCached "hb/modules/theme-start/functions/engines" . }}
{{- $preferredType := index (index $engines 0).types 0 }}
{{- $inputText := default "" site.Params.hb.theme_start.search_input_text }}
{{ partialCached "hb/modules/theme-start/result-types" $engines }}
<form
class="form hb-start-search-form position-relative mb-3 mb-md-4"
Expand All @@ -8,6 +9,7 @@
<input
class="form-control form-control-lg rounded-pill w-100 hb-start-search-input shadow-sm"
aria-label="Keywords"
{{ with $inputText }}value="{{ . }}"{{ end }}
name="{{ $preferredType.input_name }}" />
{{ partialCached "hb/modules/theme-start/engines" $engines }}
<button
Expand Down