stuff happened

This commit is contained in:
2025-06-29 23:41:20 -04:00
parent 3600166dc5
commit 82e118a0e5
34 changed files with 1907 additions and 261 deletions

View File

@ -3,7 +3,7 @@ import { Post } from "../types/index.ts";
export const PostBody = function PostBody({ post }: PostBodyOpts) {
return (
<div
class="p-6 bg-[#313244] shadow-md text-[#f5e0dc]"
class="p-6 bg-[#313244] shadow-md text-[#f5e0dc] post-content"
dangerouslySetInnerHTML={{ __html: post.body }}
></div>
);

View File

@ -1,23 +1,29 @@
import { Head } from "$fresh/runtime.ts";
import { Post } from "../types/index.ts";
import { convertUtc } from "../lib/convertUtc.ts";
export const PostHeader = function PostHeader({ post }: PostHeaderOpts) {
return (
<div class="p-6 bg-[#313244] shadow-md">
<div class="min-w-screen flex flex-col items-center justify-between bg-[#45475a] rounded-lg shadow-md">
<div class="sm:mt-14 sm:mb-14 mt-8 mb-8 flex flex-col items-center gap-y-5 gap-x-10 md:flex-row">
<div class="space-y-2 text-center md:text-left">
<p class="text-2xl text-[#f5e0dc] font-bold sm:text-4xl">
{post.title}
</p>
<p class="text-md font-medium text-[#E39A9C] sm:text-xl italic">
by {post.first_name} {post.last_name} posted on{" "}
{convertUtc(post.created_at)}
</p>
<>
<Head>
<title>Wyatt J. Miller | {post.title}</title>
</Head>
<div class="p-6 bg-[#313244] shadow-md">
<div class="min-w-screen flex flex-col items-center justify-between bg-[#45475a] rounded-lg shadow-md">
<div class="sm:mt-14 sm:mb-14 mt-8 mb-8 flex flex-col items-center gap-y-5 gap-x-10 md:flex-row">
<div class="space-y-2 text-center md:text-left">
<p class="text-2xl text-[#f5e0dc] font-bold sm:text-4xl">
{post.title}
</p>
<p class="text-md font-medium text-[#E39A9C] sm:text-xl italic">
by {post.first_name} {post.last_name} posted on{" "}
{convertUtc(post.created_at)}
</p>
</div>
</div>
</div>
</div>
</div>
</>
);
};

View File

@ -0,0 +1,14 @@
export const ShareLinkButton = function ShareLinkButton({props}) {
const [text. setText] = useState("Share");
const onClickHandler = () => {
navigator.clipboard.writeText(location.href);
setText("Copied to clipboard!");
};
return (
<button onClick={onClickHandler}>
{text}
</button>
)
}

View File

@ -11,15 +11,10 @@
},
"lint": {
"rules": {
"tags": [
"fresh",
"recommended"
]
"tags": ["fresh", "recommended"]
}
},
"exclude": [
"**/_fresh/*"
],
"exclude": ["**/_fresh/*"],
"imports": {
"$fresh/": "https://deno.land/x/fresh@1.6.8/",
"$std/": "https://deno.land/std@0.216.0/",
@ -33,7 +28,8 @@
"preact/jsx-runtime": "npm:preact@10.22.1/jsx-runtime",
"tailwindcss": "npm:tailwindcss@3.4.1",
"tailwindcss/": "npm:/tailwindcss@3.4.1/",
"tailwindcss/plugin": "npm:/tailwindcss@3.4.1/plugin.js"
"tailwindcss/plugin": "npm:/tailwindcss@3.4.1/plugin.js",
"tailwind-highlightjs": "npm:tailwind-highlightjs"
},
"compilerOptions": {
"jsx": "react-jsx",

View File

@ -27,7 +27,6 @@ export const handler: Handlers<PageData> = {
export default function PostIdentifier({ data }: PageProps<PageData>) {
const { postData } = data;
console.log(postData);
return (
<div>

View File

@ -1,6 +1,32 @@
import { FreshContext, Handlers, PageProps } from "$fresh/server.ts";
import { ProjectCard } from "../../islands/ProjectCard.tsx";
export default function Projects() {
interface ProjectData {
project_id: number;
title: string;
repo?: string;
summary: string;
tech: string;
wip?: boolean;
created_at: string;
}
export const handler: Handlers<ProjectData> = {
async GET(_req: Request, ctx: FreshContext) {
const projectResult = await fetch(
`${Deno.env.get("BASE_URI_API")}/projects`,
);
const projectData = await projectResult.json();
return ctx.render({
projectData,
});
},
};
export default function Projects({ data }: PageProps<ProjectData>) {
const { projectData: projects } = data;
return (
<div class="space-y-12 px-10 py-8 sm:min-h-screen bg-[#313244]">
<section
@ -10,56 +36,18 @@ export default function Projects() {
<h1 class="text-3xl text-white font-bold uppercase text-center">
Projects
</h1>
<div class="grid grid-cols-1 sm:grid-cols-2 ">
<ProjectCard
wip
title="Website v2"
summary="This website was built by yours truly!"
// repo="https://scm.wyattjmiller.com/wymiller/my-website-v2"
tech="Typescript, Deno, Fresh, Tailwind, Rust, PostgreSQL, Docker"
/>
<ProjectCard
title="BallBot"
repo="https://scm.wyattjmiller.com/wymiller/ballbot"
summary="A Discord bot that tells me NFL games, teams, and more!"
tech="Rust, Discord SDK, Docker"
/>
<ProjectCard
title="Nix configurations"
repo="https://scm.wyattjmiller.com/wymiller/nix-config-v2"
summary="My 'master' declarative system configuration for multiple computers"
tech="Nix"
/>
<ProjectCard
wip
title="omega"
summary="Music bot for Discord that plays music from different music sources"
tech="Rust, Discord SDK, SurrealDB, yt-dlp"
/>
<ProjectCard
title="gt"
repo="https://scm.wyattjmiller.com/wymiller/gt"
summary="Command line application to interact with Gitea"
tech="Rust"
/>
<ProjectCard
title="The Boyos Bot"
repo="https://github.com/NoahFlowa/BoyosBot"
summary="All-in-one Discord bot, built with my friend, NoahFlowa"
tech="Javascript, Node, Discord SDK, Docker"
/>
<ProjectCard
title="drillsergeant"
repo="https://scm.wyattjmiller.com/wymiller/drillsergeant"
summary="Git commit counter, to scratch an itch I had"
tech="C#, .NET"
/>
<ProjectCard
title="bleak"
repo="https://scm.wyattjmiller.com/wymiller/bleak"
summary="Turns your Raspberry Pi into a lighting controller"
tech="Rust"
/>
<div class="grid grid-cols-1 sm:grid-cols-2">
{projects.map((project: any) => {
return (
<ProjectCard
title={project.title}
repo={project.repo ?? undefined}
summary={project.summary}
tech={project.tech}
wip={project.wip ?? true}
/>
);
})}
</div>
</section>
</div>

View File

@ -0,0 +1 @@
Sitemap: https://wyattjmiller.us-ord-1.linodeobjects.com/feed.xml

View File

@ -1,3 +1,31 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
.post-content h1 {
@apply text-3xl font-bold text-[#f5e0dc] mb-4 mt-6;
}
.post-content h2 {
@apply text-2xl font-semibold text-[#f5e0dc] mb-3 mt-5;
}
.post-content h3 {
@apply text-xl font-medium text-[#f5e0dc] mb-2 mt-4;
}
.post-content h4 {
@apply text-lg font-medium text-[#f5e0dc] mb-2 mt-3;
}
.post-content p {
@apply mb-3 text-[#f5e0dc];
}
.post-content pre {
@apply overflow-x-scroll bg-[#454656] p-2 mb-4 rounded-lg;
}
.post-content code {
@apply text-[#DCC9C6];
}

View File

@ -1,5 +1,7 @@
import { type Config } from "tailwindcss";
import twHLJS from "tailwind-highlightjs";
export default {
content: ["{routes,islands,components}/**/*.{ts,tsx}"],
// plugins: [twHLJS],
} satisfies Config;