Compare commits
2 Commits
db408ecbde
...
a5a6a1711a
Author | SHA1 | Date | |
---|---|---|---|
a5a6a1711a | |||
700df20260 |
@ -28,17 +28,22 @@ templ Overlay(lnurl string) {
|
|||||||
}, 60_000)
|
}, 60_000)
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
<div class="fixed bottom-0 left-0">
|
<div class="bg-white fixed bottom-0 left-0 text-center p-3">
|
||||||
<img src={ "data:image/jpeg;base64," + qrEncode(lnurl) }/>
|
<img src={ "data:image/jpeg;base64," + qrEncode(lnurl) }/>
|
||||||
|
<div>scan to zap message</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
}
|
}
|
||||||
|
|
||||||
func qrEncode(value string) string {
|
func qrEncode(value string) string {
|
||||||
png, err := qrcode.Encode(value, qrcode.Medium, 256)
|
q, err := qrcode.New(value, qrcode.Medium)
|
||||||
|
q.DisableBorder = true
|
||||||
|
|
||||||
|
png, err := q.PNG(256)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
return base64.StdEncoding.EncodeToString([]byte(png))
|
|
||||||
|
return base64.StdEncoding.EncodeToString([]byte(png))
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user