Compare commits

..

3 commits

3 changed files with 23 additions and 6 deletions

View file

@ -38,6 +38,10 @@ that I know is mine.
I try to maintain everything and help everyone to achieve decentralization, but at the end of the day I'm just a random I try to maintain everything and help everyone to achieve decentralization, but at the end of the day I'm just a random
woman. woman.
**Do you have a Google Fonts mirror?** Please, [contact me](https://sofiaritz.com/en/contact)! **Do you have a Google Fonts mirror?**
1. Add a comment to the [issue](https://git.sofiaritz.com/GFonts/gfonts-interface/issues/2) using the template, or
2. [contact me](https://sofiaritz.com/en/contact)
**Do you have another instance of this interface?** Please, [contact me](https://sofiaritz.com/en/contact)! **Do you have another instance of this interface?** Please, [contact me](https://sofiaritz.com/en/contact)!
Thank you :)

View file

@ -15,7 +15,10 @@
} }
</script> </script>
<h3>Mirror URL</h3> <div class="mirror-url-container">
<h3>Mirror URL</h3>
<a href="https://git.sofiaritz.com/GFonts/gfonts-interface/issues/2">Known mirrors</a>
</div>
<input bind:value={mirror_input} type="url"> <input bind:value={mirror_input} type="url">
<h3>Google Fonts URL</h3> <h3>Google Fonts URL</h3>
@ -23,7 +26,6 @@
<button on:click={transform}>Transform</button> <button on:click={transform}>Transform</button>
{#await output} {#await output}
{:then v} {:then v}
{#if v != null} {#if v != null}
@ -32,3 +34,12 @@
{:catch e} {:catch e}
<div>Error :( {e}</div> <div>Error :( {e}</div>
{/await} {/await}
<style>
.mirror-url-container {
display: flex;
flex-direction: row;
align-items: center;
gap: 16px;
}
</style>

View file

@ -1,12 +1,14 @@
<script> <script>
let slot let slot
function copy_code() { let copied = false
navigator.clipboard.writeText(slot?.innerText) async function copy_code() {
await navigator.clipboard.writeText(slot?.innerText)
copied = true
} }
</script> </script>
<pre> <pre>
<button on:click={copy_code}>Copy code</button> <button on:click={copy_code}>Copy code</button> {#if copied}<span style="display: inline">Copied!</span>{/if}
<span bind:this={slot}><slot></slot></span> <span bind:this={slot}><slot></slot></span>
</pre> </pre>