From b450ed7d2b4fe0d725e2bc9d3c0c99b7d4dd6dc8 Mon Sep 17 00:00:00 2001 From: Gregory Ballantine Date: Fri, 6 Oct 2023 10:43:45 -0600 Subject: [PATCH] Broke out main layout in header/footer --- views/index.html | 16 +++++----------- views/layout/footer.html | 4 ++++ views/layout/header.html | 11 +++++++++++ 3 files changed, 20 insertions(+), 11 deletions(-) create mode 100644 views/layout/footer.html create mode 100644 views/layout/header.html diff --git a/views/index.html b/views/index.html index 7283e7a..ad17904 100644 --- a/views/index.html +++ b/views/index.html @@ -1,11 +1,5 @@ - - - - - - {{ .title }} - - -

This is a test!

- - \ No newline at end of file +{{ template "header" . }} + +

This is a test!

+ +{{ template "footer" . }} diff --git a/views/layout/footer.html b/views/layout/footer.html new file mode 100644 index 0000000..2edaabe --- /dev/null +++ b/views/layout/footer.html @@ -0,0 +1,4 @@ +{{ define "footer" }} + + +{{ end }} diff --git a/views/layout/header.html b/views/layout/header.html new file mode 100644 index 0000000..d324a97 --- /dev/null +++ b/views/layout/header.html @@ -0,0 +1,11 @@ +{{ define "header" }} + + + + + + + {{ .title }} | BLT + + +{{ end }}