From cec39db23db603e87b969a5c630b5873f96a8be7 Mon Sep 17 00:00:00 2001 From: Anhgelus Morhtuuzh Date: Fri, 3 Oct 2025 10:57:34 +0200 Subject: feat(backend): create template for logs display --- backend/templates/home.html | 24 ++---------------------- backend/templates/home_log.html | 24 +----------------------- backend/templates/logs_display.html | 23 +++++++++++++++++++++++ 3 files changed, 26 insertions(+), 45 deletions(-) create mode 100644 backend/templates/logs_display.html (limited to 'backend/templates') diff --git a/backend/templates/home.html b/backend/templates/home.html index 37236ba..1a6b158 100644 --- a/backend/templates/home.html +++ b/backend/templates/home.html @@ -5,25 +5,5 @@ {{ .Description }}

-
- {{ range .Logs }} - - {{ end }} - {{ if ne .PagesNumber 1 }} - - {{ end }} -
-{{end}} \ No newline at end of file +{{ template "logs_display" . }} +{{end}} diff --git a/backend/templates/home_log.html b/backend/templates/home_log.html index dd5fdc1..2301ffd 100644 --- a/backend/templates/home_log.html +++ b/backend/templates/home_log.html @@ -1,23 +1 @@ -{{define "body"}} -
- {{ range .Logs }} - - {{ end }} - {{ if ne .PagesNumber 1 }} - - {{ end }} -
-{{end}} +{{define "body"}}{{ template "logs_display" . }}{{end}} diff --git a/backend/templates/logs_display.html b/backend/templates/logs_display.html new file mode 100644 index 0000000..d76d7c2 --- /dev/null +++ b/backend/templates/logs_display.html @@ -0,0 +1,23 @@ +{{define "logs_display"}} +
+ {{ range .Logs }} + + {{ end }} + {{ if ne .PagesNumber 1 }} + + {{ end }} +
+{{end}} -- cgit v1.2.3