Skip to content

Commit

Permalink
feat: update cv projects
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards1230 committed Jan 1, 2024
1 parent 88ce051 commit 5e2ac1e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/app/(index)/cv/Projects.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import TagList from "@/components/TagList";
import ProjectDialog from "@/components/dialogs/ProjectDialog";
import { getAllProjects } from "@/models/project.server";

export default async function Projects() {
Expand All @@ -7,9 +8,13 @@ export default async function Projects() {
return (
<div className="space-y-2">
<div className="text-xl font-semibold">Projects</div>
<div className="space-y-4">
<div className="flex flex-col gap-4">
{projects.map(project => (
<div className="space-y-1" key={project.id}>
<ProjectDialog
project={project}
className="space-y-1 border border-transparent hover:border-border rounded-rounded rounded p-2"
key={project.id}
>
<div className="flex items-center justify-between">
<div className="flex gap-2 items-center">
<div className="font-medium">
Expand All @@ -23,13 +28,10 @@ export default async function Projects() {
{project.date.getFullYear()}
</p>
</div>
<div className="text-sm px-2">
{project.description}
</div>
<div>
<TagList tags={project.tags} />
</div>
</div>
</ProjectDialog>
))}
</div>
</div>
Expand Down
9 changes: 9 additions & 0 deletions src/components/Markdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import ReactMarkdown from "react-markdown";
export default function Markdown({ children }: { children: string }) {
return (
<ReactMarkdown
className="space-y-2"
components={{
h1: ({ node, ...props }) => (
<h1
Expand Down Expand Up @@ -48,6 +49,14 @@ export default function Markdown({ children }: { children: string }) {
{children}
</li>
),
pre: ({ node, children, ...props }) => (
<pre
{...props}
className="border border-border rounded rounded-rounded p-1 bg-secondary overflow-x-scroll"
>
{children}
</pre>
),
}}
>
{children}
Expand Down

0 comments on commit 5e2ac1e

Please sign in to comment.