Skip to content

Commit

Permalink
fix(spacing) & chore(lint)
Browse files Browse the repository at this point in the history
  • Loading branch information
retrouser955 committed Sep 28, 2024
1 parent db7182c commit c227aba
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 42 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,6 @@
"svelte-icons": "^2.1.0",
"tailwind-merge": "^2.5.2",
"tailwind-variants": "^0.2.1"
}
},
"packageManager": "[email protected]+sha512.38dc6fba8dba35b39340b9700112c2fe1e12f10b17134715a4aa98ccf7bb035e76fd981cf0bb384dfa98f8d6af5481c2bef2f4266a24bfa20c34eb7147ce0b5e"
}
41 changes: 23 additions & 18 deletions src/routes/+error.svelte
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
<main class="w-screen h-screen bg-gradient-to-b flex items-center justify-center overflow-hidden from-blue-950 to-gray-900">
<main
class="w-screen h-screen bg-gradient-to-b flex items-center justify-center overflow-hidden from-blue-950 to-gray-900"
>
<!-- from-blue-950 to-gray-900 -->
<div class=" bg-slate-600 p-4 rounded-2xl shadow-xl">
<div class="w-96">
<!-- Change bg-base-100 to bg-blue-100 or any other color -->
<h2 class="text-xl font-bold text-gray-300">Oops, looks like this page doesn´t exist</h2>
<figure class="px-10 pt-6">
<img src="../images/itsfine.gif" alt="gif" class="rounded-xl" />
</figure>

<!-- from-blue-950 to-gray-900 -->
<div class=' bg-slate-600 p-4 rounded-2xl shadow-xl'>
<div class="w-96"> <!-- Change bg-base-100 to bg-blue-100 or any other color -->
<h2 class="text-xl font-bold text-gray-300">Oops, looks like this page doesn´t exist</h2>
<figure class="px-10 pt-6 ">
<img src="../images/itsfine.gif" alt="gif" class="rounded-xl" />
</figure>

<div class="card-body items-center text-center">
<p class='text-secondary'>It's ok it sometimes happens to everyone</p>
<div class="card-actions">
<a class="mx-6 mt-2 flex items-center justify-center h-6 rounded-lg bg-blue-600 text-lg hover:bg-blue-500 transition-all text-white font-bold" href="/">Go back to the landing page</a>
</div>
</div>
</div>
</div>
</main>
<div class="card-body items-center text-center">
<p class="text-secondary">It's ok it sometimes happens to everyone</p>
<div class="card-actions">
<a
class="mx-6 mt-2 flex items-center justify-center h-6 rounded-lg bg-blue-600 text-lg hover:bg-blue-500 transition-all text-white font-bold"
href="/">Go back to the landing page</a
>
</div>
</div>
</div>
</div>
</main>
12 changes: 6 additions & 6 deletions src/routes/+layout.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
export const ssr = false;

import { redirect } from '@sveltejs/kit';
import getLocalDB from '$lib/utils/localDB/manager';
import { redirect } from "@sveltejs/kit";
import getLocalDB from "$lib/utils/localDB/manager";

const loginLock = ['/interface'];
const loginLock = ["/interface"];
//redirect to login in locked pages
export const load = async ({ url }) => {
const db = getLocalDB();
if (loginLock.includes(url?.pathname) && !db.userID) {
throw redirect(302, '/auth/login');
throw redirect(302, "/auth/login");
}
return {
user: db?.userID || null
user: db?.userID || null,
};
};
};
34 changes: 17 additions & 17 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
export let data;
const {user} = data
const { user } = data;
</script>

<main class="overflow-x-hidden">
Expand Down Expand Up @@ -33,26 +33,26 @@
</div>
<div class="flex items-center justify-center mt-10">
{#if user}
<a
href="/interface"
class="mr-2 w-40 flex items-center justify-center h-12 rounded-lg bg-blue-600 text-lg hover:bg-blue-500 transition-all text-white font-bold"
>Home</a
>
<a
href="/editor?id=0"
class="mr-2 w-40 flex items-center justify-center h-12 rounded-lg bg-blue-600 text-lg hover:bg-blue-500 transition-all text-white font-bold"
>Workspace</a
>
<a
href="/interface"
class="mr-2 w-40 flex items-center justify-center h-12 rounded-lg bg-blue-600 text-lg hover:bg-blue-500 transition-all text-white font-bold"
>Home</a
>
<a
href="/editor?id=0"
class="mr-2 w-40 flex items-center justify-center h-12 rounded-lg bg-blue-600 text-lg hover:bg-blue-500 transition-all text-white font-bold"
>Workspace</a
>
{:else}
<a
href="/interface"
class="mr-2 w-40 flex items-center justify-center h-12 rounded-lg bg-blue-600 text-lg hover:bg-blue-500 transition-all text-white font-bold"
>Getting Started</a
>
<a
href="/interface"
class="mr-2 w-40 flex items-center justify-center h-12 rounded-lg bg-blue-600 text-lg hover:bg-blue-500 transition-all text-white font-bold"
>Getting Started</a
>
{/if}
<a
href="/docs/getting-started"
class="ml-2 w-40 flex items-center justify-center h-12 rounded-lg bg-slate-600 text-lg hover:bg-slate-500 transition-all text-white font-bold"
class="w-40 flex items-center justify-center h-12 rounded-lg bg-slate-600 text-lg hover:bg-slate-500 transition-all text-white font-bold"
>Read the Docs</a
>
</div>
Expand Down

0 comments on commit c227aba

Please sign in to comment.