From af87f2e139a5f2aabb8742058071044a631f322c Mon Sep 17 00:00:00 2001 From: Mesut GENEZ Date: Thu, 20 Jun 2024 14:08:44 +0300 Subject: [PATCH] group componenets --- handler/web/group.go | 2 +- views/components/group/list.gohtml | 47 ++++++++++++++++++++ views/components/group/new.gohtml | 7 +++ views/components/notification/email.gohtml | 7 +++ views/components/notification/list.gohtml | 7 +++ views/components/notification/message.gohtml | 7 +++ views/components/notification/new.gohtml | 7 +++ views/components/request/header.gohtml | 7 +++ views/components/request/new.gohtml | 7 +++ views/pages/group.gohtml | 44 +----------------- 10 files changed, 99 insertions(+), 43 deletions(-) create mode 100644 views/components/group/list.gohtml create mode 100644 views/components/group/new.gohtml create mode 100644 views/components/notification/email.gohtml create mode 100644 views/components/notification/list.gohtml create mode 100644 views/components/notification/message.gohtml create mode 100644 views/components/notification/new.gohtml create mode 100644 views/components/request/header.gohtml create mode 100644 views/components/request/new.gohtml diff --git a/handler/web/group.go b/handler/web/group.go index 288ddad..7ba4427 100644 --- a/handler/web/group.go +++ b/handler/web/group.go @@ -9,5 +9,5 @@ import ( type GroupHandler struct{} func (h *GroupHandler) HomeHandler(w http.ResponseWriter, r *http.Request) error { - return config.Render(w, "group", map[string]any{}) + return config.Render(w, "group", map[string]any{}, "group/list", "group/new") } diff --git a/views/components/group/list.gohtml b/views/components/group/list.gohtml new file mode 100644 index 0000000..707cf0c --- /dev/null +++ b/views/components/group/list.gohtml @@ -0,0 +1,47 @@ +{{template "base" . }} + +{{define "groupList" }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#FirstLastHandle
1MarkOtto@mdo
2JacobThornton@fat
3Larry the Bird@twitter
+ +
+ +
+ +{{end}} \ No newline at end of file diff --git a/views/components/group/new.gohtml b/views/components/group/new.gohtml new file mode 100644 index 0000000..5c9a4b1 --- /dev/null +++ b/views/components/group/new.gohtml @@ -0,0 +1,7 @@ +{{template "base" . }} + +{{define "groupNew" }} + +New Webhook + +{{end}} \ No newline at end of file diff --git a/views/components/notification/email.gohtml b/views/components/notification/email.gohtml new file mode 100644 index 0000000..f831c61 --- /dev/null +++ b/views/components/notification/email.gohtml @@ -0,0 +1,7 @@ +{{template "base" . }} + +{{define "webhookNew" }} + +New Webhook + +{{end}} \ No newline at end of file diff --git a/views/components/notification/list.gohtml b/views/components/notification/list.gohtml new file mode 100644 index 0000000..f831c61 --- /dev/null +++ b/views/components/notification/list.gohtml @@ -0,0 +1,7 @@ +{{template "base" . }} + +{{define "webhookNew" }} + +New Webhook + +{{end}} \ No newline at end of file diff --git a/views/components/notification/message.gohtml b/views/components/notification/message.gohtml new file mode 100644 index 0000000..f831c61 --- /dev/null +++ b/views/components/notification/message.gohtml @@ -0,0 +1,7 @@ +{{template "base" . }} + +{{define "webhookNew" }} + +New Webhook + +{{end}} \ No newline at end of file diff --git a/views/components/notification/new.gohtml b/views/components/notification/new.gohtml new file mode 100644 index 0000000..f831c61 --- /dev/null +++ b/views/components/notification/new.gohtml @@ -0,0 +1,7 @@ +{{template "base" . }} + +{{define "webhookNew" }} + +New Webhook + +{{end}} \ No newline at end of file diff --git a/views/components/request/header.gohtml b/views/components/request/header.gohtml new file mode 100644 index 0000000..f831c61 --- /dev/null +++ b/views/components/request/header.gohtml @@ -0,0 +1,7 @@ +{{template "base" . }} + +{{define "webhookNew" }} + +New Webhook + +{{end}} \ No newline at end of file diff --git a/views/components/request/new.gohtml b/views/components/request/new.gohtml new file mode 100644 index 0000000..f831c61 --- /dev/null +++ b/views/components/request/new.gohtml @@ -0,0 +1,7 @@ +{{template "base" . }} + +{{define "webhookNew" }} + +New Webhook + +{{end}} \ No newline at end of file diff --git a/views/pages/group.gohtml b/views/pages/group.gohtml index 267cd25..d0fe3a7 100644 --- a/views/pages/group.gohtml +++ b/views/pages/group.gohtml @@ -15,50 +15,10 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#FirstLastHandle
1MarkOtto@mdo
2JacobThornton@fat
3Larry the Bird@twitter
- -
- -
+ {{block "groupList" .}}{{end}}
- def + {{block "groupNew" .}}{{end}}