randomized theme

This commit is contained in:
MagicBOTAlex 2025-04-06 05:18:02 +02:00
parent a0eaeb15fd
commit a3daf3cfd5
6 changed files with 2635 additions and 42 deletions

View file

@ -31,13 +31,16 @@
});
import { onMount } from 'svelte';
import { themeChange } from 'theme-change'
onMount(() => {
const themesArr = ["green", "netherrack", "dark", "pink"];
onMount(async () => {
const lock = document.createElement('meta');
lock.name = 'darkreader-lock';
document.head.appendChild(lock);
themeChange(false) // false parameter is required for svelte
const randomNumber = Math.floor(Math.random() * 4);
console.log("Slecting: " + themesArr[randomNumber]);
document.documentElement.setAttribute('data-theme', themesArr[randomNumber]);
});
</script>

View file

@ -72,12 +72,12 @@
</div>
</div>
<div class="cozette flex flex-col justify-center items-center w-full md:px-8 py-4">
<div class="cozette flex flex-col justify-center items-center w-full md:px-8 pt-4">
<h2 class="text-center" style="font-size: {!mobile ? 3 : 2}rem;">
Developers
</h2>
<div>
<div class="grid space-y-1 p-4 max-lg:px-0 rounded" style="width: 100%; max-width: 21cm;">
<div class="">
<div class="grid grid-cols-2 gap-4 p-4 max-lg:px-0 w-full">
<Profile name="Zhen / Alex" tags={["Programmer", "3D artist", "UX Designer"]} isMobile={mobile}>
<span>
@ -86,7 +86,6 @@
</span>
</Profile>
<ProfileSpacer/>
<Profile name="Sveske / Benjamin" tags={["Programmer", "Back-end Admin"]} isMobile={mobile}>
<span>
<p><span class="inline line-through">Hi, I use Arch, btw. </span> I use NixOS now</p>
@ -94,10 +93,8 @@
</span>
</Profile>
<ProfileSpacer/>
<Profile isSnorre={true} tags={["Programmer"]} isMobile={mobile}/>
<ProfileSpacer/>
<Profile name="Oliver" tags={["Sound designer", "Story designer","2D Artist", "Programmer"]} isMobile={mobile}>
<span>
<p>Snorre does not get paid.</p>
@ -105,7 +102,6 @@
</span>
</Profile>
<ProfileSpacer/>
<Profile name="Kim" tags={["Cinemachine", "3D Artist", "Programmer"]} isMobile={mobile}>
<span>
<p>Abla espaniol</p>
@ -113,7 +109,6 @@
</span>
</Profile>
<ProfileSpacer/>
<Profile name="Zylvester" tags={["2D/3D Artist", "Sound designer", "Story designer"]} isMobile={mobile}>
<span>
<p>Hi, I am [insert text here]</p>
@ -124,14 +119,9 @@
</div>
</div>
<!-- space -->
<div class="py-8 flex justify-center">
<div style="width: 50%;">
<ProfileSpacer/>
</div>
</div>
<div class="py-4"></div>
<div class="grid place-content-center place-items-center min-h-screen pointer-events-auto font-mono">
<div class="grid place-content-center place-items-center pointer-events-auto font-mono">
<!-- <article class="pt-16 prose overflow-hidden {mobile ? "px-8" : ""}">
<h2 class="main-title {!mobile ? "text-center m-auto" : "m-0"}" style="font-size: {!mobile ? 3 : 3}rem; ">About us</h2>
<p>We are a small group of developers and artists who started out as classmates, united by our passion for all things technology.</p>
@ -142,7 +132,7 @@
<ProfileSpacer/>
</div> -->
<article class="pt-16 prose {mobile ? "px-8" : ""}">
<article class="prose {mobile ? "px-8" : ""}">
<h2 class="main-title {!mobile ? "text-center m-auto" : "m-0"}" style="font-size: {!mobile ? 3 : 3}rem; ">Games</h2>
<p>Here are some of our games from various gamejams from the past. <br/>(<span class="font-bold">ONLY</span> 48 hours per game)</p>
</article>

View file

@ -11,7 +11,7 @@
</script>
<div class="bg-grid-200 border-2 border-base-300 pl-1 pr-4 rounded cozette max-lg:pb-2">
<div class="bg-grid-100 border-2 border-base-100 pl-1 pr-4 rounded-md cozette max-lg:pb-2">
{#if !isSnorre}
<div class="developersProfile {isSnorre ? "isSnorre" : ""} pl-1 font-mono">
<NameAndTag name={name} tags={tags} isMobile={isMobile}/>