1
1
mirror of https://github.com/bumi/lntip synced 2025-06-16 17:55:35 +00:00

Slightly nicer webln integration

This commit is contained in:
bumi 2021-08-27 11:20:27 +02:00
parent 38b7e6ed3e
commit d3a3bf287b
2 changed files with 18 additions and 1 deletions

3
files/assets/zap.svg Normal file
View File

@ -0,0 +1,3 @@
<svg width="128" height="128" style="enable-background:new 0 0 128 128;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<path d="M115.36,61.84L70.22,50.49L114.45,2.4c0.41-0.45,0.43-1.13,0.05-1.6c-0.39-0.48-1.07-0.59-1.59-0.27 L12.3,61.98c-0.41,0.25-0.64,0.72-0.57,1.2c0.06,0.48,0.4,0.87,0.87,1.01l45.07,13.25L13.38,125.6c-0.42,0.46-0.44,1.15-0.04,1.61 c0.24,0.29,0.58,0.44,0.94,0.44c0.22,0,0.45-0.06,0.65-0.19l100.78-63.41c0.42-0.26,0.64-0.75,0.56-1.22 C116.19,62.34,115.84,61.95,115.36,61.84z" style="fill:#FCC21B;"/>
</svg>

After

Width:  |  Height:  |  Size: 559 B

View File

@ -2,6 +2,12 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<meta property="og:site_name" content="">
<meta property="og:description" content="">
<meta property="og:image" content="/lnme/zap.svg">
<title>⚡ Send me some Sats</title>
<style>
html {
@ -111,7 +117,7 @@
<div class="form" id="form">
<p>
Send me<br>
<input type="number" placeholder="10000" class="amount" id="amount" autocomplete="off" min="100"> Sats
<input type="number" placeholder="10000" class="amount" id="amount" autofocus="true" autocomplete="off" min="100"> Sats
<br>
for
<br>
@ -146,6 +152,14 @@
<script src="/lnme/lnme.js" id="lnme-script"></script>
<script>
var siteName = document.querySelector('head > meta[property="og:site_name"]');
if (siteName && !siteName.content) {
siteName.content = window.location.host;
}
var siteDescription = document.querySelector('head > meta[property="og:description"]');
if (siteDescription && !siteDescription.content) {
siteDescription.content = "Sats for " + window.location.host;
}
document.getElementById("get-new-address").addEventListener('click', function(e) {
e.preventDefault();
var lnme = new LnMe({});