summaryrefslogtreecommitdiff
path: root/internal/handlers/elements.go
diff options
context:
space:
mode:
authorGrailFinder <wohilas@gmail.com>2024-05-29 08:42:36 +0300
committerGrailFinder <wohilas@gmail.com>2024-05-29 08:42:36 +0300
commitd0ec9f38b17dadf4c244904e28e064d6ad7c5674 (patch)
treec9edf41291ed0a0d3bc12d3293cb013351d62d3b /internal/handlers/elements.go
parent9b52a88e971e70facc74778c133244f8a93b1f31 (diff)
Feat: add recommendations [wip]
Diffstat (limited to 'internal/handlers/elements.go')
-rw-r--r--internal/handlers/elements.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/internal/handlers/elements.go b/internal/handlers/elements.go
index 62c632b..965281a 100644
--- a/internal/handlers/elements.go
+++ b/internal/handlers/elements.go
@@ -22,3 +22,21 @@ func (h *Handlers) ServeHideForm(w http.ResponseWriter, r *http.Request) {
}
tmpl.ExecuteTemplate(w, "showformbtn", nil)
}
+
+func (h *Handlers) ShowRecommended(w http.ResponseWriter, r *http.Request) {
+ tmpl, err := template.ParseGlob("components/*.html")
+ if err != nil {
+ abortWithError(w, err.Error())
+ return
+ }
+ tmpl.ExecuteTemplate(w, "showformbtn", nil)
+}
+
+func (h *Handlers) HideRecommended(w http.ResponseWriter, r *http.Request) {
+ tmpl, err := template.ParseGlob("components/*.html")
+ if err != nil {
+ abortWithError(w, err.Error())
+ return
+ }
+ tmpl.ExecuteTemplate(w, "showformbtn", nil)
+}