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
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)!
Thank you :)

View file

@ -15,7 +15,10 @@
}
</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">
<h3>Google Fonts URL</h3>
@ -23,7 +26,6 @@
<button on:click={transform}>Transform</button>
{#await output}
{:then v}
{#if v != null}
@ -32,3 +34,12 @@
{:catch e}
<div>Error :( {e}</div>
{/await}
<style>
.mirror-url-container {
display: flex;
flex-direction: row;
align-items: center;
gap: 16px;
}
</style>

View file

@ -1,12 +1,14 @@
<script>
let slot
function copy_code() {
navigator.clipboard.writeText(slot?.innerText)
let copied = false
async function copy_code() {
await navigator.clipboard.writeText(slot?.innerText)
copied = true
}
</script>
<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>
</pre>