From 1c1740d97b4ce8540434f84f30474c4fc3f98cbe Mon Sep 17 00:00:00 2001 From: Zeni Kim Date: Mon, 14 Oct 2024 12:13:51 -0500 Subject: [PATCH] base table --- template/components/content_table.go | 17 +++++++++++++++++ template/components/content_table.html | 12 ++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 template/components/content_table.go create mode 100644 template/components/content_table.html diff --git a/template/components/content_table.go b/template/components/content_table.go new file mode 100644 index 0000000..66c7e1f --- /dev/null +++ b/template/components/content_table.go @@ -0,0 +1,17 @@ +package components + +type ContentTable struct { + ID string + AllTH []ContentTableTH + AllTD [][]ContentTableTD +} + +type ContentTableTH struct { + ID string + Value string +} + +type ContentTableTD struct { + ID string + Value string +} diff --git a/template/components/content_table.html b/template/components/content_table.html new file mode 100644 index 0000000..68e34f6 --- /dev/null +++ b/template/components/content_table.html @@ -0,0 +1,12 @@ +{{define "content_table"}} + + + + {{range $index, $col := .AllTH}}{{end}} + + + +{{range .AllTD}}{{range .}}{{end}}{{end}} + +
{{ $col.Value }}
{{ .Value }}
+{{end}} \ No newline at end of file