implemented search module
This commit is contained in:
parent
ac34bdba00
commit
24de4aa89e
@ -1,3 +1,7 @@
|
|||||||
|
main {
|
||||||
|
min-height: 70vh;
|
||||||
|
}
|
||||||
|
|
||||||
// section style
|
// section style
|
||||||
.section {
|
.section {
|
||||||
@apply py-24 xl:py-28;
|
@apply py-24 xl:py-28;
|
||||||
|
@ -50,6 +50,14 @@
|
|||||||
.search-wrapper-body {
|
.search-wrapper-body {
|
||||||
@apply dark:bg-darkmode-theme-light dark:shadow-none;
|
@apply dark:bg-darkmode-theme-light dark:shadow-none;
|
||||||
}
|
}
|
||||||
|
&.search-page {
|
||||||
|
.search-wrapper-body {
|
||||||
|
@apply dark:bg-transparent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.search-result-info em {
|
||||||
|
@apply dark:text-white;
|
||||||
|
}
|
||||||
.search-result-item {
|
.search-result-item {
|
||||||
@apply dark:bg-darkmode-body dark:border-darkmode-border p-4;
|
@apply dark:bg-darkmode-body dark:border-darkmode-border p-4;
|
||||||
.search-title {
|
.search-title {
|
||||||
@ -58,10 +66,10 @@
|
|||||||
u {
|
u {
|
||||||
@apply dark:text-darkmode-primary;
|
@apply dark:text-darkmode-primary;
|
||||||
}
|
}
|
||||||
// &:focus,
|
&:focus,
|
||||||
// &[aria-selected="true"],
|
&[aria-selected="true"],
|
||||||
// &:hover {
|
&:hover {
|
||||||
// @apply dark:bg-darkmode-primary/10;
|
@apply dark:bg-darkmode-primary/10;
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[hugoVersion]
|
[hugoVersion]
|
||||||
extended = true
|
extended = true
|
||||||
min = "0.112.3"
|
min = "0.112.4"
|
||||||
|
|
||||||
[[imports]]
|
[[imports]]
|
||||||
path = "github.com/gethugothemes/hugo-modules/search"
|
path = "github.com/gethugothemes/hugo-modules/search"
|
||||||
|
@ -19,8 +19,6 @@ theme_switcher = true
|
|||||||
theme_default = "dark" # available options [light/dark/system]
|
theme_default = "dark" # available options [light/dark/system]
|
||||||
# Main Sections
|
# Main Sections
|
||||||
mainSections = ["blog"]
|
mainSections = ["blog"]
|
||||||
# image gallery shortcode
|
|
||||||
image_gallery = true
|
|
||||||
# contact form action
|
# contact form action
|
||||||
contact_form_action = "#" # contact form works with [https://airform.io/] or [https://formspree.io]
|
contact_form_action = "#" # contact form works with [https://airform.io/] or [https://formspree.io]
|
||||||
# google tag manager, see https://developers.google.com/tag-manager/
|
# google tag manager, see https://developers.google.com/tag-manager/
|
||||||
|
4
exampleSite/content/english/search.md
Normal file
4
exampleSite/content/english/search.md
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
title: search
|
||||||
|
layout: search
|
||||||
|
---
|
@ -3,27 +3,27 @@ module hugoplate.netlify.app
|
|||||||
go 1.20
|
go 1.20
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/gethugothemes/hugo-modules/accordion v0.0.0-20230525102148-b021562ad2b0 // indirect
|
github.com/gethugothemes/hugo-modules/accordion v0.0.0-20230529094337-51de68b32b0a // indirect
|
||||||
github.com/gethugothemes/hugo-modules/adsense v0.0.0-20230525102148-b021562ad2b0 // indirect
|
github.com/gethugothemes/hugo-modules/adsense v0.0.0-20230529094337-51de68b32b0a // indirect
|
||||||
github.com/gethugothemes/hugo-modules/components/cookie-consent v0.0.0-20230525102148-b021562ad2b0 // indirect
|
github.com/gethugothemes/hugo-modules/components/cookie-consent v0.0.0-20230529094337-51de68b32b0a // indirect
|
||||||
github.com/gethugothemes/hugo-modules/components/custom-script v0.0.0-20230525102148-b021562ad2b0 // indirect
|
github.com/gethugothemes/hugo-modules/components/custom-script v0.0.0-20230529094337-51de68b32b0a // indirect
|
||||||
github.com/gethugothemes/hugo-modules/components/preloader v0.0.0-20230525102148-b021562ad2b0 // indirect
|
github.com/gethugothemes/hugo-modules/components/preloader v0.0.0-20230529094337-51de68b32b0a // indirect
|
||||||
github.com/gethugothemes/hugo-modules/components/render-link v0.0.0-20230525102148-b021562ad2b0 // indirect
|
github.com/gethugothemes/hugo-modules/components/render-link v0.0.0-20230529094337-51de68b32b0a // indirect
|
||||||
github.com/gethugothemes/hugo-modules/components/social-share v0.0.0-20230525102148-b021562ad2b0 // indirect
|
github.com/gethugothemes/hugo-modules/components/social-share v0.0.0-20230529094337-51de68b32b0a // indirect
|
||||||
github.com/gethugothemes/hugo-modules/gallery-slider v0.0.0-20230525102148-b021562ad2b0 // indirect
|
github.com/gethugothemes/hugo-modules/gallery-slider v0.0.0-20230529094337-51de68b32b0a // indirect
|
||||||
github.com/gethugothemes/hugo-modules/gzip-caching v0.0.0-20230525102148-b021562ad2b0 // indirect
|
github.com/gethugothemes/hugo-modules/gzip-caching v0.0.0-20230529094337-51de68b32b0a // indirect
|
||||||
github.com/gethugothemes/hugo-modules/icons/font-awesome v0.0.0-20230525102148-b021562ad2b0 // indirect
|
github.com/gethugothemes/hugo-modules/icons/font-awesome v0.0.0-20230529094337-51de68b32b0a // indirect
|
||||||
github.com/gethugothemes/hugo-modules/images v0.0.0-20230525102148-b021562ad2b0 // indirect
|
github.com/gethugothemes/hugo-modules/images v0.0.0-20230529094337-51de68b32b0a // indirect
|
||||||
github.com/gethugothemes/hugo-modules/modal v0.0.0-20230525102148-b021562ad2b0 // indirect
|
github.com/gethugothemes/hugo-modules/modal v0.0.0-20230529094337-51de68b32b0a // indirect
|
||||||
github.com/gethugothemes/hugo-modules/pwa v0.0.0-20230525102148-b021562ad2b0 // indirect
|
github.com/gethugothemes/hugo-modules/pwa v0.0.0-20230529094337-51de68b32b0a // indirect
|
||||||
github.com/gethugothemes/hugo-modules/search v0.0.0-20230525102148-b021562ad2b0 // indirect
|
github.com/gethugothemes/hugo-modules/search v0.0.0-20230529101731-b0c7eb0ba4f8 // indirect
|
||||||
github.com/gethugothemes/hugo-modules/seo-tools/basic-seo v0.0.0-20230525102148-b021562ad2b0 // indirect
|
github.com/gethugothemes/hugo-modules/seo-tools/basic-seo v0.0.0-20230529094337-51de68b32b0a // indirect
|
||||||
github.com/gethugothemes/hugo-modules/seo-tools/google-tag-manager v0.0.0-20230525102148-b021562ad2b0 // indirect
|
github.com/gethugothemes/hugo-modules/seo-tools/google-tag-manager v0.0.0-20230529094337-51de68b32b0a // indirect
|
||||||
github.com/gethugothemes/hugo-modules/seo-tools/site-verifications v0.0.0-20230525102148-b021562ad2b0 // indirect
|
github.com/gethugothemes/hugo-modules/seo-tools/site-verifications v0.0.0-20230529094337-51de68b32b0a // indirect
|
||||||
github.com/gethugothemes/hugo-modules/shortcodes/button v0.0.0-20230525102148-b021562ad2b0 // indirect
|
github.com/gethugothemes/hugo-modules/shortcodes/button v0.0.0-20230529094337-51de68b32b0a // indirect
|
||||||
github.com/gethugothemes/hugo-modules/shortcodes/codepen v0.0.0-20230525102148-b021562ad2b0 // indirect
|
github.com/gethugothemes/hugo-modules/shortcodes/codepen v0.0.0-20230529094337-51de68b32b0a // indirect
|
||||||
github.com/gethugothemes/hugo-modules/shortcodes/notice v0.0.0-20230525102148-b021562ad2b0 // indirect
|
github.com/gethugothemes/hugo-modules/shortcodes/notice v0.0.0-20230529094337-51de68b32b0a // indirect
|
||||||
github.com/gethugothemes/hugo-modules/tab v0.0.0-20230525102148-b021562ad2b0 // indirect
|
github.com/gethugothemes/hugo-modules/tab v0.0.0-20230529094337-51de68b32b0a // indirect
|
||||||
github.com/gethugothemes/hugo-modules/table-of-contents v0.0.0-20230525102148-b021562ad2b0 // indirect
|
github.com/gethugothemes/hugo-modules/table-of-contents v0.0.0-20230529094337-51de68b32b0a // indirect
|
||||||
github.com/gethugothemes/hugo-modules/videos v0.0.0-20230525102148-b021562ad2b0 // indirect
|
github.com/gethugothemes/hugo-modules/videos v0.0.0-20230529094337-51de68b32b0a // indirect
|
||||||
)
|
)
|
||||||
|
@ -21,6 +21,7 @@ const purgecss = {
|
|||||||
/^:is/,
|
/^:is/,
|
||||||
/^dark/,
|
/^dark/,
|
||||||
/^search/,
|
/^search/,
|
||||||
|
/^[aria-selected]/,
|
||||||
/dark/,
|
/dark/,
|
||||||
/show/,
|
/show/,
|
||||||
/dragging/,
|
/dragging/,
|
||||||
|
@ -20,9 +20,8 @@
|
|||||||
{{ else }}
|
{{ else }}
|
||||||
{{ partial "preloader.html" . }}
|
{{ partial "preloader.html" . }}
|
||||||
|
|
||||||
|
|
||||||
<!-- tailwind size indicator -->
|
<!-- tailwind size indicator -->
|
||||||
{{ partialCached "components/tw-size-indicator.html" . }}
|
{{ partial "components/tw-size-indicator.html" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|
||||||
@ -30,7 +29,6 @@
|
|||||||
{{ partial "essentials/header.html" . }}
|
{{ partial "essentials/header.html" . }}
|
||||||
{{ partial "search-modal.html" (dict "Context" . ) }}
|
{{ partial "search-modal.html" (dict "Context" . ) }}
|
||||||
|
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
{{ block "main" . }}{{ end }}
|
{{ block "main" . }}{{ end }}
|
||||||
</main>
|
</main>
|
||||||
|
11
layouts/_default/search.html
Normal file
11
layouts/_default/search.html
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{{ define "main" }}
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
{{ partial "search-page.html" (dict "Context" . "Class" "your-custom-class") }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{ end }}
|
Loading…
Reference in New Issue
Block a user