diff --git a/.gitignore b/.gitignore
index d0a3062..4952bca 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
.env
zaply
*_templ.go
-__livereload
\ No newline at end of file
+__livereload
+public/css/tailwind.css
diff --git a/Makefile b/Makefile
index 25733c2..58f28c1 100644
--- a/Makefile
+++ b/Makefile
@@ -5,4 +5,5 @@ dev:
build:
templ generate
+ tailwindcss -i ./public/css/input.css -o ./public/css/tailwind.css
go build -o zaply main.go
diff --git a/components/zap.templ b/components/zap.templ
new file mode 100644
index 0000000..c04fdfa
--- /dev/null
+++ b/components/zap.templ
@@ -0,0 +1,30 @@
+package components
+
+import (
+ "fmt"
+
+ "github.com/ekzyis/zaply/lightning"
+)
+
+templ Zap(inv *lightning.Invoice) {
+
+
+
+
+
{ inv.Description }
+
{ fmt.Sprintf("%.8s / %s", inv.PaymentHash, humanize(inv.Msats)) }
+
+
+
+}
+
+func humanize(msats int64) string {
+ sats := msats / 1000
+ if sats == 1 {
+ return fmt.Sprintf("%d sat", sats)
+ } else {
+ return fmt.Sprintf("%d sats", sats)
+ }
+}
diff --git a/livereload.sh b/livereload.sh
index 10645ef..69c5c48 100644
--- a/livereload.sh
+++ b/livereload.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
PID=$(pidof zaply)
-DIRS="env/ lightning/ lnurl/ pages/ server/"
+DIRS="components/ env/ lightning/ lnurl/ pages/ server/"
set -e
diff --git a/pages/overlay.templ b/pages/overlay.templ
index d971202..7e51f3e 100644
--- a/pages/overlay.templ
+++ b/pages/overlay.templ
@@ -6,27 +6,25 @@ templ Overlay() {
zaply
+
+
if GetEnv(ctx) == "development" {
}
+
+
+
-
+