yw5ncom/html/contact.html
ange 3f47b51aca
All checks were successful
/ deploy (push) Successful in 1m1s
fix: copy button
2025-04-19 08:50:37 +00:00

73 lines
2.1 KiB
HTML

<!DOCTYPE html>
<html>
<head>
{{template "head.tmpl" .}}
<script>
function copyElem(id, r='') {
navigator.clipboard.writeText(
document.getElementById(id).innerText.replaceAll(r, ''),
);
}
function copyFile(id) {
fetch(document.getElementById(id).childNodes[0].href).then(f => {
f.text().then(t => {
navigator.clipboard.writeText(t);
})
})
}
</script>
</head>
<body>
{{template "header.tmpl" .}}
<div id="content">
<div id="main">
<table>
<tr>
<td>Matrix (Element)</td>
<td id="matrix">{{template "matrix"}}</td>
<td><button onclick="copyElem('matrix')">Copy</button></td>
</tr>
<tr>
<td>Discord</td>
<td id="discord">{{template "discord"}}</td>
<td><button onclick="copyElem('discord')">Copy</button></td>
</tr>
<tr>
<td>Phone (France)</td>
<td id="phone">{{template "phone"}}</td>
<td><button onclick="copyElem('phone', / /g)">Copy</button></td>
</tr>
<tr>
<td>Email</td>
<td id="email">{{template "email"}}</td>
<td><button onclick="copyElem('email')">Copy</button></td>
</tr>
<tr>
<td>WhatsApp</td>
<td id="wa">{{template "wa"}}</td>
<td><button onclick="copyElem('wa', /[ |-]/g)">Copy</button></td>
</tr>
<tr>
<td>LinkedIn</td>
<td id="in">{{template "in"}}</td>
<td><button onclick="copyElem('in')">Copy</button></td>
</tr>
<tr>
<td>PGP</td>
<td id="pgp">{{template "pgp"}}</td>
<td><button onclick="copyFile('pgp')">Copy</button></td>
</tr>
<tr>
<td>SSH</td>
<td id="ssh">{{template "ssh"}}</td>
<td><button onclick="copyFile('ssh')">Copy</button></td>
</tr>
</table>
</div>
</div>
</body>
</html>