From 9b5bfbf28048eb193f5ba9bd01379961474d58e5 Mon Sep 17 00:00:00 2001 From: Mesut GENEZ Date: Thu, 20 Jun 2024 14:11:46 +0300 Subject: [PATCH] notification componenets --- handler/web/notification.go | 2 +- views/components/notification/email.gohtml | 4 +- views/components/notification/list.gohtml | 44 +++++++++++++++++- views/components/notification/message.gohtml | 4 +- views/components/notification/new.gohtml | 4 +- views/pages/notification.gohtml | 48 ++------------------ 6 files changed, 53 insertions(+), 53 deletions(-) diff --git a/handler/web/notification.go b/handler/web/notification.go index 9b6e4fd..13264ca 100644 --- a/handler/web/notification.go +++ b/handler/web/notification.go @@ -9,5 +9,5 @@ import ( type NotificationHandler struct{} func (h *NotificationHandler) HomeHandler(w http.ResponseWriter, r *http.Request) error { - return config.Render(w, "notification", map[string]any{}) + return config.Render(w, "notification", map[string]any{}, "notification/list", "notification/email", "notification/message", "notification/new") } diff --git a/views/components/notification/email.gohtml b/views/components/notification/email.gohtml index f831c61..7a13a71 100644 --- a/views/components/notification/email.gohtml +++ b/views/components/notification/email.gohtml @@ -1,7 +1,7 @@ {{template "base" . }} -{{define "webhookNew" }} +{{define "notificationEmail" }} -New Webhook +notification email {{end}} \ No newline at end of file diff --git a/views/components/notification/list.gohtml b/views/components/notification/list.gohtml index f831c61..0cd616c 100644 --- a/views/components/notification/list.gohtml +++ b/views/components/notification/list.gohtml @@ -1,7 +1,47 @@ {{template "base" . }} -{{define "webhookNew" }} +{{define "notificationList" }} -New Webhook + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#FirstLastHandle
1MarkOtto@mdo
2JacobThornton@fat
3Larry the Bird@twitter
+ +
+ +
{{end}} \ No newline at end of file diff --git a/views/components/notification/message.gohtml b/views/components/notification/message.gohtml index f831c61..385cbbb 100644 --- a/views/components/notification/message.gohtml +++ b/views/components/notification/message.gohtml @@ -1,7 +1,7 @@ {{template "base" . }} -{{define "webhookNew" }} +{{define "notificationMessage" }} -New Webhook +notification Message {{end}} \ No newline at end of file diff --git a/views/components/notification/new.gohtml b/views/components/notification/new.gohtml index f831c61..817d016 100644 --- a/views/components/notification/new.gohtml +++ b/views/components/notification/new.gohtml @@ -1,7 +1,7 @@ {{template "base" . }} -{{define "webhookNew" }} +{{define "notificationNew" }} -New Webhook +notification new {{end}} \ No newline at end of file diff --git a/views/pages/notification.gohtml b/views/pages/notification.gohtml index 2d20ce9..1cf4018 100644 --- a/views/pages/notification.gohtml +++ b/views/pages/notification.gohtml @@ -23,56 +23,16 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#FirstLastHandle
1MarkOtto@mdo
2JacobThornton@fat
3Larry the Bird@twitter
- -
- -
+ {{block "notificationList" .}}{{end}}
- emails + {{block "notificationEmail" .}}{{end}}
- messages + {{block "notificationMessage" .}}{{end}}
- def + {{block "notificationNew" .}}{{end}}