From a87ce028198e24e6ad62c1b78797fe654c57ebee Mon Sep 17 00:00:00 2001 From: ekzyis Date: Wed, 10 Jul 2024 09:25:46 +0200 Subject: [PATCH] Add figlet component --- server/router/pages/about.templ | 13 ++----------- server/router/pages/components/figlet.templ | 13 +++++++++++++ server/router/pages/error.templ | 9 +-------- server/router/pages/index.templ | 14 ++------------ 4 files changed, 18 insertions(+), 31 deletions(-) create mode 100644 server/router/pages/components/figlet.templ diff --git a/server/router/pages/about.templ b/server/router/pages/about.templ index 9d00931..3baaaa3 100644 --- a/server/router/pages/about.templ +++ b/server/router/pages/about.templ @@ -1,9 +1,6 @@ package pages -import ( - "git.ekzyis.com/ekzyis/delphi.market/lib" - "git.ekzyis.com/ekzyis/delphi.market/server/router/pages/components" -) +import "git.ekzyis.com/ekzyis/delphi.market/server/router/pages/components" templ About() { @@ -11,13 +8,7 @@ templ About() { @components.Header()
- - -
-							{ lib.Figlet("random", "about") }
-						
-
-
+ @components.Figlet("random", "about")

📈 Prediction market?

diff --git a/server/router/pages/components/figlet.templ b/server/router/pages/components/figlet.templ new file mode 100644 index 0000000..faccb65 --- /dev/null +++ b/server/router/pages/components/figlet.templ @@ -0,0 +1,13 @@ +package components + +import "git.ekzyis.com/ekzyis/delphi.market/lib" + +templ Figlet(font string, text string) { + + +
+				{ lib.Figlet(font, text) }
+			
+
+
+} diff --git a/server/router/pages/error.templ b/server/router/pages/error.templ index 6b3de29..f062510 100644 --- a/server/router/pages/error.templ +++ b/server/router/pages/error.templ @@ -1,7 +1,6 @@ package pages import ( - "git.ekzyis.com/ekzyis/delphi.market/lib" "git.ekzyis.com/ekzyis/delphi.market/server/router/pages/components" "net/http" "strconv" @@ -13,13 +12,7 @@ templ Error(code int) { @components.Header()
- - -
-							{ lib.Figlet("random", strconv.Itoa(code)) }
-						
-
-
+ @components.Figlet("random", strconv.Itoa(code))
{ http.StatusText(code) }
@components.Footer() diff --git a/server/router/pages/index.templ b/server/router/pages/index.templ index 97f1eed..d3224da 100644 --- a/server/router/pages/index.templ +++ b/server/router/pages/index.templ @@ -1,9 +1,6 @@ package pages -import ( - "git.ekzyis.com/ekzyis/delphi.market/lib" - "git.ekzyis.com/ekzyis/delphi.market/server/router/pages/components" -) +import "git.ekzyis.com/ekzyis/delphi.market/server/router/pages/components" templ Index() { @@ -11,14 +8,7 @@ templ Index() { @components.Header()
- - - -
-							{ lib.Figlet("random", "delphi") }
-						
-
-
+ @components.Figlet("random", "delphi")
A prediction market using the lightning network
@components.Footer()