diff --git a/.gitignore b/.gitignore index ebdb2d1..391ce0e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ .netlify node_modules dist -*.log +.env diff --git a/README.md b/README.md index 173f021..0ef8281 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,3 @@ -[![Netlify Status](https://api.netlify.com/api/v1/badges/10889a9b-c148-488d-aecd-9a44e0cf6f46/deploy-status)](https://taevas.xyz) - # taevas.xyz My personal website! @@ -7,18 +5,16 @@ My personal website! ## Build and develop ```bash -bun install --global netlify-cli -bun i --ignore-scripts -netlify dev +bun i +bun dev ``` ## Environment variables This package uses [`@carbon/icons-react`](https://github.com/carbon-design-system/carbon/tree/main/packages/icons-react), which **installs [a telemetry package which can be disabled](https://github.com/ibm-telemetry/telemetry-js/tree/main#opting-out-of-ibm-telemetry-data-collection):** -```bash -netlify env:set IBM_TELEMETRY_DISABLED true -``` +Set the environment variable IBM_TELEMETRY_DISABLED to true + This package makes use of several online APIs through Netlify in order to deliver the `Infos` that are available on the right side of the website, accessing most of these APIs requires a key (or similar), which can be set through the following environment variables: diff --git a/netlify/functions/coding_github.ts b/api/coding_github.ts similarity index 70% rename from netlify/functions/coding_github.ts rename to api/coding_github.ts index 26d213b..8ac45da 100644 --- a/netlify/functions/coding_github.ts +++ b/api/coding_github.ts @@ -1,9 +1,9 @@ -import {type Handler} from "@netlify/functions"; import {Octokit} from "@octokit/rest"; -import {type GithubInfo} from "#Infos/Coding/GitHub.js"; +import {type GithubInfo} from "#Infos/Coding/GitHub.tsx"; +import type { Handler } from ".."; -const handler: Handler = async () => { - const octokit = new Octokit({auth: process.env.API_GITHUB}); +export const coding_github: Handler = async () => { + const octokit = new Octokit({auth: process.env["API_GITHUB"]}); const github = await octokit.rest.activity.listEventsForAuthenticatedUser({username: "TTTaevas"}); const publicPush = github.data.find((e) => (e.type === "PushEvent" || e.type === "PullRequestEvent") && e.public); @@ -19,10 +19,7 @@ const handler: Handler = async () => { } : undefined, }; - return { - statusCode: 200, - body: JSON.stringify(info), - }; + return new Response(new Blob([JSON.stringify(info)], { + type: "application/json", + }), {status: 200}); }; - -export {handler}; diff --git a/api/coding_gitlab.ts b/api/coding_gitlab.ts new file mode 100644 index 0000000..9d6e854 --- /dev/null +++ b/api/coding_gitlab.ts @@ -0,0 +1,21 @@ +import { Gitlab } from "@gitbeaker/rest"; +import {type GitlabInfo} from "#Infos/Coding/GitLab.tsx"; +import type { Handler } from ".."; + +export const coding_gitlab: Handler = async () => { + const api = new Gitlab({token: process.env["API_GITLAB"]!}); + const gitlab = await api.Events.all({action: "pushed"}); + + const created_at = gitlab.at(0)?.created_at; + if (typeof created_at !== "string") { + return new Response("Not Found", {status: 404}); + } + + const activity: GitlabInfo = { + date: created_at.substring(0, created_at.indexOf("T")), + }; + + return new Response(new Blob([JSON.stringify(activity)], { + type: "application/json", + }), {status: 200}); +}; diff --git a/netlify/functions/coding_kitsudev.ts b/api/coding_kitsudev.ts similarity index 57% rename from netlify/functions/coding_kitsudev.ts rename to api/coding_kitsudev.ts index 3e62b92..fc095b7 100644 --- a/netlify/functions/coding_kitsudev.ts +++ b/api/coding_kitsudev.ts @@ -1,7 +1,7 @@ -import {type Handler} from "@netlify/functions"; -import { type KitsudevInfo } from "#Infos/Coding/KitsuDev.js"; +import { type KitsudevInfo } from "#Infos/Coding/KitsuDev.tsx"; +import type { Handler } from ".."; -const handler: Handler = async () => { +export const coding_kitsudev: Handler = async () => { const kitsudev = await (await fetch("https://kitsunes.dev/api/v1/users/Taevas/activities/feeds?limit=1")).json() as [{ repo: { full_name: string @@ -16,10 +16,7 @@ const handler: Handler = async () => { date: kitsudev[0].created }; - return { - statusCode: 200, - body: JSON.stringify(info), - }; + return new Response(new Blob([JSON.stringify(info)], { + type: "application/json", + }), {status: 200}); }; - -export {handler}; diff --git a/netlify/functions/fediverse_kitsuclub.ts b/api/fediverse_kitsuclub.ts similarity index 86% rename from netlify/functions/fediverse_kitsuclub.ts rename to api/fediverse_kitsuclub.ts index 99340a5..22b5921 100644 --- a/netlify/functions/fediverse_kitsuclub.ts +++ b/api/fediverse_kitsuclub.ts @@ -1,11 +1,11 @@ -import {type Handler} from "@netlify/functions"; -import { KitsuclubInfo } from "#Infos/Fediverse/KitsuClub.js"; +import { type KitsuclubInfo } from "#Infos/Fediverse/KitsuClub.tsx"; +import type { Handler } from ".."; -const handler: Handler = async () => { +export const fediverse_kitsuclub: Handler = async () => { const kitsuclub = await (await fetch("https://kitsunes.club/api/users/notes", { method: "POST", headers: { - "Authorization": `Bearer ${process.env.API_KITSUCLUB}`, + "Authorization": `Bearer ${process.env["API_KITSUCLUB"]}`, "Content-Type": "application/json", }, body: JSON.stringify({ @@ -42,9 +42,7 @@ const handler: Handler = async () => { const details = kitsuclub.at(Math.max(0, kitsuclub.length - 1)); if (!details) { - return { - statusCode: 404, - }; + return new Response("Not Found", {status: 404}); } let scan_text = details.text; @@ -89,10 +87,7 @@ const handler: Handler = async () => { }) }; - return { - statusCode: 200, - body: JSON.stringify(activity), - }; + return new Response(new Blob([JSON.stringify(activity)], { + type: "application/json", + }), {status: 200}); }; - -export {handler}; diff --git a/api/gaming_osu.ts b/api/gaming_osu.ts new file mode 100644 index 0000000..9564779 --- /dev/null +++ b/api/gaming_osu.ts @@ -0,0 +1,32 @@ +import * as osu from "osu-api-v2-js"; +import {type OsuInfo} from "#Infos/Gaming/Osu.tsx"; +import {MongoClient} from "mongodb"; +import {type Token} from "./token.tsx"; +import type { Handler } from "../index.ts"; + +export const gaming_osu: Handler = async (params) => { + const client = new MongoClient(process.env["URL_MONGODB"]!); + await client.connect(); + + const db = client.db("tokens"); + const collection = db.collection("osu"); + const token = await collection.findOne(); + void client.close(); + + let ruleset = params.has("ruleset") ? Number(params.get("ruleset")) : undefined; + if (ruleset && isNaN(ruleset)) {ruleset = undefined;} + const api = new osu.API({access_token: token?.access_token}); + const profile = await api.getUser(7276846, ruleset); + + const info: OsuInfo = { + country: profile.country.name, + ranks: { + global: profile.statistics.global_rank ?? 0, + country: profile.statistics.country_rank ?? 0, + }, + }; + + return new Response(new Blob([JSON.stringify(info)], { + type: "application/json", + }), {status: 200}); +}; diff --git a/netlify/functions/gaming_speedruncom.ts b/api/gaming_speedruncom.ts similarity index 88% rename from netlify/functions/gaming_speedruncom.ts rename to api/gaming_speedruncom.ts index f8e06ad..112a4df 100644 --- a/netlify/functions/gaming_speedruncom.ts +++ b/api/gaming_speedruncom.ts @@ -1,5 +1,5 @@ -import {type Handler} from "@netlify/functions"; -import {type SpeedruncomInfo} from "#Infos/Gaming/Speedruncom.js"; +import {type SpeedruncomInfo} from "#Infos/Gaming/Speedruncom.tsx"; +import type { Handler } from ".."; interface Runs { data: { @@ -41,15 +41,13 @@ interface Level { }; } -const handler: Handler = async () => { +export const gaming_speedruncom: Handler = async () => { // using the API's embedding would be stupid here, as that'd create lag due to irrelevant runs const speedruncom = await (await fetch("https://www.speedrun.com/api/v1/users/j03v45mj/personal-bests")).json() as Runs; const data = speedruncom.data.at(0); if (!data) { - return { - statusCode: 404, - }; + return new Response("Not Found", {status: 404}); } const urlsToRequest = [`https://www.speedrun.com/api/v1/games/${data.run.game}`]; @@ -76,10 +74,9 @@ const handler: Handler = async () => { run.time = run.time.substring(1); } - return { - statusCode: 200, - body: JSON.stringify(run), - }; + return new Response(new Blob([JSON.stringify(run)], { + type: "application/json", + }), {status: 200}); }; // https://gist.github.com/vankasteelj/74ab7793133f4b257ea3 @@ -92,5 +89,3 @@ function sec2time(timeInSeconds: number) { const milliseconds = Number(time.toString().slice(-3)); return pad(hours, 2) + ":" + pad(minutes, 2) + ":" + pad(seconds, 2) + "." + pad(milliseconds, 3); }; - -export {handler}; diff --git a/netlify/functions/hacking_hackthebox.ts b/api/hacking_hackthebox.ts similarity index 57% rename from netlify/functions/hacking_hackthebox.ts rename to api/hacking_hackthebox.ts index 743a81a..8a9fd18 100644 --- a/netlify/functions/hacking_hackthebox.ts +++ b/api/hacking_hackthebox.ts @@ -1,7 +1,7 @@ -import {type Handler} from "@netlify/functions"; -import {type HacktheboxInfo} from "#Infos/Hacking/Hackthebox.js"; +import {type HacktheboxInfo} from "#Infos/Hacking/Hackthebox.tsx"; +import type { Handler } from ".."; -const handler: Handler = async () => { +export const hacking_hackthebox: Handler = async () => { const hackthebox = await (await fetch("https://www.hackthebox.com/api/v4/profile/activity/1063999")).json() as { profile: { activity: HacktheboxInfo[]; @@ -10,19 +10,13 @@ const handler: Handler = async () => { const pwn = hackthebox.profile.activity.find((a: HacktheboxInfo) => a?.object_type === "machine"); if (!pwn) { - return { - statusCode: 404, - body: "", - }; + return new Response("Not Found", {status: 404}); } pwn.machine_avatar = `https://www.hackthebox.com${pwn.machine_avatar}`; pwn.date = pwn.date.substring(0, pwn.date.indexOf("T")); - return { - statusCode: 200, - body: JSON.stringify(pwn), - }; + return new Response(new Blob([JSON.stringify(pwn)], { + type: "application/json", + }), {status: 200}); }; - -export {handler}; diff --git a/netlify/functions/japanese_wanikani.ts b/api/japanese_wanikani.ts similarity index 83% rename from netlify/functions/japanese_wanikani.ts rename to api/japanese_wanikani.ts index 75a385d..96ba700 100644 --- a/netlify/functions/japanese_wanikani.ts +++ b/api/japanese_wanikani.ts @@ -1,6 +1,6 @@ -import {type Handler} from "@netlify/functions"; -import {type WanikaniInfo} from "#Infos/Japanese/Wanikani.js"; -import { WKLevelProgression, WKResetCollection, WKSummary } from "@bachmacintosh/wanikani-api-types"; +import {type WanikaniInfo} from "#Infos/Japanese/Wanikani.tsx"; +import type { WKLevelProgression, WKResetCollection, WKSummary } from "@bachmacintosh/wanikani-api-types"; +import type { Handler } from ".."; interface Subject { id: number; @@ -48,7 +48,7 @@ function addStuffToLearn(ids: number[], data: {available_at: string; subject_ids return arr; } -const handler: Handler = async () => { +export const japanese_wanikani: Handler = async () => { const urlsToRequest = [ "https://api.wanikani.com/v2/level_progressions", "https://api.wanikani.com/v2/resets", @@ -56,8 +56,8 @@ const handler: Handler = async () => { ]; const toRequest = urlsToRequest.map((url) => new Promise(async (resolve) => { const response = await fetch(url, {headers: { - "Authorization": `Bearer ${process.env.API_WANIKANI}`, - "Content-Type": "application/json", + "Authorization": `Bearer ${process.env["API_WANIKANI"]}`, + "Content-Type": "application.json", }}); resolve(await response.json()); })); @@ -92,8 +92,8 @@ const handler: Handler = async () => { const subjectIdsAll = subjectIdsLessons.concat(subjectIdsReviews); const subjects = await (await fetch(`https://api.wanikani.com/v2/subjects?ids=${subjectIdsAll.toString()}`, {headers: { - "Authorization": `Bearer ${process.env.API_WANIKANI}`, - "Content-Type": "application/json", + "Authorization": `Bearer ${process.env["API_WANIKANI"]}`, + "Content-Type": "application.json", }})).json() as {data: Subject[]}; const lessons = addStuffToLearn(subjectIdsLessons, summary.data.lessons, subjects.data); @@ -107,10 +107,7 @@ const handler: Handler = async () => { moreThingsToReviewAt, }; - return { - statusCode: 200, - body: JSON.stringify(info), - }; + return new Response(new Blob([JSON.stringify(info)], { + type: "application/json", + }), {status: 200}); }; - -export {handler}; diff --git a/netlify/functions/media_anilist.ts b/api/media_anilist.ts similarity index 88% rename from netlify/functions/media_anilist.ts rename to api/media_anilist.ts index 233c042..9316e53 100644 --- a/netlify/functions/media_anilist.ts +++ b/api/media_anilist.ts @@ -1,7 +1,7 @@ -import {type Handler} from "@netlify/functions"; -import {type AnilistInfo} from "#Infos/Media/Anilist.js"; +import {type AnilistInfo} from "#Infos/Media/Anilist.tsx"; +import type { Handler } from ".."; -const handler: Handler = async () => { +export const media_anilist: Handler = async () => { const anilist = await fetch("https://graphql.anilist.co", { method: "POST", headers: { @@ -63,10 +63,7 @@ const handler: Handler = async () => { anime.updateDate = anime.updateDate.substring(0, anime.updateDate.indexOf("T")); anime.endDate = anime.endDate.substring(0, anime.endDate.indexOf("T")); - return { - statusCode: 200, - body: JSON.stringify(anime), - }; + return new Response(new Blob([JSON.stringify(anime)], { + type: "application/json", + }), {status: 200}); }; - -export {handler}; diff --git a/netlify/functions/media_lastfm.ts b/api/media_lastfm.ts similarity index 77% rename from netlify/functions/media_lastfm.ts rename to api/media_lastfm.ts index 437988e..3956240 100644 --- a/netlify/functions/media_lastfm.ts +++ b/api/media_lastfm.ts @@ -1,8 +1,8 @@ -import {type Handler} from "@netlify/functions"; -import {type LastfmInfo} from "#Infos/Media/Lastfm.js"; +import {type LastfmInfo} from "#Infos/Media/Lastfm.tsx"; +import type { Handler } from ".."; -const handler: Handler = async () => { - const lastfm = await (await fetch(`https://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&user=TTTaevas&api_key=${process.env.API_LASTFM}&format=json&limit=1`)).json() as { +export const media_lastfm: Handler = async () => { + const lastfm = await (await fetch(`https://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&user=TTTaevas&api_key=${process.env["API_LASTFM"]}&format=json&limit=1`)).json() as { recenttracks: { track: { artist: { @@ -39,10 +39,7 @@ const handler: Handler = async () => { date: lastfm.recenttracks.track[0].date?.uts ?? String(Date.now()), }; - return { - statusCode: 200, - body: JSON.stringify(track), - }; + return new Response(new Blob([JSON.stringify(track)], { + type: "application/json", + }), {status: 200}); }; - -export {handler}; diff --git a/netlify/functions/token.ts b/api/token.ts similarity index 79% rename from netlify/functions/token.ts rename to api/token.ts index 74a34f1..4ae6240 100644 --- a/netlify/functions/token.ts +++ b/api/token.ts @@ -1,18 +1,19 @@ -import {type Handler} from "@netlify/functions"; -import {InsertOneResult, MongoClient} from "mongodb"; - +import {MongoClient, type InsertOneResult} from "mongodb"; import {API} from "osu-api-v2-js"; +import type { Handler } from ".."; export interface Token { access_token: string; expires: Date; } -const handler: Handler = async (req) => { - const service = req.queryStringParameters?.service; - if (!service) {return {statusCode: 400};} +export const token: Handler = async (params) => { + const service = params.get("service"); + if (!service) { + return new Response("Bad Request", {status: 400}); + } - const client = new MongoClient(process.env.URL_MONGODB!); + const client = new MongoClient(process.env["URL_MONGODB"]!); await client.connect(); const db = client.db("tokens"); @@ -27,14 +28,14 @@ const handler: Handler = async (req) => { if (!token) { const collections = await db.listCollections().toArray(); - if (!collections.find((c) => c.name === service)) {client.close(); return {statusCode: 400};} + if (!collections.find((c) => c.name === service)) {client.close(); return new Response("Not Found", {status: 404});} promises.push(new Promise(async (resolve, reject) => { console.log(`Setting a new token for ${service}...`); let insertion: InsertOneResult; if (service === "osu") { - const api = await API.createAsync(11451, process.env.API_OSU!); + const api = await API.createAsync(11451, process.env["API_OSU"]!); insertion = await collection.insertOne({ access_token: api.access_token, expires: api.expires, @@ -47,7 +48,7 @@ const handler: Handler = async (req) => { headers: { "Content-Type": "application/x-www-form-urlencoded" }, - body: `username=${process.env.USERNAME_UMAMI}&password=${process.env.PASSWORD_UMAMI}` + body: `username=${process.env["USERNAME_UMAMI"]}&password=${process.env["PASSWORD_UMAMI"]}` }); const json: {token: string} = await response.json(); @@ -90,9 +91,5 @@ const handler: Handler = async (req) => { await Promise.all(promises); void client.close(); - return { - statusCode: 200, - }; + return new Response(null, {status: 200}); }; - -export {handler}; \ No newline at end of file diff --git a/netlify/functions/website_umami.ts b/api/website_umami.ts similarity index 72% rename from netlify/functions/website_umami.ts rename to api/website_umami.ts index 9fe0b71..2482402 100644 --- a/netlify/functions/website_umami.ts +++ b/api/website_umami.ts @@ -1,10 +1,10 @@ -import { UmamiInfo } from "#Infos/Website/Umami.js"; -import {type Handler} from "@netlify/functions"; import { MongoClient } from "mongodb"; -import { Token } from "./token.js"; +import type { Handler } from "../index.ts"; +import type { UmamiInfo } from "#Infos/Website/Umami.tsx"; +import type { Token } from "./token.ts"; -const handler: Handler = async () => { - const client = new MongoClient(process.env.URL_MONGODB!); +export const website_umami: Handler = async () => { + const client = new MongoClient(process.env["URL_MONGODB"]!); await client.connect(); const db = client.db("tokens"); @@ -17,7 +17,7 @@ const handler: Handler = async () => { const now = new Date(); const response = await fetch(`${api_server}/websites/${website_id}/stats?startAt=${Number(new Date("2025"))}&endAt=${Number(now)}`, { headers: { - "Accept": "application/json", + "Accept": "application.json", "Authorization": `Bearer ${token?.access_token}` }, }); @@ -33,9 +33,7 @@ const handler: Handler = async () => { }; if (!umami) { - return { - statusCode: 404, - }; + return new Response("Not Found", {status: 404}); } const info: UmamiInfo = { @@ -45,10 +43,7 @@ const handler: Handler = async () => { totaltime: umami.totaltime.value }; - return { - statusCode: 200, - body: JSON.stringify(info), - }; + return new Response(new Blob([JSON.stringify(info)], { + type: "application/json", + }), {status: 200}); }; - -export {handler}; diff --git a/public/brittany.jpg b/assets/brittany.jpg similarity index 100% rename from public/brittany.jpg rename to assets/brittany.jpg diff --git a/public/fonts/LexendDeca-Regular.ttf b/assets/fonts/LexendDeca-Regular.ttf similarity index 100% rename from public/fonts/LexendDeca-Regular.ttf rename to assets/fonts/LexendDeca-Regular.ttf diff --git a/public/lain.png b/assets/lain.png similarity index 100% rename from public/lain.png rename to assets/lain.png diff --git a/public/logos/anilist.svg b/assets/logos/anilist.svg similarity index 100% rename from public/logos/anilist.svg rename to assets/logos/anilist.svg diff --git a/public/logos/github.svg b/assets/logos/github.svg similarity index 100% rename from public/logos/github.svg rename to assets/logos/github.svg diff --git a/public/logos/gitlab.svg b/assets/logos/gitlab.svg similarity index 100% rename from public/logos/gitlab.svg rename to assets/logos/gitlab.svg diff --git a/public/logos/lastdotfm.png b/assets/logos/lastdotfm.png similarity index 100% rename from public/logos/lastdotfm.png rename to assets/logos/lastdotfm.png diff --git a/public/logos/matrix.svg b/assets/logos/matrix.svg similarity index 100% rename from public/logos/matrix.svg rename to assets/logos/matrix.svg diff --git a/public/logos/osu.svg b/assets/logos/osu.svg similarity index 100% rename from public/logos/osu.svg rename to assets/logos/osu.svg diff --git a/public/logos/speedrundotcom.png b/assets/logos/speedrundotcom.png similarity index 100% rename from public/logos/speedrundotcom.png rename to assets/logos/speedrundotcom.png diff --git a/public/logos/youtube.svg b/assets/logos/youtube.svg similarity index 100% rename from public/logos/youtube.svg rename to assets/logos/youtube.svg diff --git a/public/osu_rulesets/fruits.png b/assets/osu_rulesets/fruits.png similarity index 100% rename from public/osu_rulesets/fruits.png rename to assets/osu_rulesets/fruits.png diff --git a/public/osu_rulesets/mania.png b/assets/osu_rulesets/mania.png similarity index 100% rename from public/osu_rulesets/mania.png rename to assets/osu_rulesets/mania.png diff --git a/public/osu_rulesets/osu.png b/assets/osu_rulesets/osu.png similarity index 100% rename from public/osu_rulesets/osu.png rename to assets/osu_rulesets/osu.png diff --git a/public/osu_rulesets/taiko.png b/assets/osu_rulesets/taiko.png similarity index 100% rename from public/osu_rulesets/taiko.png rename to assets/osu_rulesets/taiko.png diff --git a/public/swordventure.png b/assets/swordventure.png similarity index 100% rename from public/swordventure.png rename to assets/swordventure.png diff --git a/bun.lockb b/bun.lockb index afd5d0f..352c549 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/index.css b/index.css new file mode 100644 index 0000000..44619ec --- /dev/null +++ b/index.css @@ -0,0 +1,1863 @@ +*, ::before, ::after { + --tw-border-spacing-x: 0; + --tw-border-spacing-y: 0; + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + --tw-pan-x: ; + --tw-pan-y: ; + --tw-pinch-zoom: ; + --tw-scroll-snap-strictness: proximity; + --tw-gradient-from-position: ; + --tw-gradient-via-position: ; + --tw-gradient-to-position: ; + --tw-ordinal: ; + --tw-slashed-zero: ; + --tw-numeric-figure: ; + --tw-numeric-spacing: ; + --tw-numeric-fraction: ; + --tw-ring-inset: ; + --tw-ring-offset-width: 0px; + --tw-ring-offset-color: #fff; + --tw-ring-color: rgb(59 130 246 / 0.5); + --tw-ring-offset-shadow: 0 0 #0000; + --tw-ring-shadow: 0 0 #0000; + --tw-shadow: 0 0 #0000; + --tw-shadow-colored: 0 0 #0000; + --tw-blur: ; + --tw-brightness: ; + --tw-contrast: ; + --tw-grayscale: ; + --tw-hue-rotate: ; + --tw-invert: ; + --tw-saturate: ; + --tw-sepia: ; + --tw-drop-shadow: ; + --tw-backdrop-blur: ; + --tw-backdrop-brightness: ; + --tw-backdrop-contrast: ; + --tw-backdrop-grayscale: ; + --tw-backdrop-hue-rotate: ; + --tw-backdrop-invert: ; + --tw-backdrop-opacity: ; + --tw-backdrop-saturate: ; + --tw-backdrop-sepia: ; + --tw-contain-size: ; + --tw-contain-layout: ; + --tw-contain-paint: ; + --tw-contain-style: ; +} + +::backdrop { + --tw-border-spacing-x: 0; + --tw-border-spacing-y: 0; + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + --tw-pan-x: ; + --tw-pan-y: ; + --tw-pinch-zoom: ; + --tw-scroll-snap-strictness: proximity; + --tw-gradient-from-position: ; + --tw-gradient-via-position: ; + --tw-gradient-to-position: ; + --tw-ordinal: ; + --tw-slashed-zero: ; + --tw-numeric-figure: ; + --tw-numeric-spacing: ; + --tw-numeric-fraction: ; + --tw-ring-inset: ; + --tw-ring-offset-width: 0px; + --tw-ring-offset-color: #fff; + --tw-ring-color: rgb(59 130 246 / 0.5); + --tw-ring-offset-shadow: 0 0 #0000; + --tw-ring-shadow: 0 0 #0000; + --tw-shadow: 0 0 #0000; + --tw-shadow-colored: 0 0 #0000; + --tw-blur: ; + --tw-brightness: ; + --tw-contrast: ; + --tw-grayscale: ; + --tw-hue-rotate: ; + --tw-invert: ; + --tw-saturate: ; + --tw-sepia: ; + --tw-drop-shadow: ; + --tw-backdrop-blur: ; + --tw-backdrop-brightness: ; + --tw-backdrop-contrast: ; + --tw-backdrop-grayscale: ; + --tw-backdrop-hue-rotate: ; + --tw-backdrop-invert: ; + --tw-backdrop-opacity: ; + --tw-backdrop-saturate: ; + --tw-backdrop-sepia: ; + --tw-contain-size: ; + --tw-contain-layout: ; + --tw-contain-paint: ; + --tw-contain-style: ; +} + +/* +! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com +*/ + +/* +1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4) +2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116) +*/ + +*, +::before, +::after { + box-sizing: border-box; + /* 1 */ + border-width: 0; + /* 2 */ + border-style: solid; + /* 2 */ + border-color: #e5e7eb; + /* 2 */ +} + +::before, +::after { + --tw-content: ''; +} + +/* +1. Use a consistent sensible line-height in all browsers. +2. Prevent adjustments of font size after orientation changes in iOS. +3. Use a more readable tab size. +4. Use the user's configured `sans` font-family by default. +5. Use the user's configured `sans` font-feature-settings by default. +6. Use the user's configured `sans` font-variation-settings by default. +7. Disable tap highlights on iOS +*/ + +html, +:host { + line-height: 1.5; + /* 1 */ + -webkit-text-size-adjust: 100%; + /* 2 */ + -moz-tab-size: 4; + /* 3 */ + -o-tab-size: 4; + tab-size: 4; + /* 3 */ + font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + /* 4 */ + font-feature-settings: normal; + /* 5 */ + font-variation-settings: normal; + /* 6 */ + -webkit-tap-highlight-color: transparent; + /* 7 */ +} + +/* +1. Remove the margin in all browsers. +2. Inherit line-height from `html` so users can set them as a class directly on the `html` element. +*/ + +body { + margin: 0; + /* 1 */ + line-height: inherit; + /* 2 */ +} + +/* +1. Add the correct height in Firefox. +2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655) +3. Ensure horizontal rules are visible by default. +*/ + +hr { + height: 0; + /* 1 */ + color: inherit; + /* 2 */ + border-top-width: 1px; + /* 3 */ +} + +/* +Add the correct text decoration in Chrome, Edge, and Safari. +*/ + +abbr:where([title]) { + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; +} + +/* +Remove the default font size and weight for headings. +*/ + +h1, +h2, +h3, +h4, +h5, +h6 { + font-size: inherit; + font-weight: inherit; +} + +/* +Reset links to optimize for opt-in styling instead of opt-out. +*/ + +a { + color: inherit; + text-decoration: inherit; +} + +/* +Add the correct font weight in Edge and Safari. +*/ + +b, +strong { + font-weight: bolder; +} + +/* +1. Use the user's configured `mono` font-family by default. +2. Use the user's configured `mono` font-feature-settings by default. +3. Use the user's configured `mono` font-variation-settings by default. +4. Correct the odd `em` font sizing in all browsers. +*/ + +code, +kbd, +samp, +pre { + font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; + /* 1 */ + font-feature-settings: normal; + /* 2 */ + font-variation-settings: normal; + /* 3 */ + font-size: 1em; + /* 4 */ +} + +/* +Add the correct font size in all browsers. +*/ + +small { + font-size: 80%; +} + +/* +Prevent `sub` and `sup` elements from affecting the line height in all browsers. +*/ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} + +/* +1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297) +2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016) +3. Remove gaps between table borders by default. +*/ + +table { + text-indent: 0; + /* 1 */ + border-color: inherit; + /* 2 */ + border-collapse: collapse; + /* 3 */ +} + +/* +1. Change the font styles in all browsers. +2. Remove the margin in Firefox and Safari. +3. Remove default padding in all browsers. +*/ + +button, +input, +optgroup, +select, +textarea { + font-family: inherit; + /* 1 */ + font-feature-settings: inherit; + /* 1 */ + font-variation-settings: inherit; + /* 1 */ + font-size: 100%; + /* 1 */ + font-weight: inherit; + /* 1 */ + line-height: inherit; + /* 1 */ + letter-spacing: inherit; + /* 1 */ + color: inherit; + /* 1 */ + margin: 0; + /* 2 */ + padding: 0; + /* 3 */ +} + +/* +Remove the inheritance of text transform in Edge and Firefox. +*/ + +button, +select { + text-transform: none; +} + +/* +1. Correct the inability to style clickable types in iOS and Safari. +2. Remove default button styles. +*/ + +button, +input:where([type='button']), +input:where([type='reset']), +input:where([type='submit']) { + -webkit-appearance: button; + /* 1 */ + background-color: transparent; + /* 2 */ + background-image: none; + /* 2 */ +} + +/* +Use the modern Firefox focus style for all focusable elements. +*/ + +:-moz-focusring { + outline: auto; +} + +/* +Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737) +*/ + +:-moz-ui-invalid { + box-shadow: none; +} + +/* +Add the correct vertical alignment in Chrome and Firefox. +*/ + +progress { + vertical-align: baseline; +} + +/* +Correct the cursor style of increment and decrement buttons in Safari. +*/ + +::-webkit-inner-spin-button, +::-webkit-outer-spin-button { + height: auto; +} + +/* +1. Correct the odd appearance in Chrome and Safari. +2. Correct the outline style in Safari. +*/ + +[type='search'] { + -webkit-appearance: textfield; + /* 1 */ + outline-offset: -2px; + /* 2 */ +} + +/* +Remove the inner padding in Chrome and Safari on macOS. +*/ + +::-webkit-search-decoration { + -webkit-appearance: none; +} + +/* +1. Correct the inability to style clickable types in iOS and Safari. +2. Change font properties to `inherit` in Safari. +*/ + +::-webkit-file-upload-button { + -webkit-appearance: button; + /* 1 */ + font: inherit; + /* 2 */ +} + +/* +Add the correct display in Chrome and Safari. +*/ + +summary { + display: list-item; +} + +/* +Removes the default spacing and border for appropriate elements. +*/ + +blockquote, +dl, +dd, +h1, +h2, +h3, +h4, +h5, +h6, +hr, +figure, +p, +pre { + margin: 0; +} + +fieldset { + margin: 0; + padding: 0; +} + +legend { + padding: 0; +} + +ol, +ul, +menu { + list-style: none; + margin: 0; + padding: 0; +} + +/* +Reset default styling for dialogs. +*/ + +dialog { + padding: 0; +} + +/* +Prevent resizing textareas horizontally by default. +*/ + +textarea { + resize: vertical; +} + +/* +1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300) +2. Set the default placeholder color to the user's configured gray 400 color. +*/ + +input::-moz-placeholder, textarea::-moz-placeholder { + opacity: 1; + /* 1 */ + color: #9ca3af; + /* 2 */ +} + +input::placeholder, +textarea::placeholder { + opacity: 1; + /* 1 */ + color: #9ca3af; + /* 2 */ +} + +/* +Set the default cursor for buttons. +*/ + +button, +[role="button"] { + cursor: pointer; +} + +/* +Make sure disabled buttons don't get the pointer cursor. +*/ + +:disabled { + cursor: default; +} + +/* +1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14) +2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210) + This can trigger a poorly considered lint error in some tools but is included by design. +*/ + +img, +svg, +video, +canvas, +audio, +iframe, +embed, +object { + display: block; + /* 1 */ + vertical-align: middle; + /* 2 */ +} + +/* +Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14) +*/ + +img, +video { + max-width: 100%; + height: auto; +} + +/* Make elements with the HTML hidden attribute stay hidden by default */ + +[hidden]:where(:not([hidden="until-found"])) { + display: none; +} + +.container { + width: 100%; +} + +@media (min-width: 640px) { + .container { + max-width: 640px; + } +} + +@media (min-width: 768px) { + .container { + max-width: 768px; + } +} + +@media (min-width: 1024px) { + .container { + max-width: 1024px; + } +} + +@media (min-width: 1280px) { + .container { + max-width: 1280px; + } +} + +@media (min-width: 1536px) { + .container { + max-width: 1536px; + } +} + +.invisible { + visibility: hidden; +} + +.static { + position: static; +} + +.fixed { + position: fixed; +} + +.absolute { + position: absolute; +} + +.relative { + position: relative; +} + +.bottom-1\/2 { + bottom: 50%; +} + +.end-0 { + inset-inline-end: 0px; +} + +.right-0 { + right: 0px; +} + +.right-1\/2 { + right: 50%; +} + +.right-\[7px\] { + right: 7px; +} + +.start-0 { + inset-inline-start: 0px; +} + +.z-10 { + z-index: 10; +} + +.z-20 { + z-index: 20; +} + +.z-30 { + z-index: 30; +} + +.z-40 { + z-index: 40; +} + +.z-50 { + z-index: 50; +} + +.z-\[100\] { + z-index: 100; +} + +.z-\[110\] { + z-index: 110; +} + +.z-\[90\] { + z-index: 90; +} + +.order-1 { + order: 1; +} + +.float-right { + float: right; +} + +.float-left { + float: left; +} + +.m-1 { + margin: 0.25rem; +} + +.m-2 { + margin: 0.5rem; +} + +.m-2\.5 { + margin: 0.625rem; +} + +.m-4 { + margin: 1rem; +} + +.m-auto { + margin: auto; +} + +.mx-1 { + margin-left: 0.25rem; + margin-right: 0.25rem; +} + +.mx-4 { + margin-left: 1rem; + margin-right: 1rem; +} + +.mx-auto { + margin-left: auto; + margin-right: auto; +} + +.mb-2 { + margin-bottom: 0.5rem; +} + +.mb-4 { + margin-bottom: 1rem; +} + +.ml-2 { + margin-left: 0.5rem; +} + +.ml-auto { + margin-left: auto; +} + +.mr-1 { + margin-right: 0.25rem; +} + +.mr-2 { + margin-right: 0.5rem; +} + +.mr-auto { + margin-right: auto; +} + +.mt-1 { + margin-top: 0.25rem; +} + +.mt-2 { + margin-top: 0.5rem; +} + +.mt-4 { + margin-top: 1rem; +} + +.mt-8 { + margin-top: 2rem; +} + +.block { + display: block; +} + +.inline-block { + display: inline-block; +} + +.flex { + display: flex; +} + +.inline-flex { + display: inline-flex; +} + +.h-0 { + height: 0px; +} + +.h-12 { + height: 3rem; +} + +.h-16 { + height: 4rem; +} + +.h-24 { + height: 6rem; +} + +.h-6 { + height: 1.5rem; +} + +.h-8 { + height: 2rem; +} + +.h-full { + height: 100%; +} + +.h-min { + height: -moz-min-content; + height: min-content; +} + +.h-screen { + height: 100vh; +} + +.w-0 { + width: 0px; +} + +.w-12 { + width: 3rem; +} + +.w-16 { + width: 4rem; +} + +.w-24 { + width: 6rem; +} + +.w-32 { + width: 8rem; +} + +.w-40 { + width: 10rem; +} + +.w-6 { + width: 1.5rem; +} + +.w-72 { + width: 18rem; +} + +.w-8 { + width: 2rem; +} + +.w-80 { + width: 20rem; +} + +.w-\[25px\] { + width: 25px; +} + +.w-\[27px\] { + width: 27px; +} + +.w-fit { + width: -moz-fit-content; + width: fit-content; +} + +.w-full { + width: 100%; +} + +.w-min { + width: -moz-min-content; + width: min-content; +} + +.w-screen { + width: 100vw; +} + +.max-w-3xl { + max-width: 48rem; +} + +.max-w-\[1632px\] { + max-width: 1632px; +} + +.translate-x-2\/4 { + --tw-translate-x: 50%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.translate-y-2\/4 { + --tw-translate-y: 50%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.-rotate-12 { + --tw-rotate: -12deg; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.-rotate-6 { + --tw-rotate: -6deg; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.rotate-12 { + --tw-rotate: 12deg; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.rotate-6 { + --tw-rotate: 6deg; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +@keyframes pulse { + 50% { + opacity: .5; + } +} + +.animate-pulse { + animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; +} + +@keyframes spin { + to { + transform: rotate(360deg); + } +} + +.animate-spin { + animation: spin 1s linear infinite; +} + +.cursor-ew-resize { + cursor: ew-resize; +} + +.cursor-pointer { + cursor: pointer; +} + +.select-none { + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; +} + +.flex-wrap { + flex-wrap: wrap; +} + +.items-center { + align-items: center; +} + +.justify-center { + justify-content: center; +} + +.overflow-hidden { + overflow: hidden; +} + +.overflow-y-auto { + overflow-y: auto; +} + +.truncate { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.text-nowrap { + text-wrap: nowrap; +} + +.rounded-full { + border-radius: 9999px; +} + +.rounded-lg { + border-radius: 0.5rem; +} + +.rounded-md { + border-radius: 0.375rem; +} + +.rounded-xl { + border-radius: 0.75rem; +} + +.rounded-b-xl { + border-bottom-right-radius: 0.75rem; + border-bottom-left-radius: 0.75rem; +} + +.rounded-l-none { + border-top-left-radius: 0px; + border-bottom-left-radius: 0px; +} + +.rounded-l-xl { + border-top-left-radius: 0.75rem; + border-bottom-left-radius: 0.75rem; +} + +.rounded-r-xl { + border-top-right-radius: 0.75rem; + border-bottom-right-radius: 0.75rem; +} + +.rounded-tr-\[10px\] { + border-top-right-radius: 10px; +} + +.border { + border-width: 1px; +} + +.border-2 { + border-width: 2px; +} + +.border-4 { + border-width: 4px; +} + +.border-8 { + border-width: 8px; +} + +.border-b-2 { + border-bottom-width: 2px; +} + +.border-b-4 { + border-bottom-width: 4px; +} + +.border-r-2 { + border-right-width: 2px; +} + +.border-t-2 { + border-top-width: 2px; +} + +.border-solid { + border-style: solid; +} + +.border-black { + --tw-border-opacity: 1; + border-color: rgb(0 0 0 / var(--tw-border-opacity, 1)); +} + +.border-cyan-500 { + --tw-border-opacity: 1; + border-color: rgb(6 182 212 / var(--tw-border-opacity, 1)); +} + +.border-orange-500 { + --tw-border-opacity: 1; + border-color: rgb(249 115 22 / var(--tw-border-opacity, 1)); +} + +.border-pink-500 { + --tw-border-opacity: 1; + border-color: rgb(236 72 153 / var(--tw-border-opacity, 1)); +} + +.border-red-500 { + --tw-border-opacity: 1; + border-color: rgb(239 68 68 / var(--tw-border-opacity, 1)); +} + +.border-red-600 { + --tw-border-opacity: 1; + border-color: rgb(220 38 38 / var(--tw-border-opacity, 1)); +} + +.border-sky-600 { + --tw-border-opacity: 1; + border-color: rgb(2 132 199 / var(--tw-border-opacity, 1)); +} + +.border-white { + --tw-border-opacity: 1; + border-color: rgb(255 255 255 / var(--tw-border-opacity, 1)); +} + +.border-yellow-500 { + --tw-border-opacity: 1; + border-color: rgb(234 179 8 / var(--tw-border-opacity, 1)); +} + +.border-r-gray-200 { + --tw-border-opacity: 1; + border-right-color: rgb(229 231 235 / var(--tw-border-opacity, 1)); +} + +.bg-blue-600 { + --tw-bg-opacity: 1; + background-color: rgb(37 99 235 / var(--tw-bg-opacity, 1)); +} + +.bg-blue-800\/75 { + background-color: rgb(30 64 175 / 0.75); +} + +.bg-blue-950 { + --tw-bg-opacity: 1; + background-color: rgb(23 37 84 / var(--tw-bg-opacity, 1)); +} + +.bg-fuchsia-700 { + --tw-bg-opacity: 1; + background-color: rgb(162 28 175 / var(--tw-bg-opacity, 1)); +} + +.bg-pink-500 { + --tw-bg-opacity: 1; + background-color: rgb(236 72 153 / var(--tw-bg-opacity, 1)); +} + +.bg-red-500 { + --tw-bg-opacity: 1; + background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1)); +} + +.bg-red-700 { + --tw-bg-opacity: 1; + background-color: rgb(185 28 28 / var(--tw-bg-opacity, 1)); +} + +.bg-sky-600 { + --tw-bg-opacity: 1; + background-color: rgb(2 132 199 / var(--tw-bg-opacity, 1)); +} + +.bg-white { + --tw-bg-opacity: 1; + background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1)); +} + +.bg-gradient-to-r { + background-image: linear-gradient(to right, var(--tw-gradient-stops)); +} + +.bg-gradient-to-t { + background-image: linear-gradient(to top, var(--tw-gradient-stops)); +} + +.bg-gradient-to-tl { + background-image: linear-gradient(to top left, var(--tw-gradient-stops)); +} + +.from-blue-500 { + --tw-gradient-from: #3b82f6 var(--tw-gradient-from-position); + --tw-gradient-to: rgb(59 130 246 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} + +.from-emerald-500 { + --tw-gradient-from: #10b981 var(--tw-gradient-from-position); + --tw-gradient-to: rgb(16 185 129 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} + +.from-indigo-100 { + --tw-gradient-from: #e0e7ff var(--tw-gradient-from-position); + --tw-gradient-to: rgb(224 231 255 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} + +.from-purple-500 { + --tw-gradient-from: #a855f7 var(--tw-gradient-from-position); + --tw-gradient-to: rgb(168 85 247 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} + +.from-purple-900 { + --tw-gradient-from: #581c87 var(--tw-gradient-from-position); + --tw-gradient-to: rgb(88 28 135 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} + +.from-rose-500 { + --tw-gradient-from: #f43f5e var(--tw-gradient-from-position); + --tw-gradient-to: rgb(244 63 94 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} + +.from-sky-600 { + --tw-gradient-from: #0284c7 var(--tw-gradient-from-position); + --tw-gradient-to: rgb(2 132 199 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} + +.from-sky-900 { + --tw-gradient-from: #0c4a6e var(--tw-gradient-from-position); + --tw-gradient-to: rgb(12 74 110 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} + +.from-slate-500 { + --tw-gradient-from: #64748b var(--tw-gradient-from-position); + --tw-gradient-to: rgb(100 116 139 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} + +.from-white\/80 { + --tw-gradient-from: rgb(255 255 255 / 0.8) var(--tw-gradient-from-position); + --tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} + +.from-70\% { + --tw-gradient-from-position: 70%; +} + +.via-sky-300 { + --tw-gradient-to: rgb(125 211 252 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), #7dd3fc var(--tw-gradient-via-position), var(--tw-gradient-to); +} + +.to-blue-600 { + --tw-gradient-to: #2563eb var(--tw-gradient-to-position); +} + +.to-emerald-600 { + --tw-gradient-to: #059669 var(--tw-gradient-to-position); +} + +.to-indigo-100 { + --tw-gradient-to: #e0e7ff var(--tw-gradient-to-position); +} + +.to-indigo-600 { + --tw-gradient-to: #4f46e5 var(--tw-gradient-to-position); +} + +.to-indigo-900 { + --tw-gradient-to: #312e81 var(--tw-gradient-to-position); +} + +.to-pink-900 { + --tw-gradient-to: #831843 var(--tw-gradient-to-position); +} + +.to-purple-600 { + --tw-gradient-to: #9333ea var(--tw-gradient-to-position); +} + +.to-rose-600 { + --tw-gradient-to: #e11d48 var(--tw-gradient-to-position); +} + +.to-slate-600 { + --tw-gradient-to: #475569 var(--tw-gradient-to-position); +} + +.bg-fixed { + background-attachment: fixed; +} + +.fill-gray-600 { + fill: #4b5563; +} + +.fill-red-500 { + fill: #ef4444; +} + +.p-0 { + padding: 0px; +} + +.p-1 { + padding: 0.25rem; +} + +.p-2 { + padding: 0.5rem; +} + +.p-2\.5 { + padding: 0.625rem; +} + +.p-4 { + padding: 1rem; +} + +.px-1 { + padding-left: 0.25rem; + padding-right: 0.25rem; +} + +.px-2 { + padding-left: 0.5rem; + padding-right: 0.5rem; +} + +.px-4 { + padding-left: 1rem; + padding-right: 1rem; +} + +.py-1 { + padding-top: 0.25rem; + padding-bottom: 0.25rem; +} + +.py-1\.5 { + padding-top: 0.375rem; + padding-bottom: 0.375rem; +} + +.py-2 { + padding-top: 0.5rem; + padding-bottom: 0.5rem; +} + +.py-4 { + padding-top: 1rem; + padding-bottom: 1rem; +} + +.pb-2 { + padding-bottom: 0.5rem; +} + +.pb-4 { + padding-bottom: 1rem; +} + +.pl-0 { + padding-left: 0px; +} + +.pl-2 { + padding-left: 0.5rem; +} + +.pl-4 { + padding-left: 1rem; +} + +.pr-1 { + padding-right: 0.25rem; +} + +.pr-4 { + padding-right: 1rem; +} + +.pt-1 { + padding-top: 0.25rem; +} + +.pt-2 { + padding-top: 0.5rem; +} + +.pt-4 { + padding-top: 1rem; +} + +.text-left { + text-align: left; +} + +.text-center { + text-align: center; +} + +.text-right { + text-align: right; +} + +.text-start { + text-align: start; +} + +.text-2xl { + font-size: 1.5rem; + line-height: 2rem; +} + +.text-3xl { + font-size: 1.875rem; + line-height: 2.25rem; +} + +.text-4xl { + font-size: 2.25rem; + line-height: 2.5rem; +} + +.text-6xl { + font-size: 3.75rem; + line-height: 1; +} + +.text-lg { + font-size: 1.125rem; + line-height: 1.75rem; +} + +.text-sm { + font-size: 0.875rem; + line-height: 1.25rem; +} + +.text-xl { + font-size: 1.25rem; + line-height: 1.75rem; +} + +.font-bold { + font-weight: 700; +} + +.uppercase { + text-transform: uppercase; +} + +.leading-\[18px\] { + line-height: 18px; +} + +.tracking-\[-\.1em\] { + letter-spacing: -.1em; +} + +.tracking-\[-\.2em\] { + letter-spacing: -.2em; +} + +.text-black { + --tw-text-opacity: 1; + color: rgb(0 0 0 / var(--tw-text-opacity, 1)); +} + +.text-blue-600 { + --tw-text-opacity: 1; + color: rgb(37 99 235 / var(--tw-text-opacity, 1)); +} + +.text-blue-700 { + --tw-text-opacity: 1; + color: rgb(29 78 216 / var(--tw-text-opacity, 1)); +} + +.text-blue-800 { + --tw-text-opacity: 1; + color: rgb(30 64 175 / var(--tw-text-opacity, 1)); +} + +.text-indigo-500 { + --tw-text-opacity: 1; + color: rgb(99 102 241 / var(--tw-text-opacity, 1)); +} + +.text-purple-600 { + --tw-text-opacity: 1; + color: rgb(147 51 234 / var(--tw-text-opacity, 1)); +} + +.text-sky-600 { + --tw-text-opacity: 1; + color: rgb(2 132 199 / var(--tw-text-opacity, 1)); +} + +.text-white { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity, 1)); +} + +.shadow-\[12px_12px_0_0\] { + --tw-shadow: 12px 12px 0 0; + --tw-shadow-colored: 12px 12px 0 0 var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); +} + +.shadow-blue-950\/75 { + --tw-shadow-color: rgb(23 37 84 / 0.75); + --tw-shadow: var(--tw-shadow-colored); +} + +.outline { + outline-style: solid; +} + +.outline-4 { + outline-width: 4px; +} + +.outline-white { + outline-color: #fff; +} + +.brightness-75 { + --tw-brightness: brightness(.75); + filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); +} + +.drop-shadow-2xl { + --tw-drop-shadow: drop-shadow(0 25px 25px rgb(0 0 0 / 0.15)); + filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); +} + +.filter { + filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); +} + +.backdrop-blur { + --tw-backdrop-blur: blur(8px); + -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia); + backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia); +} + +.backdrop-brightness-75 { + --tw-backdrop-brightness: brightness(.75); + -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia); + backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia); +} + +.backdrop-contrast-150 { + --tw-backdrop-contrast: contrast(1.5); + -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia); + backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia); +} + +.transition-all { + transition-property: all; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} + +.transition-transform { + transition-property: transform; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} + +.duration-75 { + transition-duration: 75ms; +} + +.\[text-orientation\:upright\] { + text-orientation: upright; +} + +.\[writing-mode\:vertical-rl\] { + writing-mode: vertical-rl; +} + +@font-face { + font-family: "LexendDeca"; + + src: url("./assets/fonts/LexendDeca-Regular.ttf") format("truetype"); + + font-weight: normal; + + font-style: normal; +} + +.App { + font-family: "LexendDeca", "Arial", sans-serif; +} + +p { + line-height: 1.15rem; +} + +p a { + color: rgb(244, 196, 253); + text-decoration: underline; +} + +time { + font-weight: bold +} + +.hover\:rotate-0:hover { + --tw-rotate: 0deg; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.hover\:scale-\[1\.02\]:hover { + --tw-scale-x: 1.02; + --tw-scale-y: 1.02; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.hover\:border-8:hover { + border-width: 8px; +} + +.hover\:border-dashed:hover { + border-style: dashed; +} + +.hover\:bg-blue-800\/80:hover { + background-color: rgb(30 64 175 / 0.8); +} + +.hover\:bg-red-500:hover { + --tw-bg-opacity: 1; + background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1)); +} + +.hover\:bg-gradient-to-r:hover { + background-image: linear-gradient(to right, var(--tw-gradient-stops)); +} + +.hover\:from-blue-700:hover { + --tw-gradient-from: #1d4ed8 var(--tw-gradient-from-position); + --tw-gradient-to: rgb(29 78 216 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} + +.hover\:from-emerald-700:hover { + --tw-gradient-from: #047857 var(--tw-gradient-from-position); + --tw-gradient-to: rgb(4 120 87 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} + +.hover\:from-purple-700:hover { + --tw-gradient-from: #7e22ce var(--tw-gradient-from-position); + --tw-gradient-to: rgb(126 34 206 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} + +.hover\:from-rose-700:hover { + --tw-gradient-from: #be123c var(--tw-gradient-from-position); + --tw-gradient-to: rgb(190 18 60 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} + +.hover\:from-slate-700:hover { + --tw-gradient-from: #334155 var(--tw-gradient-from-position); + --tw-gradient-to: rgb(51 65 85 / 0) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); +} + +.hover\:to-blue-600:hover { + --tw-gradient-to: #2563eb var(--tw-gradient-to-position); +} + +.hover\:to-emerald-600:hover { + --tw-gradient-to: #059669 var(--tw-gradient-to-position); +} + +.hover\:to-purple-600:hover { + --tw-gradient-to: #9333ea var(--tw-gradient-to-position); +} + +.hover\:to-rose-600:hover { + --tw-gradient-to: #e11d48 var(--tw-gradient-to-position); +} + +.hover\:to-slate-600:hover { + --tw-gradient-to: #475569 var(--tw-gradient-to-position); +} + +.hover\:fill-black:hover { + fill: #000; +} + +.hover\:pr-4:hover { + padding-right: 1rem; +} + +.hover\:font-bold:hover { + font-weight: 700; +} + +.hover\:text-blue-600:hover { + --tw-text-opacity: 1; + color: rgb(37 99 235 / var(--tw-text-opacity, 1)); +} + +.hover\:shadow:hover { + --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); + --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); +} + +.hover\:brightness-110:hover { + --tw-brightness: brightness(1.1); + filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); +} + +.hover\:brightness-125:hover { + --tw-brightness: brightness(1.25); + filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); +} + +.active\:scale-\[1\.02\]:active { + --tw-scale-x: 1.02; + --tw-scale-y: 1.02; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.active\:bg-blue-800\/70:active { + background-color: rgb(30 64 175 / 0.7); +} + +.active\:to-white\/20:active { + --tw-gradient-to: rgb(255 255 255 / 0.2) var(--tw-gradient-to-position); +} + +.active\:font-bold:active { + font-weight: 700; +} + +.active\:brightness-110:active { + --tw-brightness: brightness(1.1); + filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); +} + +.active\:brightness-50:active { + --tw-brightness: brightness(.5); + filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); +} + +.active\:brightness-90:active { + --tw-brightness: brightness(.9); + filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); +} + +.active\:brightness-95:active { + --tw-brightness: brightness(.95); + filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); +} + +@media (min-width: 640px) { + .sm\:w-10 { + width: 2.5rem; + } +} + +@media (min-width: 768px) { + .md\:pt-2 { + padding-top: 0.5rem; + } + + .md\:text-8xl { + font-size: 6rem; + line-height: 1; + } +} + +@media (min-width: 1024px) { + .lg\:visible { + visibility: visible; + } + + .lg\:left-\[100px\] { + left: 100px; + } + + .lg\:left-\[250px\] { + left: 250px; + } + + .lg\:left-\[400px\] { + left: 400px; + } + + .lg\:left-\[550px\] { + left: 550px; + } + + .lg\:right-\[340px\] { + right: 340px; + } + + .lg\:top-\[200px\] { + top: 200px; + } + + .lg\:top-\[250px\] { + top: 250px; + } + + .lg\:top-\[300px\] { + top: 300px; + } + + .lg\:top-\[350px\] { + top: 350px; + } + + .lg\:z-\[0\] { + z-index: 0; + } + + .lg\:mb-8 { + margin-bottom: 2rem; + } + + .lg\:w-\[360px\] { + width: 360px; + } + + .lg\:w-\[525px\] { + width: 525px; + } + + .lg\:rounded-xl { + border-radius: 0.75rem; + } + + .lg\:border-8 { + border-width: 8px; + } + + .lg\:border-solid { + border-style: solid; + } + + .lg\:border-white { + --tw-border-opacity: 1; + border-color: rgb(255 255 255 / var(--tw-border-opacity, 1)); + } + + .lg\:px-4 { + padding-left: 1rem; + padding-right: 1rem; + } + + .lg\:py-12 { + padding-top: 3rem; + padding-bottom: 3rem; + } + + .lg\:pl-\[50px\] { + padding-left: 50px; + } + + .lg\:pr-\[413px\] { + padding-right: 413px; + } + + .lg\:pt-0 { + padding-top: 0px; + } + + .lg\:hover\:cursor-grab:hover { + cursor: grab; + } + + .lg\:active\:cursor-move:active { + cursor: move; + } +} diff --git a/index.html b/index.html index f6a4fb3..643bd6b 100644 --- a/index.html +++ b/index.html @@ -6,7 +6,7 @@ name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" /> - + Site - taevas.xyz @@ -42,6 +42,6 @@
- + diff --git a/index.ts b/index.ts new file mode 100644 index 0000000..c18c501 --- /dev/null +++ b/index.ts @@ -0,0 +1,103 @@ +import { coding_github } from "./api/coding_github"; +import { coding_gitlab } from "./api/coding_gitlab"; +import { coding_kitsudev } from "./api/coding_kitsudev"; +import { fediverse_kitsuclub } from "./api/fediverse_kitsuclub"; +import { gaming_osu } from "./api/gaming_osu"; +import { gaming_speedruncom } from "./api/gaming_speedruncom"; +import { hacking_hackthebox } from "./api/hacking_hackthebox"; +import { japanese_wanikani } from "./api/japanese_wanikani"; +import { media_anilist } from "./api/media_anilist"; +import { media_lastfm } from "./api/media_lastfm"; +import { token } from "./api/token"; +import { website_umami } from "./api/website_umami"; + +export type Handler = (req: URLSearchParams) => Promise; +const api_endpoints: Handler[] = [ + coding_github, + coding_gitlab, + coding_kitsudev, + fediverse_kitsuclub, + gaming_osu, + gaming_speedruncom, + hacking_hackthebox, + japanese_wanikani, + media_anilist, + media_lastfm, + token, + website_umami +]; + +const builds = await Bun.build({ + entrypoints: ["./src/App.tsx", "index.css"], + target: "browser", + minify: { + identifiers: true, + syntax: true, + whitespace: true, + }, +}); + +const server = Bun.serve({ + port: 8080, + fetch: async (req) => { + const url = new URL(req.url); + const parameters = url.searchParams; + // merciless sanitization + let pathname = url.pathname; + pathname = pathname + .replace(/([^A-Za-z0-9/.-_])/g, "") + .replace(/(? { - const api = new Gitlab({token: process.env.API_GITLAB!}); - const gitlab = await api.Events.all({action: "pushed"}); - - const created_at = gitlab.at(0)?.created_at; - if (typeof created_at !== "string") { - return { - statusCode: 404, - }; - } - - const activity: GitlabInfo = { - date: created_at.substring(0, created_at.indexOf("T")), - }; - - return { - statusCode: 200, - body: JSON.stringify(activity), - }; -}; - -export {handler}; diff --git a/netlify/functions/gaming_osu.ts b/netlify/functions/gaming_osu.ts deleted file mode 100644 index e16b46a..0000000 --- a/netlify/functions/gaming_osu.ts +++ /dev/null @@ -1,34 +0,0 @@ -import {type Handler} from "@netlify/functions"; -import * as osu from "osu-api-v2-js"; -import {type OsuInfo} from "#Infos/Gaming/Osu.js"; -import {MongoClient} from "mongodb"; -import {type Token} from "./token.js"; - -const handler: Handler = async (req) => { - const client = new MongoClient(process.env.URL_MONGODB!); - await client.connect(); - - const db = client.db("tokens"); - const collection = db.collection("osu"); - const token = await collection.findOne(); - void client.close(); - - const ruleset = Number(req.queryStringParameters?.ruleset); - const api = new osu.API({access_token: token?.access_token}); - const profile = await api.getUser(7276846, !isNaN(ruleset) ? ruleset : undefined); - - const info: OsuInfo = { - country: profile.country.name, - ranks: { - global: profile.statistics.global_rank ?? 0, - country: profile.statistics.country_rank ?? 0, - }, - }; - - return { - statusCode: 200, - body: JSON.stringify(info), - }; -}; - -export {handler}; diff --git a/package.json b/package.json index 4791ba7..9e203c5 100644 --- a/package.json +++ b/package.json @@ -1,17 +1,15 @@ { "scripts": { - "dev": "vite", - "build": "vite build", - "serve": "vite preview", + "dev": "bunx bun css && bun --hot index.ts", + "css": "bun tailwindcss -i ./src/App.css -o index.css", "lint": "bunx eslint ." }, "dependencies": { "@bachmacintosh/wanikani-api-types": "^1.7.0", "@carbon/icons-react": "^11.56.0", "@gitbeaker/rest": "^42.1.0", - "@netlify/functions": "^2.8.2", "@octokit/rest": "^20.1.2", - "mongodb": "^6.14.0", + "mongodb": "^6.14.2", "osu-api-v2-js": "^1.1.1", "react": "^19.0.0", "react-dom": "^19.0.0", @@ -22,12 +20,13 @@ "@eslint/js": "^9.21.0", "@stylistic/eslint-plugin": "^3.1.0", "@tailwindcss/forms": "^0.5.10", + "@tailwindcss/postcss": "^4.0.11", "@types/bun": "latest", - "@types/node": "^20.17.22", + "@types/node": "^20.17.23", "@types/react": "^19.0.10", "@types/react-dom": "^19.0.4", - "@vitejs/plugin-react": "^4.3.4", "autoprefixer": "^10.4.20", + "dotenv": "^16.4.7", "eslint": "^9.21.0", "eslint-config-xo-typescript": "^7.0.0", "eslint-plugin-react": "^7.37.4", @@ -35,14 +34,13 @@ "react-animate-height": "^3.2.3", "tailwindcss": "^3.4.17", "typescript": "^5.8.2", - "typescript-eslint": "^8.25.0", - "vite": "^5.4.14" + "typescript-eslint": "^8.26.0" }, "imports": { "#Main/*": "./src/Main/*", "#Infos/*": "./src/Infos/*", "#parts/*": "./src/parts/*", - "#contexts": "./src/contexts.js" + "#contexts": "./src/contexts.tsx" }, "type": "module", "name": "taevas.xyz", diff --git a/src/App.css b/src/App.css index e3bc213..09345b8 100644 --- a/src/App.css +++ b/src/App.css @@ -4,7 +4,7 @@ @font-face { font-family: "LexendDeca"; - src: url("/fonts/LexendDeca-Regular.ttf") format("truetype"); + src: url("./assets/fonts/LexendDeca-Regular.ttf") format("truetype"); font-weight: normal; font-style: normal; } diff --git a/src/App.tsx b/src/App.tsx index e6b8d65..6d65d67 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,13 +1,11 @@ import React from "react"; import {createRoot} from "react-dom/client"; -import MainContent from "./Main/index.js"; -import Infos from "./Infos/index.js"; +import MainContent from "./Main/index.tsx"; +import Infos from "./Infos/index.tsx"; -const container = document.getElementById("root"); -const root = createRoot(container!); - +const root = createRoot(document.getElementById("root")!); root.render(
diff --git a/src/Infos/Coding/GitHub.tsx b/src/Infos/Coding/GitHub.tsx index 8f34d0e..c09dcf1 100644 --- a/src/Infos/Coding/GitHub.tsx +++ b/src/Infos/Coding/GitHub.tsx @@ -1,7 +1,7 @@ import React, {useState, useEffect} from "react"; -import Website from "../Website.js"; -import DataHandler from "#Infos/DataHandler.js"; -import Link from "#parts/Link.js"; +import Website from "../Website.tsx"; +import DataHandler from "#Infos/DataHandler.tsx"; +import Link from "#parts/Link.tsx"; export interface GithubInfo { public?: { diff --git a/src/Infos/Coding/GitLab.tsx b/src/Infos/Coding/GitLab.tsx index 2e009b1..08b641d 100644 --- a/src/Infos/Coding/GitLab.tsx +++ b/src/Infos/Coding/GitLab.tsx @@ -1,6 +1,6 @@ import React, {useState, useEffect} from "react"; -import Website from "../Website.js"; -import DataHandler from "#Infos/DataHandler.js"; +import Website from "../Website.tsx"; +import DataHandler from "#Infos/DataHandler.tsx"; export type GitlabInfo = { date: string; diff --git a/src/Infos/Coding/KitsuDev.tsx b/src/Infos/Coding/KitsuDev.tsx index 1a1c109..8a9b68e 100644 --- a/src/Infos/Coding/KitsuDev.tsx +++ b/src/Infos/Coding/KitsuDev.tsx @@ -1,7 +1,7 @@ import React, {useState, useEffect} from "react"; -import Website from "../Website.js"; -import DataHandler from "#Infos/DataHandler.js"; -import Link from "#parts/Link.js"; +import Website from "../Website.tsx"; +import DataHandler from "#Infos/DataHandler.tsx"; +import Link from "#parts/Link.tsx"; export type KitsudevInfo = { name: string diff --git a/src/Infos/Coding/index.tsx b/src/Infos/Coding/index.tsx index 07ef2a1..40d6fac 100644 --- a/src/Infos/Coding/index.tsx +++ b/src/Infos/Coding/index.tsx @@ -1,8 +1,8 @@ import React from "react"; -import Info from "../Info.js"; -import GitHub from "./GitHub.js"; -import GitLab from "./GitLab.js"; -import KitsuDev from "./KitsuDev.js"; +import Info from "../Info.tsx"; +import GitHub from "./GitHub.tsx"; +import GitLab from "./GitLab.tsx"; +import KitsuDev from "./KitsuDev.tsx"; export default function Coding() { const github = ; diff --git a/src/Infos/DataHandler.tsx b/src/Infos/DataHandler.tsx index 559cd74..cbc145a 100644 --- a/src/Infos/DataHandler.tsx +++ b/src/Infos/DataHandler.tsx @@ -9,7 +9,7 @@ export default function DataHandler(netlifyFuncti // Try to get and set data const updateData = async () => { try { - const response = await fetch("/.netlify/functions/" + netlifyFunctionName); + const response = await fetch("/api/" + netlifyFunctionName); if (!response.ok) {throw "failed";}; setData(expectData ? await response.json() : true); setError(false); diff --git a/src/Infos/Fediverse/KitsuClub.tsx b/src/Infos/Fediverse/KitsuClub.tsx index 7803d88..2c8cd9a 100644 --- a/src/Infos/Fediverse/KitsuClub.tsx +++ b/src/Infos/Fediverse/KitsuClub.tsx @@ -1,7 +1,7 @@ import React, {useState, useEffect} from "react"; -import Website from "../Website.js"; -import DataHandler from "#Infos/DataHandler.js"; -import Link from "#parts/Link.js"; +import Website from "../Website.tsx"; +import DataHandler from "#Infos/DataHandler.tsx"; +import Link from "#parts/Link.tsx"; export type KitsuclubInfo = { note_id: string diff --git a/src/Infos/Fediverse/index.tsx b/src/Infos/Fediverse/index.tsx index 204cecb..4b8e2d4 100644 --- a/src/Infos/Fediverse/index.tsx +++ b/src/Infos/Fediverse/index.tsx @@ -1,6 +1,6 @@ import React from "react"; -import Info from "../Info.js"; -import KitsuClub from "./KitsuClub.js"; +import Info from "../Info.tsx"; +import KitsuClub from "./KitsuClub.tsx"; export default function Hacking() { const kitsuclub = ; diff --git a/src/Infos/Gaming/Osu.tsx b/src/Infos/Gaming/Osu.tsx index 079d077..4cb75a1 100644 --- a/src/Infos/Gaming/Osu.tsx +++ b/src/Infos/Gaming/Osu.tsx @@ -1,7 +1,7 @@ import React, {useState, useEffect} from "react"; -import Website from "../Website.js"; +import Website from "../Website.tsx"; import { Ruleset } from "osu-api-v2-js"; -import DataHandler from "#Infos/DataHandler.js"; +import DataHandler from "#Infos/DataHandler.tsx"; export type OsuInfo = { country: string; @@ -28,7 +28,7 @@ export default function Osu(args: {ruleset: Ruleset}) { try { setElements([
- {`${ruleset} + {`${ruleset}

Global: #{data.ranks.global}

{data.country}: #{data.ranks.country}

diff --git a/src/Infos/Gaming/Speedruncom.tsx b/src/Infos/Gaming/Speedruncom.tsx index f7742eb..07dd026 100644 --- a/src/Infos/Gaming/Speedruncom.tsx +++ b/src/Infos/Gaming/Speedruncom.tsx @@ -1,8 +1,8 @@ import React, {useState, useEffect} from "react"; -import Website from "../Website.js"; -import DataHandler from "#Infos/DataHandler.js"; -import Link from "#parts/Link.js"; -import ButtonLink from "#parts/ButtonLink.js"; +import Website from "../Website.tsx"; +import DataHandler from "#Infos/DataHandler.tsx"; +import Link from "#parts/Link.tsx"; +import ButtonLink from "#parts/ButtonLink.tsx"; export type SpeedruncomInfo = { place: number; diff --git a/src/Infos/Gaming/index.tsx b/src/Infos/Gaming/index.tsx index 737b752..3d0e443 100644 --- a/src/Infos/Gaming/index.tsx +++ b/src/Infos/Gaming/index.tsx @@ -1,10 +1,10 @@ import React, {useEffect, useState} from "react"; -import Info from "../Info.js"; +import Info from "../Info.tsx"; -import Speedruncom from "./Speedruncom.js"; -import Osu from "./Osu.js"; +import Speedruncom from "./Speedruncom.tsx"; +import Osu from "./Osu.tsx"; import { Ruleset } from "osu-api-v2-js"; -import DataHandler from "#Infos/DataHandler.js"; +import DataHandler from "#Infos/DataHandler.tsx"; export default function RhythmGames() { const {data, error} = DataHandler("token?service=osu", 60 * 60 * 8, false); diff --git a/src/Infos/Hacking/Hackthebox.tsx b/src/Infos/Hacking/Hackthebox.tsx index 0996040..7fac489 100644 --- a/src/Infos/Hacking/Hackthebox.tsx +++ b/src/Infos/Hacking/Hackthebox.tsx @@ -1,7 +1,7 @@ import React, {useState, useEffect} from "react"; -import Website from "../Website.js"; -import ButtonLink from "#parts/ButtonLink.js"; -import DataHandler from "#Infos/DataHandler.js"; +import Website from "../Website.tsx"; +import ButtonLink from "#parts/ButtonLink.tsx"; +import DataHandler from "#Infos/DataHandler.tsx"; export type HacktheboxInfo = { id: string; diff --git a/src/Infos/Hacking/index.tsx b/src/Infos/Hacking/index.tsx index 4fbc843..1944622 100644 --- a/src/Infos/Hacking/index.tsx +++ b/src/Infos/Hacking/index.tsx @@ -1,6 +1,6 @@ import React from "react"; -import Info from "../Info.js"; -import Hackthebox from "./Hackthebox.js"; +import Info from "../Info.tsx"; +import Hackthebox from "./Hackthebox.tsx"; export default function Hacking() { const hackthebox = ; diff --git a/src/Infos/Japanese/Wanikani.tsx b/src/Infos/Japanese/Wanikani.tsx index 454cc33..ea9bf3c 100644 --- a/src/Infos/Japanese/Wanikani.tsx +++ b/src/Infos/Japanese/Wanikani.tsx @@ -1,7 +1,7 @@ import React, {useState, useEffect} from "react"; -import Website from "../Website.js"; +import Website from "../Website.tsx"; import { WKLevelProgression, WKReset } from "@bachmacintosh/wanikani-api-types"; -import DataHandler from "#Infos/DataHandler.js"; +import DataHandler from "#Infos/DataHandler.tsx"; export type WanikaniInfo = { progression: { diff --git a/src/Infos/Japanese/index.tsx b/src/Infos/Japanese/index.tsx index 65f4a69..9a966d7 100644 --- a/src/Infos/Japanese/index.tsx +++ b/src/Infos/Japanese/index.tsx @@ -1,6 +1,6 @@ import React from "react"; -import Info from "../Info.js"; -import Wanikani from "./Wanikani.js"; +import Info from "../Info.tsx"; +import Wanikani from "./Wanikani.tsx"; export default function Japanese() { const wanikani = ; diff --git a/src/Infos/Media/Anilist.tsx b/src/Infos/Media/Anilist.tsx index 8ff47d6..63c9af9 100644 --- a/src/Infos/Media/Anilist.tsx +++ b/src/Infos/Media/Anilist.tsx @@ -1,7 +1,7 @@ import React, {useState, useEffect} from "react"; -import Website from "../Website.js"; -import DataHandler from "#Infos/DataHandler.js"; -import Link from "#parts/Link.js"; +import Website from "../Website.tsx"; +import DataHandler from "#Infos/DataHandler.tsx"; +import Link from "#parts/Link.tsx"; export type AnilistInfo = { title: string; diff --git a/src/Infos/Media/Lastfm.tsx b/src/Infos/Media/Lastfm.tsx index 1baaabb..0796736 100644 --- a/src/Infos/Media/Lastfm.tsx +++ b/src/Infos/Media/Lastfm.tsx @@ -1,8 +1,8 @@ import React, {useState, useEffect} from "react"; import {format} from "timeago.js"; -import Website from "../Website.js"; -import Link from "#parts/Link.js"; -import DataHandler from "#Infos/DataHandler.js"; +import Website from "../Website.tsx"; +import Link from "#parts/Link.tsx"; +import DataHandler from "#Infos/DataHandler.tsx"; export type LastfmInfo = { artist: string; diff --git a/src/Infos/Media/index.tsx b/src/Infos/Media/index.tsx index ebf5713..6e39897 100644 --- a/src/Infos/Media/index.tsx +++ b/src/Infos/Media/index.tsx @@ -1,7 +1,7 @@ import React from "react"; -import Info from "../Info.js"; -import Lastfm from "./Lastfm.js"; -import Anilist from "./Anilist.js"; +import Info from "../Info.tsx"; +import Lastfm from "./Lastfm.tsx"; +import Anilist from "./Anilist.tsx"; export default function Media() { const lastfm = ; diff --git a/src/Infos/Website/Umami.tsx b/src/Infos/Website/Umami.tsx index 21ddec8..da744a0 100644 --- a/src/Infos/Website/Umami.tsx +++ b/src/Infos/Website/Umami.tsx @@ -1,6 +1,6 @@ import React, {useState, useEffect} from "react"; -import Website from "../Website.js"; -import DataHandler from "#Infos/DataHandler.js"; +import Website from "../Website.tsx"; +import DataHandler from "#Infos/DataHandler.tsx"; export type UmamiInfo = { pageviews: number diff --git a/src/Infos/Website/index.tsx b/src/Infos/Website/index.tsx index 7fc44af..bc61704 100644 --- a/src/Infos/Website/index.tsx +++ b/src/Infos/Website/index.tsx @@ -1,7 +1,7 @@ import React, {useEffect, useState} from "react"; -import Info from "../Info.js"; -import Umami from "./Umami.js"; -import DataHandler from "#Infos/DataHandler.js"; +import Info from "../Info.tsx"; +import Umami from "./Umami.tsx"; +import DataHandler from "#Infos/DataHandler.tsx"; export default function Website() { const {data} = DataHandler("token?service=umami", 60 * 60 * 8, false); diff --git a/src/Infos/index.tsx b/src/Infos/index.tsx index 7114e2e..eaff1e1 100644 --- a/src/Infos/index.tsx +++ b/src/Infos/index.tsx @@ -1,11 +1,11 @@ import React, {Component} from "react"; -import Media from "./Media/index.js"; -// import Hacking from "./Hacking/index.js"; -import Coding from "./Coding/index.js"; -import Gaming from "./Gaming/index.js"; -// import Japanese from "./Japanese/index.js"; -import Fediverse from "./Fediverse/index.js"; -import Website from "./Website/index.js"; +import Media from "./Media/index.tsx"; +// import Hacking from "./Hacking/index.tsx"; +import Coding from "./Coding/index.tsx"; +import Gaming from "./Gaming/index.tsx"; +// import Japanese from "./Japanese/index.tsx"; +import Fediverse from "./Fediverse/index.tsx"; +import Website from "./Website/index.tsx"; export default class Infos extends Component { private readonly dragbar = React.createRef(); diff --git a/src/Main/MainWindow/SocialButtons/index.tsx b/src/Main/MainWindow/SocialButtons/index.tsx index b5d65c0..7ac545c 100644 --- a/src/Main/MainWindow/SocialButtons/index.tsx +++ b/src/Main/MainWindow/SocialButtons/index.tsx @@ -1,5 +1,5 @@ import React from "react"; -import SocialButton from "./SocialButton.js"; +import SocialButton from "./SocialButton.tsx"; export default function SocialButtons() { return ( @@ -9,7 +9,7 @@ export default function SocialButtons() { border="border-red-500" rotation="rotate-12" link="https://www.youtube.com/@TTTaevas" - image="/logos/youtube.svg" + image="assets/logos/youtube.svg" padding="p-1" />
diff --git a/src/Main/MainWindow/TabButtons/index.tsx b/src/Main/MainWindow/TabButtons/index.tsx index 7bff343..8634298 100644 --- a/src/Main/MainWindow/TabButtons/index.tsx +++ b/src/Main/MainWindow/TabButtons/index.tsx @@ -1,6 +1,6 @@ import React from "react"; -import TabButton from "./TabButton.js"; -import Translatable from "#parts/Translatable.js"; +import TabButton from "./TabButton.tsx"; +import Translatable from "#parts/Translatable.tsx"; import {type TabDetails, LanguageContext, TabContext} from "#contexts"; export default function TabButtons({ diff --git a/src/Main/MainWindow/index.tsx b/src/Main/MainWindow/index.tsx index b331c37..3e2412e 100644 --- a/src/Main/MainWindow/index.tsx +++ b/src/Main/MainWindow/index.tsx @@ -1,9 +1,9 @@ import React from "react"; import AnimateHeight from "react-animate-height"; -import TabButtons from "./TabButtons/index.js"; -import SocialButtons from "./SocialButtons/index.js"; -import Translatable from "#parts/Translatable.js"; +import TabButtons from "./TabButtons/index.tsx"; +import SocialButtons from "./SocialButtons/index.tsx"; +import Translatable from "#parts/Translatable.tsx"; import {type TabDetails, TabContext} from "#contexts"; diff --git a/src/Main/Tabs/About/index.tsx b/src/Main/Tabs/About/index.tsx index f4e3a47..842354b 100644 --- a/src/Main/Tabs/About/index.tsx +++ b/src/Main/Tabs/About/index.tsx @@ -1,9 +1,9 @@ import React from "react"; -import Tab from "../Tab.js"; -import Translatable from "#parts/Translatable.js"; +import Tab from "../Tab.tsx"; +import Translatable from "#parts/Translatable.tsx"; import {UserProfile} from "@carbon/icons-react"; import {type TabDetails} from "#contexts"; -import Link from "#parts/Link.js"; +import Link from "#parts/Link.tsx"; export default function About({ setTabs, diff --git a/src/Main/Tabs/Contact/index.tsx b/src/Main/Tabs/Contact/index.tsx index 629b7ec..d343bac 100644 --- a/src/Main/Tabs/Contact/index.tsx +++ b/src/Main/Tabs/Contact/index.tsx @@ -1,10 +1,10 @@ import React from "react"; -import Tab from "../Tab.js"; +import Tab from "../Tab.tsx"; import {MailAll} from "@carbon/icons-react"; -import CopyField from "#parts/CopyField.js"; -import ButtonLink from "#parts/ButtonLink.js"; -import Translatable from "#parts/Translatable.js"; -import Link from "#parts/Link.js"; +import CopyField from "#parts/CopyField.tsx"; +import ButtonLink from "#parts/ButtonLink.tsx"; +import Translatable from "#parts/Translatable.tsx"; +import Link from "#parts/Link.tsx"; import {type TabDetails} from "#contexts"; export default function Contact({ @@ -28,7 +28,7 @@ export default function Contact({ en={

So, I've decided to go for Feel free to get in touch with me on this account:

} fr={

Alors, j'ai opté pour N'hésitez pas à entrer en contact avec moi sur ce compte :

} /> - + } fr={} diff --git a/src/Main/Tabs/Projects/index.tsx b/src/Main/Tabs/Projects/index.tsx index c8444b0..a55d6f9 100644 --- a/src/Main/Tabs/Projects/index.tsx +++ b/src/Main/Tabs/Projects/index.tsx @@ -1,9 +1,9 @@ import React from "react"; -import Tab from "../Tab.js"; -import Translatable from "#parts/Translatable.js"; +import Tab from "../Tab.tsx"; +import Translatable from "#parts/Translatable.tsx"; import {Devices} from "@carbon/icons-react"; import {type TabDetails} from "#contexts"; -import Link from "#parts/Link.js"; +import Link from "#parts/Link.tsx"; export default function Projects({ setTabs, @@ -48,8 +48,8 @@ export default function Projects({
Still in early 2023, I've made , my first JavaScript (TypeScript) package!

} - fr={

Toujours début 2023, j'ai créé , mon premier package JavaScript (TypeScript) !

} + en={

Still in early 2023, I've made , my first JavaScript (TypeScript) package!

} + fr={

Toujours début 2023, j'ai créé , mon premier package JavaScript (TypeScript) !

} />
So is something I've had to work on during three different and distinct periods. I started working on it in March 2023 roughly around the time I finished working on osu-api-v1-js, then I took a break and worked on it again in November 2023, only to finally finish it in March 2024.

} - fr={

Alors , c'est quelque chose sur lequel j'ai dû travailler durant 3 périodes bien différentes, en commençant en Mars 2023 genre quand j'ai fini osu-api-v1-js, puis Novembre 2023 après une pause, puis enfin Mars 2024 après une autre pause.

} + en={

So is something I've had to work on during three different and distinct periods. I started working on it in March 2023 roughly around the time I finished working on osu-api-v1.tsx, then I took a break and worked on it again in November 2023, only to finally finish it in March 2024.

} + fr={

Alors , c'est quelque chose sur lequel j'ai dû travailler durant 3 périodes bien différentes, en commençant en Mars 2023 genre quand j'ai fini osu-api-v1.tsx, puis Novembre 2023 après une pause, puis enfin Mars 2024 après une autre pause.

} />