diff options
| author | schererleander <leander@schererleander.de> | 2025-06-25 02:02:45 +0200 |
|---|---|---|
| committer | schererleander <leander@schererleander.de> | 2025-06-25 02:02:45 +0200 |
| commit | 6d6665eb52d87818df94774e506cf201a8208116 (patch) | |
| tree | df94d817701a8bf834c23ed469bb3e1e078042c5 /src | |
| parent | cb5c3ab193131dcd61e7ab489e94d8f47a5c0e1e (diff) | |
svg attributes to camelCase
Diffstat (limited to 'src')
| -rw-r--r-- | src/components/ThemeToggle.tsx | 4 | ||||
| -rw-r--r-- | src/pages/Blog.tsx | 22 | ||||
| -rw-r--r-- | src/pages/Post.tsx | 19 |
3 files changed, 14 insertions, 31 deletions
diff --git a/src/components/ThemeToggle.tsx b/src/components/ThemeToggle.tsx index 8e1e2aa..fa269b1 100644 --- a/src/components/ThemeToggle.tsx +++ b/src/components/ThemeToggle.tsx @@ -13,7 +13,7 @@ export default function ThemeToggle() { stroke="currentColor" aria-hidden="true" > - <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"></path></svg> + <path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"></path></svg> ) : ( <svg className="w-5 h-5" @@ -22,7 +22,7 @@ export default function ThemeToggle() { stroke="currentColor" aria-hidden="true" > - <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z"></path></svg> + <path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z"></path></svg> )} </button> ); diff --git a/src/pages/Blog.tsx b/src/pages/Blog.tsx index fa9b609..1b20e89 100644 --- a/src/pages/Blog.tsx +++ b/src/pages/Blog.tsx @@ -27,18 +27,16 @@ export default function Blog() { return ( <section className="container mx-auto px-4 py-10"> <h1 className="text-4xl font-bold mb-8">Blog</h1> - - <div className="grid gap-6 sm:grid-cols-2 lg:grid-cols-3"> - {posts.map((post) => ( - <Link key={post.slug} to={`/blog/${post.slug}`} className="block"> - <CardLink - title={post.title} - body={post.excerpt} - imgSrc={post.cover} - /> - </Link> - ))} - </div> + + {posts.map((post) => ( + <Link key={post.slug} to={`/blog/${post.slug}`} className="block"> + <CardLink + title={post.title} + body={post.excerpt} + imgSrc={post.cover} + /> + </Link> + ))} </section> ); }
\ No newline at end of file diff --git a/src/pages/Post.tsx b/src/pages/Post.tsx index 5c0f0ca..67f8959 100644 --- a/src/pages/Post.tsx +++ b/src/pages/Post.tsx @@ -1,6 +1,4 @@ import { useParams, Link } from "react-router-dom"; -import CodeSnippet from "../components/CodeSnippet"; -import LinkWithIcon from "../components/LinkWithIcon"; import NotFoundPage from "./404Page"; interface PostFile { @@ -29,7 +27,7 @@ export default function Post() { return ( <article className="prose prose-zinc dark:prose-invert mx-auto px-4 py-10"> - <Link to="/blog" className="no-underline"> + <Link to="/blog" className="no-underline hover:underline"> ← Back </Link> @@ -46,20 +44,7 @@ export default function Post() { {new Date(meta.date).toLocaleDateString("de-DE")} </p> - {/* The Markdown, already a React component */} - <Content - components={{ - code({ children }: any) { - return ( - <CodeSnippet - code={String(children).replace(/\n$/, "")} - initialLines={5} - /> - ); - }, - a: LinkWithIcon, - }} - /> + <Content /> </article> ); }
\ No newline at end of file |
