@@ -20,4 +20,4 @@ templ AuthLogin() {
}
-}
\ No newline at end of file
+}
diff --git a/views/home/error.templ b/views/home/error.templ
new file mode 100644
index 0000000..7ca9230
--- /dev/null
+++ b/views/home/error.templ
@@ -0,0 +1,10 @@
+package home
+
+import "templ-test/views/layout"
+
+templ Error(message error) {
+ @layout.Testing("Error") {
+
Oops... :(
+
{ message.Error() }
+ }
+}
diff --git a/views/home.templ b/views/home/home.templ
similarity index 80%
rename from views/home.templ
rename to views/home/home.templ
index f02c7eb..0a1add7 100644
--- a/views/home.templ
+++ b/views/home/home.templ
@@ -1,9 +1,10 @@
-package views
+package home
import "templ-test/views/components/bootstrap"
+import "templ-test/views/layout"
templ Home() {
- @Testing("Home", true) {
+ @layout.WithLayout("Home", true) {
this should be above the alert
@@ -14,9 +15,3 @@ templ Home() {
}
}
-
-templ List() {
- @Testing("Lists", true) {
-
- }
-}
diff --git a/views/home/settings.templ b/views/home/settings.templ
new file mode 100644
index 0000000..30da693
--- /dev/null
+++ b/views/home/settings.templ
@@ -0,0 +1,9 @@
+package home
+
+import "templ-test/views/layout"
+
+templ UserSettings() {
+ @layout.Testing("Settings") {
+
This is not ready yet
+ }
+}
diff --git a/views/layout/body.templ b/views/layout/body.templ
new file mode 100644
index 0000000..a626b65
--- /dev/null
+++ b/views/layout/body.templ
@@ -0,0 +1,27 @@
+package layout
+
+templ WithLayout(pageName string, useDarkMode bool) {
+
+ @getHtmlHead()
+
+ @bootstrapNavBar()
+ @getBodyHeader(pageName)
+
+ { children... }
+
+
+
+}
+
+templ Testing(pageName string) {
+
+ @getHtmlHead()
+
+ @bootstrapNavBar()
+ @getBodyHeader(pageName)
+
+ { children... }
+
+
+
+}
diff --git a/views/layout/header.templ b/views/layout/header.templ
new file mode 100644
index 0000000..7a338a0
--- /dev/null
+++ b/views/layout/header.templ
@@ -0,0 +1,19 @@
+package layout
+
+templ getHtmlHead() {
+
+
+
+
+
+
+
+
+
+}
+
+templ getBodyHeader(pageName string) {
+
+}
\ No newline at end of file
diff --git a/views/layout.templ b/views/layout/navbar.templ
similarity index 54%
rename from views/layout.templ
rename to views/layout/navbar.templ
index 1557aae..9101e8b 100644
--- a/views/layout.templ
+++ b/views/layout/navbar.templ
@@ -1,51 +1,7 @@
-package views
-
-templ WithLayout(pageName string, useDarkMode bool) {
-
- @getHtmlHead()
-
- @bootstrapNavBar()
- @getBodyHeader(pageName)
-
- { children... }
-
-
-
-}
-
-templ Testing(pageName string, useDarkMode bool) {
-
- @getHtmlHead()
-
- @bootstrapNavBar()
- @getBodyHeader(pageName)
-
- { children... }
-
-
-
-}
-
-templ getHtmlHead() {
-
-
-
-
-
-
-
-
-
-}
-
-templ getBodyHeader(pageName string) {
-
-}
+package layout
templ bootstrapNavBar() {
-