mirror of
https://github.com/helenclx/leilukin-site.git
synced 2025-03-14 20:47:15 +00:00
46 lines
1.4 KiB
Plaintext
46 lines
1.4 KiB
Plaintext
|
<div class="site-btn__container">
|
||
|
<div>
|
||
|
<a href="https://leilukin.neocities.org/" target="_blank"><img src="/assets/leilukin/Leilukins-Hub-button.png" alt="Button of Leilukin's Hub" title="Leilukin's Hub"></a>
|
||
|
</div>
|
||
|
<textarea class="site-btn__textarea textarea-for-copy"><a href="https://leilukin.neocities.org/" target="_blank"><img src="https://leilukin.neocities.org/assets/leilukin/Leilukins-Hub-button.png" alt="Button of Leilukin's Hub" title="Leilukin's Hub"></a></textarea>
|
||
|
<button class="copy-txt-btn">Copy HTML</button>
|
||
|
</div>
|
||
|
|
||
|
<style webc:keep webc:bucket="defer">
|
||
|
.site-btn__container {
|
||
|
display: flex;
|
||
|
gap: 1rem;
|
||
|
align-items: center;
|
||
|
margin: 0.5rem 0;
|
||
|
}
|
||
|
|
||
|
.site-btn__textarea {
|
||
|
width: 10rem;
|
||
|
height: 2.5rem;
|
||
|
font-size: 0.75rem;
|
||
|
background-color:black;
|
||
|
color: var(--clr-body-txt);
|
||
|
}
|
||
|
|
||
|
.copy-txt-btn {
|
||
|
border: none;
|
||
|
background: var(--clr-link-btn-bg);
|
||
|
color: var(--clr-body-txt);
|
||
|
padding: 0.3rem 0.8rem;
|
||
|
border-radius: 0.5rem;
|
||
|
font-size: 0.9rem;
|
||
|
font-weight: bold;
|
||
|
}
|
||
|
|
||
|
.copy-txt-btn:hover {
|
||
|
background: var(--clr-link-hover);
|
||
|
}
|
||
|
</style>
|
||
|
|
||
|
<script webc:keep webc:bucket="defer">
|
||
|
document.querySelector(".copy-txt-btn").onclick = () => {
|
||
|
document.querySelector(".textarea-for-copy").select();
|
||
|
document.execCommand('copy');
|
||
|
}
|
||
|
</script>
|