-
- {spinnerChars[showing()]}
-
+
+
+
+ {spinnerChars[showing()]}
-
+
);
}
diff --git a/src/components/Typewriter.tsx b/src/components/Typewriter.tsx
index 6b062cc..09e9d2e 100644
--- a/src/components/Typewriter.tsx
+++ b/src/components/Typewriter.tsx
@@ -1,5 +1,4 @@
import { JSX, onMount, createSignal, children } from "solid-js";
-import { useSplash } from "~/context/splash";
export function Typewriter(props: {
children: JSX.Element;
@@ -17,7 +16,6 @@ export function Typewriter(props: {
typeof keepAlive === "number" ? keepAlive : -1
);
const resolved = children(() => props.children);
- const { showSplash } = useSplash();
onMount(() => {
if (!containerRef || !cursorRef) return;
@@ -69,23 +67,6 @@ export function Typewriter(props: {
cursorRef.style.height = `${firstChar.offsetHeight}px`;
}
- // THEN: Wait for splash to be hidden before starting the animation
- const checkSplashHidden = () => {
- if (showSplash()) {
- setTimeout(checkSplashHidden, 10);
- } else {
- // Start delay if specified
- if (delay > 0) {
- setTimeout(() => {
- setIsDelaying(false);
- startReveal();
- }, delay);
- } else {
- startReveal();
- }
- }
- };
-
const startReveal = () => {
setIsTyping(true); // Switch to typing cursor
@@ -139,7 +120,15 @@ export function Typewriter(props: {
setTimeout(revealNextChar, 100);
};
- checkSplashHidden();
+ // Start delay if specified, otherwise start immediately
+ if (delay > 0) {
+ setTimeout(() => {
+ setIsDelaying(false);
+ startReveal();
+ }, delay);
+ } else {
+ startReveal();
+ }
});
const getCursorClass = () => {
diff --git a/src/components/blog/Card.tsx b/src/components/blog/Card.tsx
index a07e56c..56d54b4 100644
--- a/src/components/blog/Card.tsx
+++ b/src/components/blog/Card.tsx
@@ -25,47 +25,40 @@ export interface CardProps {
export default function Card(props: CardProps) {
return (
-
+
-
+

-
+
-
+
{props.post.subtitle}
-
+
{props.post.title.replaceAll("_", " ")}
-
+
-
+
{props.post.total_comments || 0} Comments
-
+
{props.post.total_likes || 0} Likes
diff --git a/src/context/splash.tsx b/src/context/splash.tsx
deleted file mode 100644
index 31d8629..0000000
--- a/src/context/splash.tsx
+++ /dev/null
@@ -1,26 +0,0 @@
-import { Accessor, createContext, useContext } from "solid-js";
-import { createSignal } from "solid-js";
-
-// Create context with initial value
-const SplashContext = createContext<{
- showSplash: Accessor
;
- setShowSplash: (show: boolean) => void;
-}>({
- showSplash: () => true,
- setShowSplash: () => {}
-});
-
-export function useSplash() {
- const context = useContext(SplashContext);
- return context;
-}
-
-export function SplashProvider(props: { children: any }) {
- const [showSplash, setShowSplash] = createSignal(true);
-
- return (
-
- {props.children}
-
- );
-}
diff --git a/src/routes/blog/[title]/index.tsx b/src/routes/blog/[title]/index.tsx
index fdfac6d..17895ea 100644
--- a/src/routes/blog/[title]/index.tsx
+++ b/src/routes/blog/[title]/index.tsx
@@ -14,6 +14,7 @@ import CommentSectionWrapper from "~/components/blog/CommentSectionWrapper";
import PostBodyClient from "~/components/blog/PostBodyClient";
import type { Comment, CommentReaction, UserPublicData } from "~/types/comment";
import { useBars } from "~/context/bars";
+import { TerminalSplash } from "~/components/TerminalSplash";
// Server function to fetch post by title
const getPostByTitle = query(async (title: string) => {
@@ -141,13 +142,7 @@ export default function PostPage() {
return (
<>
-
- Loading post...
-
- }
- >
+
}>
{(loadedData) => (
}>
diff --git a/src/routes/blog/index.tsx b/src/routes/blog/index.tsx
index a7411ee..641cd17 100644
--- a/src/routes/blog/index.tsx
+++ b/src/routes/blog/index.tsx
@@ -6,6 +6,7 @@ import { api } from "~/lib/api";
import PostSortingSelect from "~/components/blog/PostSortingSelect";
import TagSelector from "~/components/blog/TagSelector";
import PostSorting from "~/components/blog/PostSorting";
+import { TerminalSplash } from "~/components/TerminalSplash";
export default function BlogIndex() {
const [searchParams] = useSearchParams();
@@ -20,13 +21,7 @@ export default function BlogIndex() {
Blog | Michael Freno
- }
- >
+ }>
@@ -47,13 +42,7 @@ export default function BlogIndex() {
-
- Loading posts...
-
- }
- >
+
}>
0}
fallback={No posts yet!
}