delphi.market/server/router/pages/lnAuth.templ

34 lines
896 B
Plaintext

package pages
import "git.ekzyis.com/ekzyis/delphi.market/server/router/pages/components"
templ LnAuth(qr string, lnurl string, action string) {
<html>
@components.Head()
<body class="container">
@components.Nav()
<div id="content" class="flex flex-col text-center">
@components.Figlet("random", action)
<small><code>with lightning</code></small>
<div
class="flex flex-col my-3 text-center"
hx-target="#content"
hx-swap="outerHTML"
hx-select="#content"
hx-push-url="true"
>
<a
class="mx-auto no-link"
href={ templ.SafeURL("lightning:" + lnurl) }
>
<img src={ "data:image/jpeg;base64," + qr }/>
</a>
<small class="mx-auto w-[256px] my-1 break-words">{ lnurl }</small>
</div>
<div hx-get="/session" hx-trigger="every 1s" hx-swap="none"></div>
</div>
@components.Footer()
</body>
</html>
}