Compare commits

..

2 Commits

Author SHA1 Message Date
db408ecbde Fix displayed sats 2024-12-27 19:40:09 +01:00
371126e8e0 Add QR code 2024-12-27 19:34:36 +01:00

View File

@ -28,22 +28,17 @@ templ Overlay(lnurl string) {
}, 60_000)
})
</script>
<div class="bg-white fixed bottom-0 left-0 text-center p-3">
<div class="fixed bottom-0 left-0">
<img src={ "data:image/jpeg;base64," + qrEncode(lnurl) }/>
<div>scan to zap message</div>
</div>
</body>
</html>
}
func qrEncode(value string) string {
q, err := qrcode.New(value, qrcode.Medium)
q.DisableBorder = true
png, err := q.PNG(256)
png, err := qrcode.Encode(value, qrcode.Medium, 256)
if err != nil {
return ""
}
return base64.StdEncoding.EncodeToString([]byte(png))
return base64.StdEncoding.EncodeToString([]byte(png))
}