-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinvoice.html
More file actions
82 lines (81 loc) · 2.71 KB
/
invoice.html
File metadata and controls
82 lines (81 loc) · 2.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<!DOCTYPE html>
<html>
<head>
<title>Invoice Link Generator</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
html, body {
padding: 0;
margin: 0;
font-family: Arial, sans-serif;
}
body {
background: black;
color: skyblue;
padding: 0;
margin: 0;
height: 100vh;
background-image: url('/+/sunset.gif');
background-size: cover;
background-position: center center;
background-repeat: no-repeat;
}
.glass {
width: 100%;
padding: 60px 0;
background-color: #00000005;
box-shadow: -37.07px 37.07px 37.07px 0 #FFFFFF08 inset,
37.07px -37.07px 37.07px 0px #A5A5A508 inset;
backdrop-filter: blur(12px);
border: #ffffff10 2px solid;
border-radius: 4px;
align-items: center;
justify-content: center;
gap: 32px;
}
.shaded {
background: rgba(0,0,0,0.5);
}
input::placeholder {
opacity: 0.7;
}
</style>
</head>
<body>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/gun/examples/style.css">
<div class="container">
<center>
<img src="/+/icons/getpaid.svg" class="paid pulse">
</center>
<form id="invoice" class="pad center" style="max-width: 14em; b-ackground: rgba(0,0,0,0.8);">
<input type="text" id="payee" name="payee" placeholder="your name/business" class="glass shade sap gap">
<input type="number" id="amount" name="amount" step="0.01" placeholder="amount ur owed" class="glass shade sap gap">
<input type="text" id="memo" name="memo" placeholder="memo for what" class="glass shade sap gap">
<input type="email" id="email" name="email" placeholder="ur email" class="glass shade sap gap">
<button type="button" id="copy" class="glass shaded gap">Copy Pay Link:</button>
<input id="link" name="link" class="glass shade sap gap" style="font-size: 70%;">
</form>
<script>
invoice.onkeyup = function(){
var params = new URLSearchParams({
pay: payee.value.trim(),
amount: parseFloat(amount.value||0).toFixed(2),
memo: memo.value.trim()
});
link.value = 'https://checkard.com?'+params+'&to='+email.value.trim();
}
copy.onclick = link.onclick = copied;
function copied(){
navigator.clipboard.writeText(link.value||'').then(() => {
var text = copy.textContent;
copy.textContent = 'Copied!';
copy.disabled = true;
setTimeout(() => {
copy.textContent = text;
copy.disabled = false;
}, 2000);
}).catch(err => {});
};
</script>
</body>
</html>