aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(static)/docs
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-11-26 22:35:28 -0800
committerAdam Soltys <[email protected]>2024-11-26 22:35:28 -0800
commitf99bd15fabd6d7b361794f756a69d6f05a50701f (patch)
tree9bb1b14519b34c343ad3bcd001fbd4681a53e447 /src/routes/(static)/docs
parentf4eb6547d0db5edd0137fdefe461433500515040 (diff)
downloadcoinos-ui-f99bd15fabd6d7b361794f756a69d6f05a50701f.tar.gz
coinos-ui-f99bd15fabd6d7b361794f756a69d6f05a50701f.zip
warnings
Diffstat (limited to 'src/routes/(static)/docs')
-rw-r--r--src/routes/(static)/docs/+page.svelte37
1 files changed, 19 insertions, 18 deletions
diff --git a/src/routes/(static)/docs/+page.svelte b/src/routes/(static)/docs/+page.svelte
index 80052805..f4e2ffb9 100644
--- a/src/routes/(static)/docs/+page.svelte
+++ b/src/routes/(static)/docs/+page.svelte
@@ -18,12 +18,17 @@
: `export token=<your auth token>`;
</script>
+{#snippet cp(something)}
+ <button type="button" class="ml-auto" onclick={() => copy(something)}>
+ <iconify-icon icon="ph:copy-bold" width="42"></iconify-icon>
+ </button>
+{/snippet}
+
<div class="space-y-8 lg:text-xl mt-20 pt-20 md:pt-0 w-full max-w-full">
<h1 class="text-4xl">Documentation</h1>
<p class="text-secondary">
- Coinos is free and open source software. The code is
- available at <a
+ Coinos is free and open source software. The code is available at <a
href="https://github.com/coinos"
class="text-secondary underline">github.com/coinos</a
>
@@ -31,19 +36,18 @@
<p class="text-secondary">
Coinos has a REST API that can be used to register accounts and make
- payments. The following examples show how you can call the API
- with <a href="https://curl.se/" class="text-secondary underline">curl</a>
+ payments. The following examples show how you can call the API with <a
+ href="https://curl.se/"
+ class="text-secondary underline">curl</a
+ >
</p>
<h2 class="text-2xl">API Base URL</h2>
- <div class="bg-primary text-primary-content rounded-lg p-4 flex gap-4 items-center">
+ <div
+ class="bg-primary text-primary-content rounded-lg p-4 flex gap-4 items-center"
+ >
<div>{api}</div>
- <iconify-icon
- icon="ph:copy-bold"
- onclick={() => copy(api)}
- width="42"
- class="ml-auto cursor-pointer"
- ></iconify-icon>
+ {@render cp(api)}
</div>
<h2 class="text-2xl">Auth Token</h2>
@@ -58,14 +62,11 @@
Save it in a variable called <b>$token</b> to run the examples.
</p>
- <div class="bg-primary text-primary-content rounded-lg p-4 flex gap-4 items-center">
+ <div
+ class="bg-primary text-primary-content rounded-lg p-4 flex gap-4 items-center"
+ >
<div class="w-full break-all">{tokenSample}</div>
- <iconify-icon
- icon="ph:copy-bold"
- onclick={() => copy(tokenSample)}
- width="42"
- class="ml-auto cursor-pointer"
- ></iconify-icon>
+ {@render cp(tokenSample)}
</div>
<h2 class="text-2xl">POST /register</h2>