M islands/MarkdownBlock.tsx => islands/MarkdownBlock.tsx +23 -4
@@ 1,11 1,10 @@
// This file parses markdown and renders it as JSX
import { useEffect, useState } from "preact/hooks";
-import { Head } from "$fresh/runtime.ts";
import { CSS, render } from "https://deno.land/x/gfm@0.6.0/mod.ts";
// Add support for TypeScript and Bash.
-import "https://esm.sh/prismjs@1.29.0/components/prism-typescript?no-check";
-import "https://esm.sh/prismjs@1.29.0/components/prism-bash?no-check";
+// import "https://esm.sh/prismjs@1.29.0/components/prism-typescript?no-check";
+// import "https://esm.sh/prismjs@1.29.0/components/prism-bash?no-check";
import type { Metadata } from "../routes/api/feed.tsx";
@@ 25,7 24,27 @@ export default function MarkdownBlock(props: MarkdownBlockProps) {
// markdown is null, display error message
if (markdown === null) {
- return <div>Error: Markdown not found</div>;
+ return (
+ <div>
+ <style>
+ {CSS}
+ </style>
+ <div>
+ <h1 className={"font-bold m-0 text-3xl"}>Error</h1>
+ <span className={"text-xs font-light m-0"}>
+ Failed to load markdown file: {props.src}
+ </span>
+ </div>
+ <main
+ data-color-mode="auto"
+ data-light-theme="light"
+ data-dark-theme="dark"
+ className="markdown-body markdown-box [text-shadow:none]"
+ >
+ <div dangerouslySetInnerHTML={{ __html: `` }} />
+ </main>
+ </div>
+ );
}
const metadata: Partial<Metadata> = {};
M islands/SplashTextDisplay.tsx => islands/SplashTextDisplay.tsx +4 -3
@@ 1,11 1,12 @@
import { useSignal } from "@preact/signals";
import splashTexts, { SplashText } from "./splashTextsStore.tsx";
-import { render } from "$fresh/src/server/render.ts";
const seenSplashes: SplashText[] = [];
export default function SplashTextDisplay() {
- const splash = useSignal(splashTexts[0]);
+ const splash = useSignal({
+ "text": "Chrono",
+ } as SplashText);
function handleClick() {
let nextSplash: number;
@@ 37,7 38,7 @@ export default function SplashTextDisplay() {
<>
<div
title="click this text for a new splash!"
- className="hover:text-violet-600 list-none"
+ className="hover:text-violet-600 list-none select-none"
onClick={handleClick}
>
{splash.value.render ? splash.value.render(splash.value.text) : (
M islands/splashTextsStore.tsx => islands/splashTextsStore.tsx +4 -0
@@ 26,6 26,10 @@ const splashTexts: SplashText[] = [
},
{
"text": "soon™",
+ render: (text: string) => {
+ // make it so soontm strobes colors css
+ return <span className="animate-pulse">{text}</span>;
+ },
},
{
"text": "if i'm not running down mid it's not me playing",
M static/positions/philosophy.md => static/positions/philosophy.md +2 -1
@@ 5,7 5,8 @@ tags: ["positions"]
date: 2023-04-05
---
-> "It's The Code You Live By That Defines Who You Are." — Johnny Silverhand (Cyberpunk 2077)
+> "It's The Code You Live By That Defines Who You Are." — Johnny Silverhand
+> (Cyberpunk 2077)
## My Foundational Beliefs
M static/styles.css => static/styles.css +0 -1
@@ 28,7 28,6 @@ code {
padding: 25px;
}
-/* create rounded box for markdown box */
.markdown-box {
border-radius: 0.8rem;
border: 6.45px solid #2b2b2b;