style: run prettier
This commit is contained in:
parent
c9f9452227
commit
ffef69d773
|
@ -1,3 +1,5 @@
|
|||
<div class="bg-gray-900 font-code px-4 md:px-8 py-6 rounded-lg text-white overflow-ellipsis whitespace-nowrap overflow-x-scroll md:overflow-auto shadow-xl bg-gradient-to-br from-transparent to-gray-800">
|
||||
<slot></slot>
|
||||
</div>
|
||||
<div
|
||||
class="bg-gray-900 font-code px-4 md:px-8 py-6 rounded-lg text-white overflow-ellipsis whitespace-nowrap overflow-x-scroll md:overflow-auto shadow-xl bg-gradient-to-br from-transparent to-gray-800"
|
||||
>
|
||||
<slot />
|
||||
</div>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script lang="ts">
|
||||
import { goto } from "$app/navigation";
|
||||
import { _ } from "svelte-i18n";
|
||||
// TODO: Create hamburger navigation (I know, just bit lazy on this one)
|
||||
import { goto } from '$app/navigation';
|
||||
import { _ } from 'svelte-i18n';
|
||||
// TODO: Create hamburger navigation (I know, just bit lazy on this one)
|
||||
</script>
|
||||
|
||||
<nav class="flex flex-col md:flex-row py-6 font-body">
|
||||
|
@ -15,4 +15,4 @@ import { _ } from "svelte-i18n";
|
|||
.navigation-item {
|
||||
@apply flex-1 duration-300 transition ease-in-out py-2 'md:py-0' 'md:opacity-50' 'hover:cursor-pointer' 'hover:scale-110' 'hover:opacity-100';
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
|
|
@ -84,4 +84,4 @@
|
|||
},
|
||||
"more": "More documentation will soon arrive here..."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -84,4 +84,4 @@
|
|||
},
|
||||
"more": "Dokumentasi lebih lanjut akan segera tiba disini..."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
export default {
|
||||
API_ENDPOINT: import.meta.env.VITE_API_ENDPOINT,
|
||||
SENTRY_DSN: import.meta.env.VITE_SENTRY_DSN
|
||||
}
|
||||
SENTRY_DSN: import.meta.env.VITE_SENTRY_DSN,
|
||||
};
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
import { init, getLocaleFromNavigator, addMessages, getLocaleFromQueryString } from 'svelte-i18n';
|
||||
|
||||
import en from '../languages/en.json'
|
||||
import id from '../languages/id.json'
|
||||
import en from '../languages/en.json';
|
||||
import id from '../languages/id.json';
|
||||
|
||||
addMessages('en', en)
|
||||
addMessages('en-US', en)
|
||||
addMessages('en-GB', en)
|
||||
addMessages('id', id)
|
||||
addMessages('id-ID', id)
|
||||
addMessages('en', en);
|
||||
addMessages('en-US', en);
|
||||
addMessages('en-GB', en);
|
||||
addMessages('id', id);
|
||||
addMessages('id-ID', id);
|
||||
|
||||
init({
|
||||
fallbackLocale: 'en',
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import * as Sentry from "@sentry/browser";
|
||||
import env from "./env";
|
||||
import * as Sentry from '@sentry/browser';
|
||||
import env from './env';
|
||||
|
||||
Sentry.init({
|
||||
dsn: String(env.SENTRY_DSN),
|
||||
tracesSampleRate: 0.5,
|
||||
});
|
||||
|
||||
export default Sentry
|
||||
export default Sentry;
|
||||
|
|
|
@ -3,16 +3,16 @@
|
|||
import Sentry from '$lib/logging';
|
||||
|
||||
export async function load({ error }: LoadOutput): Promise<void> {
|
||||
Sentry.captureException(error)
|
||||
}
|
||||
Sentry.captureException(error);
|
||||
}
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
import { goto } from '$app/navigation'
|
||||
import { _ } from 'svelte-i18n'
|
||||
import { goto } from '$app/navigation';
|
||||
import { _ } from 'svelte-i18n';
|
||||
</script>
|
||||
|
||||
<section>
|
||||
<h1 class="text-5xl font-bold">{$_('error.heading')}</h1>
|
||||
<p class="text-base" on:click={() => goto('/')}>{$_('error.homepage')}</p>
|
||||
</section>
|
||||
</section>
|
||||
|
|
|
@ -1,16 +1,18 @@
|
|||
<script lang="ts" context="module">
|
||||
import '$lib/locale'
|
||||
import '$lib/locale';
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
//import '../locale'
|
||||
import '@fontsource/fira-mono'
|
||||
import '@fontsource/rubik'
|
||||
import { _ } from 'svelte-i18n';
|
||||
import '@fontsource/fira-mono';
|
||||
import '@fontsource/rubik';
|
||||
import { _ } from 'svelte-i18n';
|
||||
import Navbar from '../components/navbar.svelte';
|
||||
</script>
|
||||
|
||||
<div class="bg-gradient-to-br from-transparent to-lavender-300 dark:(bg-gray-900 to-lavender-900 text-white) min-h-screen h-full w-full">
|
||||
<div
|
||||
class="bg-gradient-to-br from-transparent to-lavender-300 dark:(bg-gray-900 to-lavender-900 text-white) min-h-screen h-full w-full"
|
||||
>
|
||||
<div class="container mx-auto lg:px-40 md:20 sm:px-12 px-8">
|
||||
<header>
|
||||
<Navbar />
|
||||
|
@ -18,11 +20,13 @@ import { _ } from 'svelte-i18n';
|
|||
<main class="font-body">
|
||||
<slot />
|
||||
</main>
|
||||
|
||||
|
||||
<footer class="font-body py-8">
|
||||
<p class="text-sm opacity-50 hover:opacity-90 transition duration-300 ease-in-out">
|
||||
{$_('footer.made')} <span class="text-red-500">❤</span> {$_('footer.indonesia')}.
|
||||
{$_('footer.available')} <a href="https://www.github.com/aldy505/jokes-bapak2-api" class="hover:underline">{$_('footer.github')}</a>.
|
||||
{$_('footer.made')} <span class="text-red-500">❤</span>
|
||||
{$_('footer.indonesia')}.
|
||||
{$_('footer.available')}
|
||||
<a href="https://www.github.com/aldy505/jokes-bapak2-api" class="hover:underline">{$_('footer.github')}</a>.
|
||||
</p>
|
||||
</footer>
|
||||
</div>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<script lang="ts">
|
||||
// This page is meant to explain available API endpoints.
|
||||
import { _ } from 'svelte-i18n'
|
||||
import env from '$lib/env'
|
||||
import Codeblock from '../components/codeblock.svelte'
|
||||
import { _ } from 'svelte-i18n';
|
||||
import env from '$lib/env';
|
||||
import Codeblock from '../components/codeblock.svelte';
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
|
@ -42,4 +42,4 @@
|
|||
p {
|
||||
@apply text-base opacity-80 py-2;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script lang="ts">
|
||||
import { _ } from 'svelte-i18n'
|
||||
import { _ } from 'svelte-i18n';
|
||||
// This page is meant to guide people on how to use the API.
|
||||
</script>
|
||||
|
||||
|
@ -8,5 +8,8 @@
|
|||
</svelte:head>
|
||||
|
||||
<section>
|
||||
<p class="text-lg py-4">Sorry for the inconvinience. For now, please refer to the <a class="underline" href="/api">API</a> first. I'll work on this page later on.</p>
|
||||
</section>
|
||||
<p class="text-lg py-4">
|
||||
Sorry for the inconvinience. For now, please refer to the <a class="underline" href="/api">API</a> first. I'll work on
|
||||
this page later on.
|
||||
</p>
|
||||
</section>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script lang="ts">
|
||||
import { _ } from 'svelte-i18n'
|
||||
import { goto } from '$app/navigation'
|
||||
import { _ } from 'svelte-i18n';
|
||||
import { goto } from '$app/navigation';
|
||||
import env from '$lib/env';
|
||||
import Codeblock from '../components/codeblock.svelte';
|
||||
</script>
|
||||
|
@ -17,13 +17,12 @@
|
|||
</div>
|
||||
<div class="flex-1 px-6">
|
||||
<div class="max-w-xs mx-auto">
|
||||
<img src={env.API_ENDPOINT + `/today`} alt="Sample joke" class="py-6 shadow-2xl">
|
||||
<img src={env.API_ENDPOINT + `/today`} alt="Sample joke" class="py-6 shadow-2xl" />
|
||||
</div>
|
||||
<Codeblock class="px-4 md:px-0 mx-auto">
|
||||
$ curl -XGET 'https://jokesbapak2.herokuapp.com/v1/'
|
||||
</Codeblock>
|
||||
<Codeblock class="px-4 md:px-0 mx-auto">$ curl -XGET 'https://jokesbapak2.herokuapp.com/v1/'</Codeblock>
|
||||
<p class="text-sm text-center py-4 opacity-70 hover:opacity-100 transition duration-300 ease-in-out">
|
||||
{$_('home.more.1')} <span on:click={() => goto('/guide')}>{$_('navigation.guide')}</span> {$_('home.more.2')} <span on:click={() => goto('/api')}>{$_('navigation.api')}</span>
|
||||
{$_('home.more.1')} <span on:click={() => goto('/guide')}>{$_('navigation.guide')}</span>
|
||||
{$_('home.more.2')} <span on:click={() => goto('/api')}>{$_('navigation.api')}</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script lang="ts">
|
||||
import { _ } from 'svelte-i18n'
|
||||
import { _ } from 'svelte-i18n';
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
|
@ -12,20 +12,24 @@
|
|||
<p>{$_('why.exists.body.5')} {$_('why.exists.body.6')}</p>
|
||||
<h1 id="can-i-submit-my-dad-joke">{$_('why.submit.title')}</h1>
|
||||
<p>
|
||||
{$_('why.submit.body.1')} {$_('why.submit.body.2')}
|
||||
<a href="mailto:aldy505@tutanota.com">{$_('why.submit.body.3')}</a>
|
||||
{$_('why.submit.body.4')} {$_('why.submit.body.5')} {$_('why.submit.body.6')}
|
||||
{$_('why.submit.body.1')}
|
||||
{$_('why.submit.body.2')}
|
||||
<a href="mailto:aldy505@tutanota.com">{$_('why.submit.body.3')}</a>
|
||||
{$_('why.submit.body.4')}
|
||||
{$_('why.submit.body.5')}
|
||||
{$_('why.submit.body.6')}
|
||||
</p>
|
||||
<h1 id="can-i-contribute">{$_('why.contribute.title')}</h1>
|
||||
<p>
|
||||
{$_('why.contribute.body.1')} {$_('why.contribute.body.2')}
|
||||
<a href="https://www.github.com/aldy505/jokes-bapak2-api">{$_('why.contribute.body.3')}</a>
|
||||
{$_('why.contribute.body.1')}
|
||||
{$_('why.contribute.body.2')}
|
||||
<a href="https://www.github.com/aldy505/jokes-bapak2-api">{$_('why.contribute.body.3')}</a>
|
||||
{$_('why.contribute.body.4')}
|
||||
</p>
|
||||
<h1 id="other-inquiries">{$_('why.inquiries.title')}</h1>
|
||||
<p>
|
||||
{$_('why.inquiries.body.1')}
|
||||
<a href="mailto:aldy505@tutanota.com">{$_('why.inquiries.body.2')}</a>, {$_('why.inquiries.body.3')}
|
||||
{$_('why.inquiries.body.1')}
|
||||
<a href="mailto:aldy505@tutanota.com">{$_('why.inquiries.body.2')}</a>, {$_('why.inquiries.body.3')}
|
||||
</p>
|
||||
</section>
|
||||
|
||||
|
|
|
@ -9,8 +9,8 @@ const config = {
|
|||
preprocess: [
|
||||
windi({
|
||||
configPath: './windi.config.js',
|
||||
}),
|
||||
preprocess({ postcss: false })
|
||||
}),
|
||||
preprocess({ postcss: false }),
|
||||
],
|
||||
|
||||
kit: {
|
||||
|
@ -22,7 +22,7 @@ const config = {
|
|||
routes: './src/routes',
|
||||
assets: './static',
|
||||
hooks: './src',
|
||||
lib: './src/lib'
|
||||
lib: './src/lib',
|
||||
},
|
||||
adapter: adapter({
|
||||
// default options are shown
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import { defineConfig } from 'windicss/helpers'
|
||||
import { defineConfig } from 'windicss/helpers';
|
||||
|
||||
export default defineConfig({
|
||||
darkMode: 'media',
|
||||
theme: {
|
||||
extend: {
|
||||
fontFamily: {
|
||||
code: ['"Fira Mono"', '"Source Code Pro"', '"Lucida Console"', '"Courier New"', 'Courier', 'sans-serif'],
|
||||
code: ['"Fira Mono"', '"Source Code Pro"', '"Lucida Console"', '"Courier New"', 'Courier', 'sans-serif'],
|
||||
body: ['Rubik', 'Asap', 'Barlow', 'Arial', 'sans-serif'],
|
||||
},
|
||||
flex: {
|
||||
|
@ -16,42 +16,42 @@ export default defineConfig({
|
|||
},
|
||||
colors: {
|
||||
chetwode: {
|
||||
50: '#f9fafe',
|
||||
100: '#f3f4fe',
|
||||
200: '#e1e4fc',
|
||||
300: '#cfd4f9',
|
||||
400: '#abb4f5',
|
||||
500: '#8794f1',
|
||||
600: '#7a85d9',
|
||||
700: '#656fb5',
|
||||
800: '#515991',
|
||||
50: '#f9fafe',
|
||||
100: '#f3f4fe',
|
||||
200: '#e1e4fc',
|
||||
300: '#cfd4f9',
|
||||
400: '#abb4f5',
|
||||
500: '#8794f1',
|
||||
600: '#7a85d9',
|
||||
700: '#656fb5',
|
||||
800: '#515991',
|
||||
900: '#424976',
|
||||
},
|
||||
dodger: {
|
||||
50: '#f4f9fe',
|
||||
100: '#e8f2fd',
|
||||
200: '#c6dffa',
|
||||
300: '#a4cbf7',
|
||||
400: '#5fa5f2',
|
||||
500: '#1b7eec',
|
||||
600: '#1871d4',
|
||||
700: '#145fb1',
|
||||
800: '#104c8e',
|
||||
900: '#0d3e74',
|
||||
50: '#f4f9fe',
|
||||
100: '#e8f2fd',
|
||||
200: '#c6dffa',
|
||||
300: '#a4cbf7',
|
||||
400: '#5fa5f2',
|
||||
500: '#1b7eec',
|
||||
600: '#1871d4',
|
||||
700: '#145fb1',
|
||||
800: '#104c8e',
|
||||
900: '#0d3e74',
|
||||
},
|
||||
lavender: {
|
||||
50: '#fefbff',
|
||||
100: '#fef6fe',
|
||||
200: '#fceafd',
|
||||
300: '#fbddfb',
|
||||
400: '#f7c3f8',
|
||||
500: '#f4a9f5',
|
||||
600: '#dc98dd',
|
||||
700: '#b77fb8',
|
||||
800: '#926593',
|
||||
900: '#785378',
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
50: '#fefbff',
|
||||
100: '#fef6fe',
|
||||
200: '#fceafd',
|
||||
300: '#fbddfb',
|
||||
400: '#f7c3f8',
|
||||
500: '#f4a9f5',
|
||||
600: '#dc98dd',
|
||||
700: '#b77fb8',
|
||||
800: '#926593',
|
||||
900: '#785378',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue