···99 static readonly PDS_URL: string = "https://pds.witchcraft.systems";
10101111 /**
1212+ * Hue value for the color scheme
1313+ * @default 257
1414+ */
1515+ static readonly HUE: number = 13;
1616+1717+ /**
1218 * The base URL of the frontend service for linking to replies/quotes/accounts etc.
1319 * @default "https://deer.social"
1420 */
+29-3
src/App.svelte
···44 import InfiniteLoading from "svelte-infinite-loading";
55 import { getNextPosts, Post, getAllMetadataFromPds } from "./lib/pdsfetch";
66 import { Config } from "../config";
77- const accountsPromise = getAllMetadataFromPds();
87 import { onMount } from "svelte";
88+ import { CssVarsFromHue } from "./lib/colorgenerator";
99+1010+1111+ const accountsPromise = getAllMetadataFromPds();
1212+ let colors = CssVarsFromHue(Config.HUE);
9131014 let posts: Post[] = [];
11151616+ const cycleColors = async () => {
1717+ let hue = Config.HUE;
1818+ while (true) {
1919+ colors = CssVarsFromHue(hue);
2020+ hue += 1;
2121+ if (hue > 360) {
2222+ hue = 0;
2323+ }
2424+ // Wait for 1 second before changing colors again
2525+ await new Promise((resolve) => setTimeout(resolve, 10));
2626+ }
2727+ }
2828+ cycleColors();
1229 onMount(() => {
1330 // Fetch initial posts
1431 getNextPosts().then((initialPosts) => {
···3350 };
3451</script>
35523636-<main>
5353+<main style="
5454+ --background-color: {colors.background};
5555+ --header-background-color: {colors.header};
5656+ --content-background-color: {colors.content};
5757+ --text-color: {colors.text};
5858+ --border-color: {colors.accent};
5959+ --link-color: {colors.link};
6060+ --link-hover-color: {colors.linkHover};
6161+ --indicator-inactive-color: #4a4a4a;
6262+ --indicator-active-color: {colors.accent};
6363+">
3764 <div id="Content">
3865 {#await accountsPromise}
3966 <p>Loading...</p>
···65926693<style>
6794 /* desktop style */
6868-6995 #Content {
7096 display: flex;
7197 /* split the screen in half, left for accounts, right for posts */