diff --git a/client/src/languages/en.json b/client/src/languages/en.json
index c83e506..6d574fb 100644
--- a/client/src/languages/en.json
+++ b/client/src/languages/en.json
@@ -87,5 +87,20 @@
}
},
"more": "More documentation will soon arrive here..."
+ },
+ "guide": {
+ "introduction": {
+ "1": "To access the API, there are a few ways to do it.",
+ "2": "It depends on what you are trying to accomplish with it."
+ },
+ "direct": {
+ "1": "Direct request with",
+ "2": "block"
+ },
+ "fetch": {
+ "1": "Using fetch API",
+ "2": "You can use it, but I personally don't recommend it.",
+ "3": "data is a base64 string"
+ }
}
}
diff --git a/client/src/languages/id.json b/client/src/languages/id.json
index 8f11c91..0742ecf 100644
--- a/client/src/languages/id.json
+++ b/client/src/languages/id.json
@@ -87,5 +87,20 @@
}
},
"more": "Dokumentasi lebih lanjut akan segera tiba disini..."
+ },
+ "guide": {
+ "introduction": {
+ "1": "Ada beberapa cara untuk mengakses API.",
+ "2": "Cara tersebut tergantung pada apa yang Bapak ingin capai."
+ },
+ "direct": {
+ "1": "Request langsung dengan blok",
+ "2": ""
+ },
+ "fetch": {
+ "1": "Menggunakan fetch API",
+ "2": "Bapak bisa menggunakannya, tapi saya secara personal tidak merekomendasikannya.",
+ "3": "data adalah string dengan isi base64"
+ }
}
}
diff --git a/client/src/routes/guide.svelte b/client/src/routes/guide.svelte
index d0b4dd0..90e642e 100644
--- a/client/src/routes/guide.svelte
+++ b/client/src/routes/guide.svelte
@@ -1,4 +1,5 @@
@@ -14,8 +15,49 @@
- Sorry for the inconvinience. For now, please refer to the API first. I'll work on
- this page later on.
+
+ {$_('guide.introduction.1')}
+ {$_('guide.introduction.2')}
{$_('guide.fetch.2')}{$_('navigation.guide')}
+ {$_('guide.direct.1')}
+ <img>
{$_('guide.direct.2')}{$_('guide.fetch.1')}
+
+ .then(response => response.text())
+ .then(data => console.log(data))
+
+ // {$_('guide.fetch.3')}
+
+ <img src="data:image/jpeg;base64, { data }" />
+
diff --git a/client/src/routes/why.svelte b/client/src/routes/why.svelte index 2f1d662..523d128 100644 --- a/client/src/routes/why.svelte +++ b/client/src/routes/why.svelte @@ -50,7 +50,7 @@ @apply text-base py-2 'lg:w-2/3'; } h1 { - @apply text-3xl 'md:text-3xl' font-bold py-2; + @apply text-3xl font-bold py-2; } a { /* This would probably be an error if you installed WindiCSS extension on VSCode */