Add figlet component
This commit is contained in:
parent
3a9d3ac9aa
commit
a87ce02819
|
@ -1,9 +1,6 @@
|
||||||
package pages
|
package pages
|
||||||
|
|
||||||
import (
|
import "git.ekzyis.com/ekzyis/delphi.market/server/router/pages/components"
|
||||||
"git.ekzyis.com/ekzyis/delphi.market/lib"
|
|
||||||
"git.ekzyis.com/ekzyis/delphi.market/server/router/pages/components"
|
|
||||||
)
|
|
||||||
|
|
||||||
templ About() {
|
templ About() {
|
||||||
<html>
|
<html>
|
||||||
|
@ -11,13 +8,7 @@ templ About() {
|
||||||
<body class="container">
|
<body class="container">
|
||||||
@components.Header()
|
@components.Header()
|
||||||
<div class="flex flex-col text-center">
|
<div class="flex flex-col text-center">
|
||||||
<code class="figlet">
|
@components.Figlet("random", "about")
|
||||||
<strong>
|
|
||||||
<pre>
|
|
||||||
{ lib.Figlet("random", "about") }
|
|
||||||
</pre>
|
|
||||||
</strong>
|
|
||||||
</code>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-col mb-3">
|
<div class="flex flex-col mb-3">
|
||||||
<h1>📈 Prediction market?</h1>
|
<h1>📈 Prediction market?</h1>
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
package components
|
||||||
|
|
||||||
|
import "git.ekzyis.com/ekzyis/delphi.market/lib"
|
||||||
|
|
||||||
|
templ Figlet(font string, text string) {
|
||||||
|
<code class="figlet">
|
||||||
|
<strong>
|
||||||
|
<pre>
|
||||||
|
{ lib.Figlet(font, text) }
|
||||||
|
</pre>
|
||||||
|
</strong>
|
||||||
|
</code>
|
||||||
|
}
|
|
@ -1,7 +1,6 @@
|
||||||
package pages
|
package pages
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.ekzyis.com/ekzyis/delphi.market/lib"
|
|
||||||
"git.ekzyis.com/ekzyis/delphi.market/server/router/pages/components"
|
"git.ekzyis.com/ekzyis/delphi.market/server/router/pages/components"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
@ -13,13 +12,7 @@ templ Error(code int) {
|
||||||
<body class="container">
|
<body class="container">
|
||||||
@components.Header()
|
@components.Header()
|
||||||
<div class="flex flex-col text-center">
|
<div class="flex flex-col text-center">
|
||||||
<code class="figlet">
|
@components.Figlet("random", strconv.Itoa(code))
|
||||||
<strong>
|
|
||||||
<pre>
|
|
||||||
{ lib.Figlet("random", strconv.Itoa(code)) }
|
|
||||||
</pre>
|
|
||||||
</strong>
|
|
||||||
</code>
|
|
||||||
<div class="font-mono mb-3">{ http.StatusText(code) }</div>
|
<div class="font-mono mb-3">{ http.StatusText(code) }</div>
|
||||||
</div>
|
</div>
|
||||||
@components.Footer()
|
@components.Footer()
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
package pages
|
package pages
|
||||||
|
|
||||||
import (
|
import "git.ekzyis.com/ekzyis/delphi.market/server/router/pages/components"
|
||||||
"git.ekzyis.com/ekzyis/delphi.market/lib"
|
|
||||||
"git.ekzyis.com/ekzyis/delphi.market/server/router/pages/components"
|
|
||||||
)
|
|
||||||
|
|
||||||
templ Index() {
|
templ Index() {
|
||||||
<html>
|
<html>
|
||||||
|
@ -11,14 +8,7 @@ templ Index() {
|
||||||
<body class="container">
|
<body class="container">
|
||||||
@components.Header()
|
@components.Header()
|
||||||
<div class="flex flex-col text-center">
|
<div class="flex flex-col text-center">
|
||||||
<code class="figlet">
|
@components.Figlet("random", "delphi")
|
||||||
<strong>
|
|
||||||
<!-- need to escape backslashes or backtick here ... -->
|
|
||||||
<pre>
|
|
||||||
{ lib.Figlet("random", "delphi") }
|
|
||||||
</pre>
|
|
||||||
</strong>
|
|
||||||
</code>
|
|
||||||
<div class="font-mono my-3">A prediction market using the lightning network</div>
|
<div class="font-mono my-3">A prediction market using the lightning network</div>
|
||||||
</div>
|
</div>
|
||||||
@components.Footer()
|
@components.Footer()
|
||||||
|
|
Loading…
Reference in New Issue