This commit is contained in:
I-Have-An-Issue 2022-10-07 18:03:57 -04:00
parent a000c2179b
commit 207f1188b3
No known key found for this signature in database
GPG Key ID: E55435DEA0825091
34 changed files with 177 additions and 89 deletions

View File

@ -1,2 +1,3 @@
PRIVATE_KEY=
MONGO_URL=
MONGO_URL=
MAINTENANCE=false

View File

@ -2,7 +2,7 @@
"useTabs": true,
"singleQuote": false,
"trailingComma": "none",
"printWidth": 100,
"printWidth": 200,
"plugins": ["prettier-plugin-svelte"],
"pluginSearchDirs": ["."],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]

View File

@ -1,6 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
plugins: {
tailwindcss: {},
autoprefixer: {}
}
};

View File

@ -9,23 +9,39 @@ body {
margin: 0;
}
.navbar {
.scrolling-background {
background-image: url(/img/background.png);
animation-name: scrollbg;
animation-duration: 120s;
animation-iteration-count: infinite;
animation-timing-function: linear;
}
@keyframes scrollbg {
from {
background-position: 0 0;
}
to {
background-position: 100% 100%;
}
animation-timing-function: ease;
animation-direction: alternate;
}
.dropdown:hover .dropdown-content {
display: block;
}
.mobile-compatible {
display: none;
}
@keyframes scrollbg {
0% {
background-position: 0 0;
}
100% {
background-position: 100% 100%;
}
}
@media (max-width: 1024px) {
.navbar {
display: none !important;
}
.mobile-compatible {
display: block;
}
}

8
src/hooks.server.js Normal file
View File

@ -0,0 +1,8 @@
/** @type {import('@sveltejs/kit').Handle} */
export async function handle({ event, resolve }) {
if (event.url.pathname !== "/maintenance" && process.env.MAINTENANCE == "true" && process.env.PRODUCTION == "true") {
return new Response("", { status: 302, headers: { Location: "/maintenance" } });
}
return await resolve(event);
}

View File

@ -0,0 +1,16 @@
<script>
import { page } from "$app/stores";
</script>
<div class="mx-auto rounded-lg shadow border border-gray-300 max-w-2xl text-center divide-y">
<div class="p-2">
<img class="mx-auto mb-2" src="/img/error.png" alt="" />
<h1 class="mb-1 text-xl font-bold">{$page.status == 404 ? "Not Found" : "Unexpected Error"}</h1>
<p>The server ran into an error while processing your request.</p>
<p>Please try again later, or report this incident to a Rowblox developer if it persists.</p>
</div>
<div class="py-4 px-2 text-lg text-black">
<span class="mr-2 px-3 py-1 rounded border-2 border-blue-500 shadow-lg cursor-pointer hover:bg-blue-200" onclick="javascript:history.back()"> Go Back </span>
<a class="mr-2 px-3 py-1 rounded border-2 border-gray-500 shadow-lg hover:bg-gray-200" href="/"> Go Home </a>
</div>
</div>

View File

@ -0,0 +1,71 @@
<div class="navbar scrolling-background text-lg py-1 text-white">
<div class="container flex items-center">
<a href="/">
<img class="w-40 mr-6" src="/img/banner.png" alt="" />
</a>
<a class="mr-7" href="/games">Games</a>
<a class="mr-7" href="/catalog">Catalog</a>
<a class="mr-7" href="/forums">Forums</a>
<input
class="rounded-lg px-2 border-2 border-grey-300 text-black"
type="text"
name="search"
id="search"
placeholder="Search"
/>
<span class="flex-grow" />
<a class="mr-2 px-2 flex items-center rounded bg-blue-500 shadow-lg" href="/my/money">
<img class="h-6 mr-1.5" src="/img/rowbux.png" alt="" />
100
</a>
<div class="relative inline-block dropdown">
<button class="hover:text-zinc-200" href="/my/profile"
>abcdefghijklmnop
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
fill="currentColor"
class="w-4 h-4 inline-block"
>
<path
fill-rule="evenodd"
d="M12.53 16.28a.75.75 0 01-1.06 0l-7.5-7.5a.75.75 0 011.06-1.06L12 14.69l6.97-6.97a.75.75 0 111.06 1.06l-7.5 7.5z"
clip-rule="evenodd"
/>
</svg>
</button>
<div
class="absolute bg-white text-center text-black w-36 right-0 origin-top-right rounded border border-gray-300 divide-y shadow-lg hidden dropdown-content"
>
<div>
<a class="block px-4 py-0.5 text-gray-700" href="/my/profile">Profile</a>
<a class="block px-4 py-0.5 text-gray-700" href="/my/settings">Settings</a>
</div>
<a class="block px-4 py-0.5 text-red-700" href="/logout">Logout</a>
</div>
</div>
</div>
</div>
<div class="navbar bg-zinc-800 text-base py-0.5 text-white">
<div class="container flex items-center">
<a class="mr-6" href="/my/avatar">Avatar</a>
<a class="mr-6" href="/my/friends">Friends</a>
<a class="mr-6" href="/my/money">Money</a>
<a class="mr-6" href="/groups">Groups</a>
<a class="mr-6" href="/people">People</a>
<a class="mr-6" href="/my/blogs">Blogs</a>
<a class="mr-6" href="/my/invites">Invites</a>
</div>
</div>
<div class="mobile-compatible scrolling-background text-lg py-1 text-white">
<div class="container flex items-center">
<p>"I'm lazy as fuck" -calones</p>
</div>
</div>
<div class="text-black container mt-4">
<slot />
</div>

View File

@ -0,0 +1,6 @@
import { error } from "@sveltejs/kit";
/** @type {import('./$types').PageLoad} */
export function load(event) {
throw error(404, "Not Found");
}

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

@ -0,0 +1,7 @@
<div class="scrolling-background">
<div class="container flex flex-col h-screen">
<span class="flex-grow" />
<slot />
<span class="flex-grow" />
</div>
</div>

View File

@ -0,0 +1,11 @@
<svelte:head>
<title>Landing - Rowblox</title>
</svelte:head>
<div class="max-w-lg mx-auto text-center">
<img class="max-w-lg" src="/img/banner.png" alt="" />
<div class="text-xl text-white">
<a class="px-5 py-1 rounded shadow-lg border-2 border-blue-500 hover:bg-blue-500" href="/login">Login</a>
<a class="px-5 py-1 rounded shadow-lg border-2 border-blue-500 hover:bg-blue-500" href="/register">Register</a>
</div>
</div>

View File

@ -0,0 +1,5 @@
<svelte:head>
<title>Login - Rowblox</title>
</svelte:head>
<div class="max-w-lg mx-auto text-center">insert form here</div>

View File

@ -0,0 +1,8 @@
<svelte:head>
<title>Maintenance - Rowblox</title>
</svelte:head>
<div class="max-w-xl mx-auto text-center">
<img class="max-w-lg" src="/img/banner.png" alt="" />
<p class="text-xl text-white">Rowblox is currently under development, check back later!</p>
</div>

View File

@ -0,0 +1,5 @@
<svelte:head>
<title>Register - Rowblox</title>
</svelte:head>
<div class="max-w-lg mx-auto text-center">insert form here</div>

View File

@ -1,5 +0,0 @@
<script>
import { page } from '$app/stores';
</script>
<h1>{$page.status}: lorum ipsum</h1>

View File

@ -2,65 +2,4 @@
import "../app.css";
</script>
<div class="navbar text-lg py-1 text-white">
<div class="container flex items-center">
<a href="/">
<img class="w-40 mr-6" src="/img/banner.png" alt="" />
</a>
<a class="mr-7" href="/games">Games</a>
<a class="mr-7" href="/catalog">Catalog</a>
<a class="mr-7" href="/forums">Forums</a>
<input
class="rounded-lg px-2 border-2 border-grey-300 text-black"
type="text"
name="search"
id="search"
placeholder="Search"
/>
<span class="flex-grow" />
<a class="mr-2 px-2 flex items-center rounded bg-blue-500 shadow-lg" href="/my/money">
<img class="h-6 mr-1.5" src="/img/rowbux.png" alt="" />
100
</a>
<div class="relative inline-block dropdown">
<button class="hover:text-zinc-200" href="/my/profile"
>abcdefghijklmnop
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
fill="currentColor"
class="w-4 h-4 inline-block"
>
<path
fill-rule="evenodd"
d="M12.53 16.28a.75.75 0 01-1.06 0l-7.5-7.5a.75.75 0 011.06-1.06L12 14.69l6.97-6.97a.75.75 0 111.06 1.06l-7.5 7.5z"
clip-rule="evenodd"
/>
</svg>
</button>
<div
class="absolute bg-white text-center text-black w-36 right-0 origin-top-right rounded border border-gray-300 divide-y shadow-lg hidden dropdown-content"
>
<div>
<a class="block px-4 py-0.5 text-gray-700" href="/my/profile">Profile</a>
<a class="block px-4 py-0.5 text-gray-700" href="/my/settings">Settings</a>
</div>
<a class="block px-4 py-0.5 text-red-700" href="/logout">Logout</a>
</div>
</div>
</div>
</div>
<div class="bg-zinc-800 text-base py-0.5 text-white">
<div class="container flex items-center">
<a class="mr-6" href="/my/friends">Friends</a>
<a class="mr-6" href="/my/avatar">Avatar</a>
<a class="mr-6" href="/my/money">Money</a>
<a class="mr-6" href="/groups">Groups</a>
<a class="mr-6" href="/people">People</a>
<a class="mr-6" href="/my/invites">Invites</a>
<a class="mr-6" href="/my/blogs">Blogs</a>
</div>
</div>
<slot />

BIN
static/img/error.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

@ -1,4 +1,4 @@
import adapter from '@sveltejs/adapter-node';
import adapter from "@sveltejs/adapter-node";
import preprocess from "svelte-preprocess";
/** @type {import('@sveltejs/kit').Config} */
@ -8,9 +8,9 @@ const config = {
},
preprocess: [
preprocess({
postcss: true,
}),
],
postcss: true
})
]
};
export default config;

View File

@ -1,4 +1,4 @@
import { sveltekit } from '@sveltejs/kit/vite';
import { sveltekit } from "@sveltejs/kit/vite";
const config = {
plugins: [sveltekit()]