diff options
| author | toufic ar <contact@toufy.me> | 2026-07-07 18:29:43 +0300 |
|---|---|---|
| committer | toufic ar <contact@toufy.me> | 2026-07-07 18:29:43 +0300 |
| commit | f7da804e40b990e5f1ee2214a2e2e4984d704f16 (patch) | |
| tree | afec975241b8feaf40c72c924217a6a724461c51 /src/lib/components/Keys.svelte | |
| download | website-f7da804e40b990e5f1ee2214a2e2e4984d704f16.tar.gz website-f7da804e40b990e5f1ee2214a2e2e4984d704f16.zip | |
initial commit
Diffstat (limited to 'src/lib/components/Keys.svelte')
| -rw-r--r-- | src/lib/components/Keys.svelte | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/src/lib/components/Keys.svelte b/src/lib/components/Keys.svelte new file mode 100644 index 0000000..9663cc1 --- /dev/null +++ b/src/lib/components/Keys.svelte @@ -0,0 +1,57 @@ +<script lang="ts"> + import SectionTitle from "./SectionTitle.svelte"; + const ssh: string = + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN8CKkq7m/FPTqjAO3yGWhH7y+9flDjyNC9hQFenvbKs toufy"; + const pgp: string = `-----BEGIN PGP PUBLIC KEY BLOCK----- +mDMEaXaizxYJKwYBBAHaRw8BAQdARrftn56656s3XyW15b3DBMTcrvCvcRjOs53P +tVsrsGC0EXRvdWZpYyBhciAodG91ZnkpiJAEExYKADgWIQRKDkdYNWjksRtcJVm7 +ozAX4p50+wUCaXaizwIbAwULCQgHAgYVCgkICwIEFgIDAQIeAQIXgAAKCRC7ozAX +4p50+2gTAP9pFdyrNoOsOkdkcaBzIs9CZfkf38ZQsdi8vZsdXtquSAEAyaqVsXCN +tpMn3/ax/034uY0wAVa9WluqWcvGK+jb7we4OARpdqLPEgorBgEEAZdVAQUBAQdA +YQqEaD8/QXfS9rU471nhxbB1bHANd/NAG8TG1mJeLFkDAQgHiHgEGBYKACAWIQRK +DkdYNWjksRtcJVm7ozAX4p50+wUCaXaizwIbDAAKCRC7ozAX4p50+3PEAP0abVGS +7KLZCqJRjsRfhNP0IrveTuKrW5hckVu4GNgkCQEAtXHhO8Kj6l41m6v36AWddSUz +iv6s3F2Wfm3pjizriQc= +=w8/B +-----END PGP PUBLIC KEY BLOCK-----`; +</script> + +<SectionTitle title="keys">my public keys</SectionTitle> +<div + class="flex flex-col w-auto max-w-full bg-base-300 p-4 rounded-md + self-start" +> + <h3 class="flex flex-row place-items-center text-xl"> + <span class="font-extrabold text-accent">SSH</span> + <button + title="copy" + id="sshCopyBtn" + class="font-extrabold text-secondary cursor-pointer + active:text-primary"><span class="iconify-[fa7-regular--copy]"></span></button + > + <input type="hidden" id="sshKeyValue" value={ssh} /> + </h3> + <pre class="bg-neutral p-2 my-2 rounded-md overflow-scroll"><code>{ssh}</code + ></pre> + <h3 class="flex flex-row place-items-center text-xl"> + <span class="font-extrabold text-accent">PGP</span> + <button + title="copy" + id="pgpCopyBtn" + class="font-extrabold text-secondary cursor-pointer + active:text-primary"><span class="iconify-[fa7-regular--copy]"></span></button + > + <input type="hidden" id="pgpKeyValue" value={pgp} /> + </h3> + <pre class="bg-neutral p-2 my-2 rounded-md overflow-scroll"><code>{pgp}</code + ></pre> + <script> + function copyKey(key) { + navigator.clipboard.writeText(key); + } + document.getElementById("sshCopyBtn").onclick = () => + copyKey(document.getElementById("sshKeyValue").value); + document.getElementById("pgpCopyBtn").onclick = () => + copyKey(document.getElementById("pgpKeyValue").value); + </script> +</div> |
