Compare commits
2 Commits
a5a6a1711a
...
db408ecbde
Author | SHA1 | Date | |
---|---|---|---|
db408ecbde | |||
371126e8e0 |
@ -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))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user