Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restart 1 #4

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,814 changes: 762 additions & 1,052 deletions package-lock.json

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"private": true,
"scripts": {
"dev": "vite dev",
"host": "vite dev --host",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
Expand All @@ -13,14 +14,15 @@
"@sveltejs/adapter-auto": "^2.0.0",
"@sveltejs/adapter-static": "^2.0.2",
"@sveltejs/adapter-vercel": "^3.0.3",
"@sveltejs/kit": "^1.5.0",
"@sveltejs/kit": "^1.20.4",
"autoprefixer": "^10.4.14",
"postcss": "^8.4.23",
"postcss-load-config": "^4.0.1",
"prettier": "^3.0.0",
"prettier-plugin-tailwindcss": "^0.4.1",
"svelte": "^3.54.0",
"svelte-check": "^3.0.1",
"svelte": "^4.0.0",
"svelte-check": "^3.4.3",
"svelte-intersection-observer": "^0.10.1",
"svelte-preprocess": "^5.0.3",
"tailwindcss": "^3.3.1",
"tslib": "^2.4.1",
Expand All @@ -29,6 +31,6 @@
},
"type": "module",
"dependencies": {
"svelte-intersection-observer": "^0.10.1"
"@vercel/speed-insights": "^1.0.12"
}
}
81 changes: 11 additions & 70 deletions src/app.postcss
Original file line number Diff line number Diff line change
@@ -1,90 +1,31 @@
/** Global Styles */
@import url("https://fonts.googleapis.com/css2?family=Syne&display=swap");

@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
:root {
font-family: "Syne", sans-serif;
@apply text-base-content bg-base overflow-x-hidden
scroll-smooth selection:bg-base-content selection:text-base;
}

body {
@apply w-screen;
font-family: "Syne", 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
@apply m-0 bg-base text-base-content;
sam-the-programmer marked this conversation as resolved.
Show resolved Hide resolved
}

::-webkit-scrollbar {
width: 0.8rem;
width: 10px;
}

::-webkit-scrollbar-track {
@apply bg-base;
}

::-webkit-scrollbar-thumb {
border-radius: 0.5rem;
background-color: rgba(25, 25, 25, 0.4);
@apply bg-white bg-opacity-20;
border-radius: 10px;
}
}

@layer utilities {
.grid-center {
@apply grid place-items-center;
.brand-text {
@apply bg-gradient-to-r from-primary to-secondary bg-clip-text text-transparent;
}

.flex-center {
@apply flex items-center justify-center;
}

.blur-circle {
@apply blur-2xl rounded-full opacity-50 aspect-square;
}

.blur-circle.delayed {
animation-delay: 1s;
}

.grainy {
filter: url("#grainy") contrast(2) brightness(0.3);
}

.animate-float {
@media (prefers-reduced-motion: no-preference) {
animation: float 4s ease-in-out infinite;
}
}

.animate-float-sm {
@media (prefers-reduced-motion: no-preference) {
animation: float-sm 4s ease-in-out infinite;
}
}

@keyframes float {
0% {
transform: translateY(0px);
}

50% {
transform: translateY(-2rem);
}

100% {
transform: translateY(0px);
}
}

@keyframes float-sm {
0% {
transform: translateY(0px);
}

50% {
transform: translateY(-0.5rem);
}

100% {
transform: translateY(0px);
}
}
}
}
35 changes: 0 additions & 35 deletions src/lib/components/Footer.svelte

This file was deleted.

89 changes: 0 additions & 89 deletions src/lib/components/Navbar.svelte

This file was deleted.

2 changes: 0 additions & 2 deletions src/lib/components/Navlinks.svelte

This file was deleted.

6 changes: 6 additions & 0 deletions src/lib/icons/RightArrow.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Missing ARIA attributes for SVG.

Consider adding ARIA attributes to the SVG element to improve accessibility, such as role="img" and aria-label.

Suggested change
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32"
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" role="img" aria-label="Right Arrow">
<path
d="m31.71 15.29-10-10-1.42 1.42 8.3 8.29H0v2h28.59l-8.29 8.29 1.41 1.41 10-10a1 1 0 0 0 0-1.41z"
data-name="3-Arrow Right"
/>
</svg>

><path
d="m31.71 15.29-10-10-1.42 1.42 8.3 8.29H0v2h28.59l-8.29 8.29 1.41 1.41 10-10a1 1 0 0 0 0-1.41z"
data-name="3-Arrow Right"
/></svg
>
13 changes: 13 additions & 0 deletions src/lib/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { browser } from "$app/environment";
import { onMount } from "svelte";

export let reduceMotion = false;

if (browser) {
const mediaQuery = window.matchMedia("(prefers-reduced-motion: reduce)");
reduceMotion = mediaQuery.matches;

mediaQuery.addEventListener("change", (event) => {
reduceMotion = event.matches;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (bug_risk): Potential issue with event listener.

Consider removing the event listener when the component is unmounted to avoid potential memory leaks.

Suggested change
mediaQuery.addEventListener("change", (event) => {
reduceMotion = event.matches;
const handleChange = (event) => {
reduceMotion = event.matches;
};
mediaQuery.addEventListener("change", handleChange);
return () => {
mediaQuery.removeEventListener("change", handleChange);
};

});
}
36 changes: 36 additions & 0 deletions src/lib/ui/LogoBehind.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<script lang="ts">
import { reduceMotion } from "$lib";
import { onMount } from "svelte";
import { fade, fly } from "svelte/transition";

let ready = reduceMotion;
onMount(() => (ready = true));
</script>

<div>
<div
class="w-full h-screen relative -z-10 place-items-center
tiny:grid hidden"
>
{#if ready}
<img
src="/imgs/favicon.svg"
alt="Tetrahedron AI Logo"
class="h-5/6 max-w-[screen] absolute top-0 blur-xl"
in:fly={{ y: -30, duration: 1000 }}
/>
<div
class="absolute top-[90vh] left-0 h-[20vh] w-4/6 rounded-[100%] mx-[16.67%]
bg-gradient-to-r from-primary to-secondary blur-2xl opacity-50"
in:fly={{ y: 30, duration: 1000 }}
></div>
{/if}
</div>

{#if ready}
<div class="w-full h-screen top-0 absolute"
in:fade={{ duration: 500, delay: 600 }}>
<slot />
</div>
{/if}
</div>
27 changes: 27 additions & 0 deletions src/lib/ui/Navbar.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<nav class="w-full fixed top-0 z-20
flex justify-between items-center p-5
text-2xl bg-gradient-to-b from-base to-transparent">
<div>
<h1>Tetrahedron</h1>
</div>
<div class="hidden sm:flex items-center gap-6">
<h2>About</h2>
<h2>Research</h2>
</div>

<div class="flex sm:hidden flex-col gap-1.5 hamburger">
<span></span>
<span></span>
<span></span>
</div>
</nav>

<style lang="postcss">
.hamburger {
span {
width: 30px;
height: 3px;
@apply bg-base-content;
}
}
</style>
19 changes: 0 additions & 19 deletions src/routes/+error.svelte

This file was deleted.

16 changes: 6 additions & 10 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
<script>
import Footer from "$lib/components/Footer.svelte";
<script lang="ts">
import Navbar from "$lib/ui/Navbar.svelte";
import "../app.postcss";
import Navbar from "../lib/components/Navbar.svelte";

import { injectSpeedInsights } from "@vercel/speed-insights/sveltekit";

injectSpeedInsights();
</script>

<Navbar />
<slot />
<Footer />

<svg xmlns="http://www.w3.org/2000/svg" width="0" height="0">
<filter id="grainy">
<feTurbulence type="turbulence" baseFrequency="0.4" />
</filter>
</svg>
Loading