Add Keyoxide and improve index links handling
This commit is contained in:
parent
4683b584c2
commit
5559cea720
6 changed files with 115 additions and 44 deletions
4
package-lock.json
generated
4
package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "badmanners.xyz",
|
||||
"version": "2.1.3",
|
||||
"version": "2.1.4",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "badmanners.xyz",
|
||||
"version": "2.1.3",
|
||||
"version": "2.1.4",
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
"@astrojs/check": "^0.9.2",
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "badmanners.xyz",
|
||||
"type": "module",
|
||||
"version": "2.1.3",
|
||||
"version": "2.1.4",
|
||||
"scripts": {
|
||||
"postinstall": "astro sync",
|
||||
"dev": "astro dev",
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ The Jost* typeface is copyrighted by indestructible type* and is distributed und
|
|||
|
||||
The SVG icons for Bluesky, Codeberg, Discord, Itch.io, Keybase, Ko-fi, GitHub, GitLab, Google, Mastodon, Picarto, Reddit, Signal, Steam, Telegram, Twitch, Weasyl, X, and YouTube were created for the Simple Icons project and are distributed under the Creative Commons Zero v1.0 Universal license: https://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
The SVG icons for Cohost, Eka's Portal, Fur Affinity, Inkbunny, Itaku, Neocities, SoFurry, and SubscribeStar were edited by me (Bad Manners) from their respective logos, for personal use.
|
||||
The SVG icons for Cohost, Eka's Portal, Fur Affinity, Inkbunny, Itaku, Keyoxide, Neocities, SoFurry, SSH, and SubscribeStar were edited by me (Bad Manners) from their respective logos, for personal use.
|
||||
|
||||
The generic SVG icons were created by Font Awesome and are distributed under CC-BY-4.0: https://creativecommons.org/licenses/by/4.0/
|
||||
|
||||
|
|
|
|||
|
|
@ -28,9 +28,7 @@ async function deployLftp({ host, user, password, targetFolder, sourceFolder, as
|
|||
},
|
||||
);
|
||||
await new Promise((resolve, reject) => {
|
||||
process.on("close", (code) =>
|
||||
(code === 0) ? resolve(0) : reject(`lftp failed with code ${code}`),
|
||||
);
|
||||
process.on("close", (code) => (code === 0 ? resolve(0) : reject(`lftp failed with code ${code}`)));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
15
src/components/icons/brands/IconKeyoxide.astro
Normal file
15
src/components/icons/brands/IconKeyoxide.astro
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
import SVGIcon from "../SVGIcon.astro";
|
||||
|
||||
type Props = {
|
||||
width: string;
|
||||
height: string;
|
||||
class?: string;
|
||||
};
|
||||
---
|
||||
|
||||
<SVGIcon {...Astro.props} viewBox="0 0 24 24">
|
||||
<path
|
||||
d="m 10.869141,0 c -0.4551,0 -0.832032,0.37693171 -0.832032,0.83203125 0,0.45509955 0.376932,0.83203125 0.832032,0.83203125 0.455099,0 0.832031,-0.3769317 0.832031,-0.83203125 C 11.701172,0.37693171 11.32424,0 10.869141,0 Z m 1.851562,0.29296875 c -0.568299,0 -1.037109,0.46890994 -1.037109,1.03710935 0,0.2367998 0.0807,0.4573127 0.216797,0.6328125 -0.05687,-0.00714 -0.115129,-0.011719 -0.173829,-0.011719 -0.768299,0 -1.398437,0.6306382 -1.398437,1.3984375 0,0.7682992 0.630638,1.4003906 1.398437,1.4003906 0.3773,0 0.72221,-0.1523377 0.97461,-0.3984375 -0.0089,0.07397 -0.01563,0.1483095 -0.01563,0.2246094 0,0.5998994 0.312638,1.1295159 0.773437,1.4785156 l -2.585932,2.011719 V 7.9511719 c 0,-1.8169982 -1.4818301,-3.2988281 -3.2988282,-3.2988281 -1.8169982,0 -3.3007813,1.4818299 -3.3007813,3.2988281 v 6.8281251 c -1.699e-4,-0.01435 -0.00195,-0.0096 -0.00195,0.03516 V 20.69727 C 4.2714813,22.516264 5.7552206,24 7.5742188,24 9.304217,24 10.689219,22.644264 10.824219,20.947266 l 3.74414,2.49414 c 1.511999,1.007999 3.564267,0.597636 4.572266,-0.914062 1.007999,-1.511999 0.597636,-3.564267 -0.914063,-4.572266 l -5.013671,-3.345703 5.208984,-4.052734 c 1.262999,-0.9823994 1.629956,-2.7202361 0.910156,-4.1152348 -0.0063,-0.01221 -0.0141,-0.028489 -0.02148,-0.042969 0.2572,-0.2823997 0.414062,-0.6554535 0.414062,-1.0644531 C 19.724609,4.4627852 19.011824,3.75 18.140625,3.75 c -0.634499,0 -1.1855,0.3779224 -1.4375,0.9199219 -0.08446,-0.00692 -0.169206,-0.012372 -0.253906,-0.013672 0.0014,-0.03013 0.0039,-0.040188 0.0039,-0.080078 0,-1.035999 -0.85012,-1.8867188 -1.886719,-1.8867188 -0.578999,5.6e-6 -1.095406,0.2652879 -1.441406,0.6796875 1.08e-4,-0.00711 0,-0.014354 0,-0.021484 0,-0.3810996 -0.154197,-0.7293221 -0.404297,-0.9824218 0.5684,0 1.037109,-0.4669568 1.037109,-1.0351563 0,-0.56829941 -0.468909,-1.03710935 -1.037109,-1.03710935 z"
|
||||
></path>
|
||||
</SVGIcon>
|
||||
|
|
@ -15,6 +15,7 @@ import IconInkbunny from "../components/icons/brands/IconInkbunny.astro";
|
|||
import IconItaku from "../components/icons/brands/IconItaku.astro";
|
||||
import IconItchIO from "../components/icons/brands/IconItchIO.astro";
|
||||
import IconKeybase from "../components/icons/brands/IconKeybase.astro";
|
||||
import IconKeyoxide from "../components/icons/brands/IconKeyoxide.astro";
|
||||
import IconKofi from "../components/icons/brands/IconKofi.astro";
|
||||
import IconMastodon from "../components/icons/brands/IconMastodon.astro";
|
||||
import IconNeocities from "../components/icons/brands/IconNeocities.astro";
|
||||
|
|
@ -49,10 +50,12 @@ import IconYouTube from "../components/icons/brands/IconYouTube.astro";
|
|||
alt="Logo for Bad Manners"
|
||||
class="u-logo mx-auto my-4 h-screen max-h-48 rounded-full transition-transform hover:scale-110 motion-reduce:transition-none motion-reduce:hover:scale-100 sm:max-h-72"
|
||||
/>
|
||||
<p class="p-note mt-6 sm:px-5 md:px-6">I'm a safe vore enthusiast, a furry programmer, and occasionally a writer.</p>
|
||||
<p class="p-note mt-6 sm:px-5 md:px-6">
|
||||
I'm a safe vore enthusiast, a furry programmer, and occasionally a writer.
|
||||
</p>
|
||||
{
|
||||
Astro.site ? (
|
||||
<a href={Astro.site} class="u-url sr-only" aria-label="Permalink">
|
||||
<a id="website" href={Astro.site} class="u-url sr-only" aria-label="Permalink">
|
||||
{Astro.site}
|
||||
</a>
|
||||
) : null
|
||||
|
|
@ -62,8 +65,9 @@ import IconYouTube from "../components/icons/brands/IconYouTube.astro";
|
|||
class="grid grid-cols-3 gap-x-4 gap-y-5 px-4 pt-8 sm:grid-cols-4 sm:px-20 md:px-32"
|
||||
aria-label="Links"
|
||||
>
|
||||
<li id="e-mail">
|
||||
<li>
|
||||
<a
|
||||
id="e-mail"
|
||||
class="u-email text-link group block w-full transition-colors motion-reduce:transition-none"
|
||||
href="mailto:me@badmanners.xyz"
|
||||
rel="me"
|
||||
|
|
@ -79,8 +83,9 @@ import IconYouTube from "../components/icons/brands/IconYouTube.astro";
|
|||
<p class="sr-only">E-mail address</p>
|
||||
</a>
|
||||
</li>
|
||||
<li id="gallery">
|
||||
<li>
|
||||
<a
|
||||
id="gallery"
|
||||
class="u-url text-link group block w-full transition-colors motion-reduce:transition-none"
|
||||
href="https://gallery.badmanners.xyz"
|
||||
rel="me"
|
||||
|
|
@ -94,8 +99,9 @@ import IconYouTube from "../components/icons/brands/IconYouTube.astro";
|
|||
/>
|
||||
</a>
|
||||
</li>
|
||||
<li id="bluesky">
|
||||
<li>
|
||||
<a
|
||||
id="bluesky"
|
||||
class="u-url text-link group block w-full transition-colors motion-reduce:transition-none"
|
||||
href="https://bsky.app/profile/badmanners.xyz"
|
||||
rel="me"
|
||||
|
|
@ -109,8 +115,9 @@ import IconYouTube from "../components/icons/brands/IconYouTube.astro";
|
|||
<p class="p-nickname sr-only">@badmanners.xyz on Bluesky</p>
|
||||
</a>
|
||||
</li>
|
||||
<li id="codeberg">
|
||||
<li>
|
||||
<a
|
||||
id="codeberg"
|
||||
class="u-url text-link group block w-full transition-colors motion-reduce:transition-none"
|
||||
href="https://codeberg.org/BadManners"
|
||||
rel="me"
|
||||
|
|
@ -124,8 +131,9 @@ import IconYouTube from "../components/icons/brands/IconYouTube.astro";
|
|||
<p class="p-nickname sr-only">BadManners on Codeberg</p>
|
||||
</a>
|
||||
</li>
|
||||
<li id="cohost">
|
||||
<li>
|
||||
<a
|
||||
id="cohost"
|
||||
class="u-url text-link group block w-full transition-colors motion-reduce:transition-none"
|
||||
href="https://cohost.org/BadManners"
|
||||
rel="me"
|
||||
|
|
@ -139,8 +147,9 @@ import IconYouTube from "../components/icons/brands/IconYouTube.astro";
|
|||
<p class="p-nickname sr-only">BadManners on Cohost</p>
|
||||
</a>
|
||||
</li>
|
||||
<li id="discord">
|
||||
<li>
|
||||
<button
|
||||
id="discord"
|
||||
class="text-link group block w-full transition-colors motion-reduce:transition-none"
|
||||
aria-label="Discord"
|
||||
data-clipboard="badmanners"
|
||||
|
|
@ -155,8 +164,9 @@ import IconYouTube from "../components/icons/brands/IconYouTube.astro";
|
|||
<p class="p-nickname sr-only">badmanners on Discord</p>
|
||||
</button>
|
||||
</li>
|
||||
<li id="eka-s-portal">
|
||||
<li>
|
||||
<a
|
||||
id="eka-s-portal"
|
||||
class="u-url text-link group block w-full transition-colors motion-reduce:transition-none"
|
||||
href="https://aryion.com/g4/user/BadManners"
|
||||
rel="me"
|
||||
|
|
@ -170,8 +180,9 @@ import IconYouTube from "../components/icons/brands/IconYouTube.astro";
|
|||
<p class="p-nickname sr-only">BadManners on Eka's Portal</p>
|
||||
</a>
|
||||
</li>
|
||||
<li id="fur-affinity">
|
||||
<li>
|
||||
<a
|
||||
id="fur-affinity"
|
||||
class="u-url text-link group block w-full transition-colors motion-reduce:transition-none"
|
||||
href="https://www.furaffinity.net/user/BadManners"
|
||||
rel="me"
|
||||
|
|
@ -185,8 +196,9 @@ import IconYouTube from "../components/icons/brands/IconYouTube.astro";
|
|||
<p class="p-nickname sr-only">BadManners on Fur Affinity</p>
|
||||
</a>
|
||||
</li>
|
||||
<li id="github">
|
||||
<li>
|
||||
<a
|
||||
id="github"
|
||||
class="u-url text-link group block w-full transition-colors motion-reduce:transition-none"
|
||||
href="https://github.com/BadMannersXYZ"
|
||||
rel="me"
|
||||
|
|
@ -200,8 +212,9 @@ import IconYouTube from "../components/icons/brands/IconYouTube.astro";
|
|||
<p class="p-nickname sr-only">BadMannersXYZ on GitHub</p>
|
||||
</a>
|
||||
</li>
|
||||
<li id="gitlab">
|
||||
<li>
|
||||
<a
|
||||
id="gitlab"
|
||||
class="u-url text-link group block w-full transition-colors motion-reduce:transition-none"
|
||||
href="https://gitlab.com/Bad_Manners"
|
||||
rel="me"
|
||||
|
|
@ -215,8 +228,9 @@ import IconYouTube from "../components/icons/brands/IconYouTube.astro";
|
|||
<p class="p-nickname sr-only">Bad_Manners on GitLab</p>
|
||||
</a>
|
||||
</li>
|
||||
<li id="gmail">
|
||||
<li>
|
||||
<a
|
||||
id="gmail"
|
||||
class="u-email text-link group block w-full transition-colors motion-reduce:transition-none"
|
||||
href="mailto:badmanners.vore@gmail.com"
|
||||
rel="me"
|
||||
|
|
@ -232,8 +246,9 @@ import IconYouTube from "../components/icons/brands/IconYouTube.astro";
|
|||
<p class="sr-only">Google/Gmail address</p>
|
||||
</a>
|
||||
</li>
|
||||
<li id="inkbunny">
|
||||
<li>
|
||||
<a
|
||||
id="inkbunny"
|
||||
class="u-url text-link group block w-full transition-colors motion-reduce:transition-none"
|
||||
href="https://inkbunny.net/BadManners"
|
||||
rel="me"
|
||||
|
|
@ -247,8 +262,9 @@ import IconYouTube from "../components/icons/brands/IconYouTube.astro";
|
|||
<p class="p-nickname sr-only">BadManners on Inkbunny</p>
|
||||
</a>
|
||||
</li>
|
||||
<li id="itaku">
|
||||
<li>
|
||||
<a
|
||||
id="itaku"
|
||||
class="u-url text-link group block w-full transition-colors motion-reduce:transition-none"
|
||||
href="https://itaku.ee/profile/badmanners"
|
||||
rel="me"
|
||||
|
|
@ -262,8 +278,9 @@ import IconYouTube from "../components/icons/brands/IconYouTube.astro";
|
|||
<p class="p-nickname sr-only">badmanners on Itaku</p>
|
||||
</a>
|
||||
</li>
|
||||
<li id="itch-io">
|
||||
<li>
|
||||
<a
|
||||
id="itch"
|
||||
class="u-url text-link group block w-full transition-colors motion-reduce:transition-none"
|
||||
href="https://bad-manners.itch.io"
|
||||
rel="me"
|
||||
|
|
@ -277,8 +294,9 @@ import IconYouTube from "../components/icons/brands/IconYouTube.astro";
|
|||
<p class="p-nickname sr-only">Bad Manners on Itch.io</p>
|
||||
</a>
|
||||
</li>
|
||||
<li id="keybase">
|
||||
<li>
|
||||
<a
|
||||
id="keybase"
|
||||
class="u-url text-link group block w-full transition-colors motion-reduce:transition-none"
|
||||
href="https://keybase.io/badmanners"
|
||||
rel="me"
|
||||
|
|
@ -292,8 +310,25 @@ import IconYouTube from "../components/icons/brands/IconYouTube.astro";
|
|||
<p class="p-nickname sr-only">badmanners on Keybase</p>
|
||||
</a>
|
||||
</li>
|
||||
<li id="ko-fi">
|
||||
<li>
|
||||
<a
|
||||
id="keyoxide"
|
||||
class="u-url text-link group block w-full transition-colors motion-reduce:transition-none"
|
||||
href="https://keyoxide.org/aspe%3Akeyoxide.org%3AUWYBVFCBFXTVUF2U6FS6AYJHLU"
|
||||
rel="me"
|
||||
aria-label="Keyoxide"
|
||||
>
|
||||
<IconKeyoxide
|
||||
height="1.75rem"
|
||||
width="1.75rem"
|
||||
class="inline transition-transform group-hover:scale-150 group-focus:scale-150 motion-reduce:transition-none motion-reduce:group-hover:scale-100 motion-reduce:group-focus:scale-100"
|
||||
/>
|
||||
<p class="u-uid hidden">aspe:keyoxide.org:UWYBVFCBFXTVUF2U6FS6AYJHLU</p>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
id="ko-fi"
|
||||
class="u-url text-link group block w-full transition-colors motion-reduce:transition-none"
|
||||
href="https://ko-fi.com/badmanners"
|
||||
rel="me"
|
||||
|
|
@ -307,8 +342,9 @@ import IconYouTube from "../components/icons/brands/IconYouTube.astro";
|
|||
<p class="p-nickname sr-only">badmanners on Ko-fi</p>
|
||||
</a>
|
||||
</li>
|
||||
<li id="mastodon">
|
||||
<li>
|
||||
<a
|
||||
id="mastodon"
|
||||
class="u-url text-link group block w-full transition-colors motion-reduce:transition-none"
|
||||
href="https://meow.social/@BadManners"
|
||||
rel="me"
|
||||
|
|
@ -322,8 +358,9 @@ import IconYouTube from "../components/icons/brands/IconYouTube.astro";
|
|||
<p class="p-nickname sr-only">@BadManners@meow.social on Mastodon</p>
|
||||
</a>
|
||||
</li>
|
||||
<li id="neocities">
|
||||
<li>
|
||||
<a
|
||||
id="neocities"
|
||||
class="u-url text-link group block w-full transition-colors motion-reduce:transition-none"
|
||||
href="https://badmanners.neocities.org"
|
||||
rel="me"
|
||||
|
|
@ -337,8 +374,9 @@ import IconYouTube from "../components/icons/brands/IconYouTube.astro";
|
|||
<p class="p-nickname sr-only">badmanners.neocities.org on Neocities</p>
|
||||
</a>
|
||||
</li>
|
||||
<li id="picarto">
|
||||
<li>
|
||||
<a
|
||||
id="picarto"
|
||||
class="u-url text-link group block w-full transition-colors motion-reduce:transition-none"
|
||||
href="https://www.picarto.tv/BadManners"
|
||||
rel="me"
|
||||
|
|
@ -352,8 +390,9 @@ import IconYouTube from "../components/icons/brands/IconYouTube.astro";
|
|||
<p class="p-nickname sr-only">BadManners on Picarto</p>
|
||||
</a>
|
||||
</li>
|
||||
<li id="reddit">
|
||||
<li>
|
||||
<a
|
||||
id="reddit"
|
||||
class="u-url text-link group block w-full transition-colors motion-reduce:transition-none"
|
||||
href="https://www.reddit.com/user/BadManners_"
|
||||
rel="me"
|
||||
|
|
@ -367,8 +406,9 @@ import IconYouTube from "../components/icons/brands/IconYouTube.astro";
|
|||
<p class="p-nickname sr-only">/u/BadManners_ on Reddit</p>
|
||||
</a>
|
||||
</li>
|
||||
<li id="signal">
|
||||
<li>
|
||||
<a
|
||||
id="signal"
|
||||
class="u-url text-link group block w-full transition-colors motion-reduce:transition-none"
|
||||
href="https://signal.me/#eu/ytt_rk0fFmAB2JAW-x2PbUiJyc_H3kYmfL_Pq4QNh5QIDsiFtjdFHaqFRs1D36tB"
|
||||
rel="me"
|
||||
|
|
@ -382,8 +422,9 @@ import IconYouTube from "../components/icons/brands/IconYouTube.astro";
|
|||
<p class="p-nickname sr-only">badmanners.10 on Signal</p>
|
||||
</a>
|
||||
</li>
|
||||
<li id="sofurry">
|
||||
<li>
|
||||
<a
|
||||
id="sofurry"
|
||||
class="u-url text-link group block w-full transition-colors motion-reduce:transition-none"
|
||||
href="https://bad-manners.sofurry.com"
|
||||
rel="me"
|
||||
|
|
@ -397,8 +438,9 @@ import IconYouTube from "../components/icons/brands/IconYouTube.astro";
|
|||
<p class="p-nickname sr-only">Bad Manners on SoFurry</p>
|
||||
</a>
|
||||
</li>
|
||||
<li id="ssh">
|
||||
<li>
|
||||
<a
|
||||
id="ssh"
|
||||
class="u-key text-link group block w-full transition-colors motion-reduce:transition-none"
|
||||
href="/ssh.pub"
|
||||
aria-label="SSH public key"
|
||||
|
|
@ -412,8 +454,9 @@ import IconYouTube from "../components/icons/brands/IconYouTube.astro";
|
|||
/>
|
||||
</a>
|
||||
</li>
|
||||
<li id="steam">
|
||||
<li>
|
||||
<a
|
||||
id="steam"
|
||||
class="u-url text-link group block w-full transition-colors motion-reduce:transition-none"
|
||||
href="https://steamcommunity.com/id/badmanners_"
|
||||
rel="me"
|
||||
|
|
@ -427,8 +470,9 @@ import IconYouTube from "../components/icons/brands/IconYouTube.astro";
|
|||
<p class="p-nickname sr-only">badmanners_ on Steam</p>
|
||||
</a>
|
||||
</li>
|
||||
<li id="subscribestar">
|
||||
<li>
|
||||
<a
|
||||
id="subscribestar"
|
||||
class="u-url text-link group block w-full transition-colors motion-reduce:transition-none"
|
||||
href="https://subscribestar.adult/bad-manners"
|
||||
rel="me"
|
||||
|
|
@ -442,8 +486,9 @@ import IconYouTube from "../components/icons/brands/IconYouTube.astro";
|
|||
<p class="p-nickname sr-only">Bad Manners on SubscribeStar</p>
|
||||
</a>
|
||||
</li>
|
||||
<li id="telegram">
|
||||
<li>
|
||||
<a
|
||||
id="telegram"
|
||||
class="u-url text-link group block w-full transition-colors motion-reduce:transition-none"
|
||||
href="https://t.me/bad_manners"
|
||||
rel="me"
|
||||
|
|
@ -457,8 +502,9 @@ import IconYouTube from "../components/icons/brands/IconYouTube.astro";
|
|||
<p class="p-nickname sr-only">@bad_manners on Telegram</p>
|
||||
</a>
|
||||
</li>
|
||||
<li id="twitch">
|
||||
<li>
|
||||
<a
|
||||
id="twitch"
|
||||
class="u-url text-link group block w-full transition-colors motion-reduce:transition-none"
|
||||
href="https://www.twitch.tv/bad__manners"
|
||||
rel="me"
|
||||
|
|
@ -472,8 +518,9 @@ import IconYouTube from "../components/icons/brands/IconYouTube.astro";
|
|||
<p class="p-nickname sr-only">bad__manners on Twitch</p>
|
||||
</a>
|
||||
</li>
|
||||
<li id="weasyl">
|
||||
<li>
|
||||
<a
|
||||
id="weasyl"
|
||||
class="u-url text-link group block w-full transition-colors motion-reduce:transition-none"
|
||||
href="https://www.weasyl.com/~badmanners"
|
||||
rel="me"
|
||||
|
|
@ -487,8 +534,9 @@ import IconYouTube from "../components/icons/brands/IconYouTube.astro";
|
|||
<p class="p-nickname sr-only">BadManners on Weasyl</p>
|
||||
</a>
|
||||
</li>
|
||||
<li id="x">
|
||||
<li>
|
||||
<a
|
||||
id="x"
|
||||
class="u-url text-link group block w-full transition-colors motion-reduce:transition-none"
|
||||
href="https://x.com/BadManners__"
|
||||
rel="me"
|
||||
|
|
@ -502,8 +550,9 @@ import IconYouTube from "../components/icons/brands/IconYouTube.astro";
|
|||
<p class="p-nickname sr-only">@BadManners__ on X</p>
|
||||
</a>
|
||||
</li>
|
||||
<li id="youtube">
|
||||
<li>
|
||||
<a
|
||||
id="youtube"
|
||||
class="u-url text-link group block w-full transition-colors motion-reduce:transition-none"
|
||||
href="https://www.youtube.com/@BadMannersXYZ"
|
||||
rel="me"
|
||||
|
|
@ -564,25 +613,34 @@ import IconYouTube from "../components/icons/brands/IconYouTube.astro";
|
|||
console.warn(`Missing "data-clipboard" field for custom clipboard element, ignoring...`, element);
|
||||
return;
|
||||
}
|
||||
const ariaDisabled = element.getAttribute("aria-disabled");
|
||||
element.removeAttribute("aria-disabled");
|
||||
const elementTooltip = tippy(element, {
|
||||
content: label ? `${label} copied to clipboard!` : "Copied to clipboard!",
|
||||
trigger: "manual",
|
||||
theme: "bm",
|
||||
});
|
||||
element.addEventListener("click", (ev) => {
|
||||
const onClickElement = (ev: Event) => {
|
||||
ev.preventDefault();
|
||||
tooltipTimeoutTag && clearTimeout(tooltipTimeoutTag);
|
||||
hideAll();
|
||||
navigator.clipboard
|
||||
.writeText(clipboard)
|
||||
.then(() => {
|
||||
elementTooltip.show();
|
||||
})
|
||||
.then(() => elementTooltip.show())
|
||||
.catch((e) => {
|
||||
console.error("Unable to copy custom content to clipboard.", clipboard, e);
|
||||
// Clean up clipboard logic, and revert element to original state
|
||||
element.removeEventListener("click", onClickElement);
|
||||
elementTooltip.destroy();
|
||||
if (ariaDisabled !== null) {
|
||||
element.setAttribute("aria-disabled", ariaDisabled);
|
||||
} else {
|
||||
// Invoke default click
|
||||
element.click();
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
element.addEventListener("click", onClickElement);
|
||||
});
|
||||
};
|
||||
if (ENABLE_VIEW_TRANSITIONS) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue