mirror of
https://github.com/timmypidashev/web.git
synced 2026-04-14 11:03:50 +00:00
bugfixes
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import React, { useState, useEffect } from "react";
|
||||
import { useState, useEffect } from "react";
|
||||
|
||||
const GlitchText = () => {
|
||||
const originalText = 'Error 404';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React, { useEffect, useRef, useState } from "react";
|
||||
import { ChevronDownIcon } from "@/components/icons";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { ChevronDown } from "lucide-react";
|
||||
|
||||
export default function Intro() {
|
||||
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"
|
||||
aria-label="Scroll to next section"
|
||||
>
|
||||
<ChevronDownIcon size={40} className="animate-bounce" />
|
||||
<ChevronDown size={40} className="animate-bounce" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import React from "react";
|
||||
|
||||
interface ActivityDay {
|
||||
grand_total: { total_seconds: number };
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { useEffect, useRef, useState } from "react";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
|
||||
interface AnimateInProps {
|
||||
children: React.ReactNode;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import type { AnimationEngine } from "@/lib/animations/types";
|
||||
import { GameOfLifeEngine } from "./game-of-life";
|
||||
import { LavaLampEngine } from "./lava-lamp";
|
||||
import { ConfettiEngine } from "./confetti";
|
||||
import { AsciiquariumEngine } from "./asciiquarium";
|
||||
import { PipesEngine } from "./pipes";
|
||||
import { GameOfLifeEngine } from "@/components/background/engines/game-of-life";
|
||||
import { LavaLampEngine } from "@/components/background/engines/lava-lamp";
|
||||
import { ConfettiEngine } from "@/components/background/engines/confetti";
|
||||
import { AsciiquariumEngine } from "@/components/background/engines/asciiquarium";
|
||||
import { PipesEngine } from "@/components/background/engines/pipes";
|
||||
|
||||
type ChildId = "game-of-life" | "lava-lamp" | "confetti" | "asciiquarium" | "pipes";
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { useEffect, useRef } from "react";
|
||||
import { GameOfLifeEngine } from "./engines/game-of-life";
|
||||
import { LavaLampEngine } from "./engines/lava-lamp";
|
||||
import { ConfettiEngine } from "./engines/confetti";
|
||||
import { AsciiquariumEngine } from "./engines/asciiquarium";
|
||||
import { PipesEngine } from "./engines/pipes";
|
||||
import { ShuffleEngine } from "./engines/shuffle";
|
||||
import { GameOfLifeEngine } from "@/components/background/engines/game-of-life";
|
||||
import { LavaLampEngine } from "@/components/background/engines/lava-lamp";
|
||||
import { ConfettiEngine } from "@/components/background/engines/confetti";
|
||||
import { AsciiquariumEngine } from "@/components/background/engines/asciiquarium";
|
||||
import { PipesEngine } from "@/components/background/engines/pipes";
|
||||
import { ShuffleEngine } from "@/components/background/engines/shuffle";
|
||||
import { getStoredAnimationId } from "@/lib/animations/engine";
|
||||
import type { AnimationEngine } from "@/lib/animations/types";
|
||||
import type { AnimationId } from "@/lib/animations";
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import React from "react";
|
||||
import { RssIcon, TagIcon, TrendingUpIcon } from "lucide-react";
|
||||
import { AnimateIn } from "@/components/animate-in";
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import React from "react";
|
||||
import { AnimateIn } from "@/components/animate-in";
|
||||
|
||||
type BlogPost = {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import React from "react";
|
||||
import { Links } from "@/components/footer/links";
|
||||
|
||||
export default function Footer({ fixed = false }) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { useState, useEffect } from "react";
|
||||
import { useState, useEffect, useRef } from "react";
|
||||
import { Links } from "@/components/header/links";
|
||||
|
||||
export default function Header({ transparent = false }: { transparent?: boolean }) {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import React from "react";
|
||||
import Typewriter from "typewriter-effect";
|
||||
|
||||
const html = (strings: TemplateStringsArray, ...values: any[]) => {
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
import React from "react";
|
||||
|
||||
import { ChevronDown } from "lucide-react";
|
||||
|
||||
export const ChevronDownIcon = (props: React.ComponentProps<typeof ChevronDown>) => {
|
||||
return <ChevronDown {...props} />;
|
||||
};
|
||||
@@ -1 +0,0 @@
|
||||
export { ChevronDownIcon } from "@/components/icons/chevron-down";
|
||||
@@ -1,4 +1,3 @@
|
||||
import React from "react";
|
||||
import type { CollectionEntry } from "astro:content";
|
||||
import { AnimateIn } from "@/components/animate-in";
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
---
|
||||
const { content } = Astro.props;
|
||||
|
||||
import "@/style/globals.css";
|
||||
|
||||
import { ClientRouter } from "astro:transitions";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ANIMATION_IDS, DEFAULT_ANIMATION_ID } from "./index";
|
||||
import type { AnimationId } from "./index";
|
||||
import { ANIMATION_IDS, DEFAULT_ANIMATION_ID } from "@/lib/animations";
|
||||
import type { AnimationId } from "@/lib/animations";
|
||||
|
||||
export function getStoredAnimationId(): AnimationId {
|
||||
if (typeof window === "undefined") return DEFAULT_ANIMATION_ID;
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
import { THEMES, DEFAULT_THEME_ID } from "./index";
|
||||
import { CSS_PROPS } from "./props";
|
||||
import type { Theme } from "./types";
|
||||
import { THEMES, DEFAULT_THEME_ID } from "@/lib/themes";
|
||||
import { CSS_PROPS } from "@/lib/themes/props";
|
||||
import type { Theme } from "@/lib/themes/types";
|
||||
|
||||
export function getStoredThemeId(): string {
|
||||
if (typeof window === "undefined") return DEFAULT_THEME_ID;
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* Called at build time in Astro frontmatter.
|
||||
* The script reads "theme" from localStorage, looks up colors, injects a <style> tag.
|
||||
*/
|
||||
import { THEMES } from "./index";
|
||||
import { CSS_PROPS } from "./props";
|
||||
import { THEMES } from "@/lib/themes";
|
||||
import { CSS_PROPS } from "@/lib/themes/props";
|
||||
|
||||
// Pre-build a { prop: value } map for each theme at build time
|
||||
const themeVars: Record<string, Record<string, string>> = {};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { ThemeColors } from "./types";
|
||||
import type { ThemeColors } from "@/lib/themes/types";
|
||||
|
||||
export const CSS_PROPS: [keyof ThemeColors, string][] = [
|
||||
["background", "--color-background"],
|
||||
|
||||
@@ -4,7 +4,7 @@ import GlitchText from "@/components/404/glitched-text";
|
||||
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">
|
||||
<GlitchText client:only />
|
||||
<p class="text-xl text-orange mb-8">Whoops! This page doesn't exist :(</p>
|
||||
|
||||
@@ -3,8 +3,10 @@ import { getCollection } from "astro:content";
|
||||
import type { APIContext } from "astro";
|
||||
|
||||
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
|
||||
.sort((a, b) => b.data.date.valueOf() - a.data.date.valueOf());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user