This commit is contained in:
2026-03-31 12:00:27 -07:00
parent 367470b54e
commit 11f05e0d6f
23 changed files with 31 additions and 59 deletions

View File

@@ -1,4 +1,4 @@
import React, { useState, useEffect } from "react"; import { useState, useEffect } from "react";
const GlitchText = () => { const GlitchText = () => {
const originalText = 'Error 404'; const originalText = 'Error 404';

View File

@@ -1,5 +1,5 @@
import React, { useEffect, useRef, useState } from "react"; import { useEffect, useRef, useState } from "react";
import { ChevronDownIcon } from "@/components/icons"; import { ChevronDown } from "lucide-react";
export default function Intro() { export default function Intro() {
const [visible, setVisible] = useState(false); const [visible, setVisible] = useState(false);
@@ -97,7 +97,7 @@ export default function Intro() {
className="text-foreground/50 hover:text-yellow-bright transition-colors duration-300" className="text-foreground/50 hover:text-yellow-bright transition-colors duration-300"
aria-label="Scroll to next section" aria-label="Scroll to next section"
> >
<ChevronDownIcon size={40} className="animate-bounce" /> <ChevronDown size={40} className="animate-bounce" />
</button> </button>
</div> </div>
</div> </div>

View File

@@ -1,4 +1,3 @@
import React from "react";
interface ActivityDay { interface ActivityDay {
grand_total: { total_seconds: number }; grand_total: { total_seconds: number };

View File

@@ -1,4 +1,4 @@
import React, { useEffect, useRef, useState } from "react"; import { useEffect, useRef, useState } from "react";
interface AnimateInProps { interface AnimateInProps {
children: React.ReactNode; children: React.ReactNode;

View File

@@ -1,9 +1,9 @@
import type { AnimationEngine } from "@/lib/animations/types"; import type { AnimationEngine } from "@/lib/animations/types";
import { GameOfLifeEngine } from "./game-of-life"; import { GameOfLifeEngine } from "@/components/background/engines/game-of-life";
import { LavaLampEngine } from "./lava-lamp"; import { LavaLampEngine } from "@/components/background/engines/lava-lamp";
import { ConfettiEngine } from "./confetti"; import { ConfettiEngine } from "@/components/background/engines/confetti";
import { AsciiquariumEngine } from "./asciiquarium"; import { AsciiquariumEngine } from "@/components/background/engines/asciiquarium";
import { PipesEngine } from "./pipes"; import { PipesEngine } from "@/components/background/engines/pipes";
type ChildId = "game-of-life" | "lava-lamp" | "confetti" | "asciiquarium" | "pipes"; type ChildId = "game-of-life" | "lava-lamp" | "confetti" | "asciiquarium" | "pipes";

View File

@@ -1,10 +1,10 @@
import { useEffect, useRef } from "react"; import { useEffect, useRef } from "react";
import { GameOfLifeEngine } from "./engines/game-of-life"; import { GameOfLifeEngine } from "@/components/background/engines/game-of-life";
import { LavaLampEngine } from "./engines/lava-lamp"; import { LavaLampEngine } from "@/components/background/engines/lava-lamp";
import { ConfettiEngine } from "./engines/confetti"; import { ConfettiEngine } from "@/components/background/engines/confetti";
import { AsciiquariumEngine } from "./engines/asciiquarium"; import { AsciiquariumEngine } from "@/components/background/engines/asciiquarium";
import { PipesEngine } from "./engines/pipes"; import { PipesEngine } from "@/components/background/engines/pipes";
import { ShuffleEngine } from "./engines/shuffle"; import { ShuffleEngine } from "@/components/background/engines/shuffle";
import { getStoredAnimationId } from "@/lib/animations/engine"; import { getStoredAnimationId } from "@/lib/animations/engine";
import type { AnimationEngine } from "@/lib/animations/types"; import type { AnimationEngine } from "@/lib/animations/types";
import type { AnimationId } from "@/lib/animations"; import type { AnimationId } from "@/lib/animations";

View File

@@ -1,4 +1,3 @@
import React from "react";
import { RssIcon, TagIcon, TrendingUpIcon } from "lucide-react"; import { RssIcon, TagIcon, TrendingUpIcon } from "lucide-react";
import { AnimateIn } from "@/components/animate-in"; import { AnimateIn } from "@/components/animate-in";

View File

@@ -1,4 +1,3 @@
import React from "react";
import { AnimateIn } from "@/components/animate-in"; import { AnimateIn } from "@/components/animate-in";
type BlogPost = { type BlogPost = {

View File

@@ -1,4 +1,3 @@
import React from "react";
import { Links } from "@/components/footer/links"; import { Links } from "@/components/footer/links";
export default function Footer({ fixed = false }) { export default function Footer({ fixed = false }) {

View File

@@ -1,4 +1,4 @@
import React, { useState, useEffect } from "react"; import { useState, useEffect, useRef } from "react";
import { Links } from "@/components/header/links"; import { Links } from "@/components/header/links";
export default function Header({ transparent = false }: { transparent?: boolean }) { export default function Header({ transparent = false }: { transparent?: boolean }) {

View File

@@ -1,4 +1,3 @@
import React from "react";
import Typewriter from "typewriter-effect"; import Typewriter from "typewriter-effect";
const html = (strings: TemplateStringsArray, ...values: any[]) => { const html = (strings: TemplateStringsArray, ...values: any[]) => {

View File

@@ -1,7 +0,0 @@
import React from "react";
import { ChevronDown } from "lucide-react";
export const ChevronDownIcon = (props: React.ComponentProps<typeof ChevronDown>) => {
return <ChevronDown {...props} />;
};

View File

@@ -1 +0,0 @@
export { ChevronDownIcon } from "@/components/icons/chevron-down";

View File

@@ -1,4 +1,3 @@
import React from "react";
import type { CollectionEntry } from "astro:content"; import type { CollectionEntry } from "astro:content";
import { AnimateIn } from "@/components/animate-in"; import { AnimateIn } from "@/components/animate-in";

View File

@@ -1,6 +1,4 @@
--- ---
const { content } = Astro.props;
import "@/style/globals.css"; import "@/style/globals.css";
import { ClientRouter } from "astro:transitions"; import { ClientRouter } from "astro:transitions";

View File

@@ -1,5 +1,5 @@
import { ANIMATION_IDS, DEFAULT_ANIMATION_ID } from "./index"; import { ANIMATION_IDS, DEFAULT_ANIMATION_ID } from "@/lib/animations";
import type { AnimationId } from "./index"; import type { AnimationId } from "@/lib/animations";
export function getStoredAnimationId(): AnimationId { export function getStoredAnimationId(): AnimationId {
if (typeof window === "undefined") return DEFAULT_ANIMATION_ID; if (typeof window === "undefined") return DEFAULT_ANIMATION_ID;

View File

@@ -1,4 +1,4 @@
import { ANIMATION_IDS, DEFAULT_ANIMATION_ID } from "./index"; import { ANIMATION_IDS, DEFAULT_ANIMATION_ID } from "@/lib/animations";
const VALID_IDS = JSON.stringify(ANIMATION_IDS); const VALID_IDS = JSON.stringify(ANIMATION_IDS);

View File

@@ -1,14 +0,0 @@
import readingTime from "reading-time";
type Post = {
title: string
file: string
rawContent: () => string
}
export default function getPostData(post: Post) {
return {
slug: post.file.split('/').pop().split('.').shift(),
readingTime: readingTime(post.rawContent()).text,
}
}

View File

@@ -1,6 +1,6 @@
import { THEMES, DEFAULT_THEME_ID } from "./index"; import { THEMES, DEFAULT_THEME_ID } from "@/lib/themes";
import { CSS_PROPS } from "./props"; import { CSS_PROPS } from "@/lib/themes/props";
import type { Theme } from "./types"; import type { Theme } from "@/lib/themes/types";
export function getStoredThemeId(): string { export function getStoredThemeId(): string {
if (typeof window === "undefined") return DEFAULT_THEME_ID; if (typeof window === "undefined") return DEFAULT_THEME_ID;

View File

@@ -3,8 +3,8 @@
* Called at build time in Astro frontmatter. * Called at build time in Astro frontmatter.
* The script reads "theme" from localStorage, looks up colors, injects a <style> tag. * The script reads "theme" from localStorage, looks up colors, injects a <style> tag.
*/ */
import { THEMES } from "./index"; import { THEMES } from "@/lib/themes";
import { CSS_PROPS } from "./props"; import { CSS_PROPS } from "@/lib/themes/props";
// Pre-build a { prop: value } map for each theme at build time // Pre-build a { prop: value } map for each theme at build time
const themeVars: Record<string, Record<string, string>> = {}; const themeVars: Record<string, Record<string, string>> = {};

View File

@@ -1,4 +1,4 @@
import type { ThemeColors } from "./types"; import type { ThemeColors } from "@/lib/themes/types";
export const CSS_PROPS: [keyof ThemeColors, string][] = [ export const CSS_PROPS: [keyof ThemeColors, string][] = [
["background", "--color-background"], ["background", "--color-background"],

View File

@@ -4,7 +4,7 @@ import GlitchText from "@/components/404/glitched-text";
const title = "404 Not Found"; const title = "404 Not Found";
--- ---
<IndexLayout content={{ title: "404 | Timothy Pidashev" }}> <IndexLayout title="404 | Timothy Pidashev" description="Page not found">
<main class="min-h-screen flex flex-col items-center justify-center p-4 text-center"> <main class="min-h-screen flex flex-col items-center justify-center p-4 text-center">
<GlitchText client:only /> <GlitchText client:only />
<p class="text-xl text-orange mb-8">Whoops! This page doesn't exist :(</p> <p class="text-xl text-orange mb-8">Whoops! This page doesn't exist :(</p>

View File

@@ -3,8 +3,10 @@ import { getCollection } from "astro:content";
import type { APIContext } from "astro"; import type { APIContext } from "astro";
export async function GET(context: APIContext) { export async function GET(context: APIContext) {
const blog = await getCollection("blog"); const blog = await getCollection("blog", ({ data }) => {
return import.meta.env.DEV || data.isDraft !== true;
});
const sortedPosts = blog const sortedPosts = blog
.sort((a, b) => b.data.date.valueOf() - a.data.date.valueOf()); .sort((a, b) => b.data.date.valueOf() - a.data.date.valueOf());