diff options
| author | schererleander <leander@schererleander.de> | 2025-06-25 16:32:45 +0200 |
|---|---|---|
| committer | schererleander <leander@schererleander.de> | 2025-06-25 16:32:45 +0200 |
| commit | afb4ced1b8b96d9ec12e454aad380e6f59250e86 (patch) | |
| tree | 6305845cd96808f253c9deced98bc5d61bf8df44 | |
| parent | a865055c1f7c26ccafb78b27b069d74647067472 (diff) | |
remove link component
| -rw-r--r-- | src/components/ExternalLink.tsx | 3 | ||||
| -rw-r--r-- | src/components/Navbar.tsx | 3 | ||||
| -rw-r--r-- | src/index.css | 5 | ||||
| -rw-r--r-- | src/pages/Blog.tsx | 4 | ||||
| -rw-r--r-- | src/pages/Homelab.tsx | 8 | ||||
| -rw-r--r-- | src/pages/Post.tsx | 4 |
6 files changed, 13 insertions, 14 deletions
diff --git a/src/components/ExternalLink.tsx b/src/components/ExternalLink.tsx deleted file mode 100644 index 22ed7a1..0000000 --- a/src/components/ExternalLink.tsx +++ /dev/null @@ -1,3 +0,0 @@ -export default function ExternalLinkIcon() { - return <svg className="no-global w-4 h-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2}><path strokeLinecap="round" strokeLinejoin="round" d="M18 13v6a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h6M15 6h4m0 0v4m0-4L10 15" /></svg>; -}
\ No newline at end of file diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx index fd1b415..eb325fd 100644 --- a/src/components/Navbar.tsx +++ b/src/components/Navbar.tsx @@ -1,4 +1,3 @@ -import { Link } from "react-router-dom"; import ThemeToggle from "./ThemeToggle"; export default function Navbar() { @@ -15,7 +14,7 @@ export default function Navbar() { <div className="max-w-2xl mx-auto flex px-4 py-4 text-sm"> <div className="flex gap-6 items-center"> {navItems.map(({ label, href }) => ( - <Link className="hover:underline" key={label} to={href}>{label}</Link> + <a className="hover:underline" key={label} href={href}>{label}</a> ))} <ThemeToggle /> </div> diff --git a/src/index.css b/src/index.css index b32d17c..a25df62 100644 --- a/src/index.css +++ b/src/index.css @@ -10,6 +10,11 @@ h1 { @apply text-4xl font-bold mb-4 dark:text-gray-200; } h2 { @apply text-2xl font-semibold mb-2 dark:text-gray-200; } h3 { @apply text-xl font-semibold dark:text-gray-200; } + section > * > a:not(.block):link { @apply underline text-blue-500; } + section > * > a:not(.block):visited { @apply underline text-purple-500; } + pre { + @apply whitespace-pre overflow-x-auto max-w-full max-h-80 rounded-lg border p-2 my-2 border-neutral-300 dark:border-neutral-800 bg-neutral-100 dark:bg-neutral-900; + } * { transition: background-color 0.25s, color 0.25s, border-color 0.25s; diff --git a/src/pages/Blog.tsx b/src/pages/Blog.tsx index 1b20e89..27a21c4 100644 --- a/src/pages/Blog.tsx +++ b/src/pages/Blog.tsx @@ -29,13 +29,13 @@ export default function Blog() { <h1 className="text-4xl font-bold mb-8">Blog</h1> {posts.map((post) => ( - <Link key={post.slug} to={`/blog/${post.slug}`} className="block"> + <a key={post.slug} href={`/blog/${post.slug}`} className="block"> <CardLink title={post.title} body={post.excerpt} imgSrc={post.cover} /> - </Link> + </a> ))} </section> ); diff --git a/src/pages/Homelab.tsx b/src/pages/Homelab.tsx index 39693d7..9371ff2 100644 --- a/src/pages/Homelab.tsx +++ b/src/pages/Homelab.tsx @@ -1,5 +1,3 @@ -import LinkWithIcon from '../components/LinkWithIcon'; - const nasServices = [ "Jellyfin: Media library", "Kavita: Ebooks and manga", @@ -18,7 +16,7 @@ export default function HomelabPage() { <h2>NAS</h2> <img src="/images/nas.webp" alt="NAS" className="mx-auto mb-4 w-64 rounded-lg shadow" /> <p className="mb-4 leading-relaxed"> - My custom-built NAS running <strong>Unraid</strong> hosts the following services. See <LinkWithIcon href='/gear'>gear</LinkWithIcon> for specs. + My custom-built NAS running <strong>Unraid</strong> hosts the following services. See <a href='/gear'>gear</a> for specs. </p> <ul className="list-disc pl-6 space-y-1"> {nasServices.map((svc) => ( @@ -34,14 +32,14 @@ export default function HomelabPage() { <h2>Raspberry Pi</h2> <img src="/images/pi.webp" alt="Raspberry Pi 5" className="mx-auto mb-4 w-64 rounded-lg shadow" /> <p className="mb-4 leading-relaxed"> - Raspberry Pi 5 (8GB) running <LinkWithIcon href='https://homebridge.io'>Homebridge</LinkWithIcon> to integrate non-HomeKit devices. It also serves as a precision NTP server using a <LinkWithIcon href='https://store.uputronics.com/products/raspberry-pi-gps-rtc-expansion-board' target='_blank'>Uputronics GPS module</LinkWithIcon>. + Raspberry Pi 5 (8GB) running <a href='https://homebridge.io'>Homebridge</a> to integrate non-HomeKit devices. It also serves as a precision NTP server using a <a href='https://store.uputronics.com/products/raspberry-pi-gps-rtc-expansion-board' target='_blank'>Uputronics GPS module</a>. </p> </section> <section> <h2>VPS</h2> <p className="mb-4 leading-relaxed"> - Cheap Ionos VPS running nixos via <LinkWithIcon href='https://github.com/elitak/nixos-infect'>nixos-infect</LinkWithIcon> for services exposed to the internet. Mainly using it for hosting this website and <LinkWithIcon href='https://nextcloud.com'>Nextcloud</LinkWithIcon>. + Cheap Ionos VPS running nixos via <a href='https://github.com/elitak/nixos-infect'>nixos-infect</a> for services exposed to the internet. Mainly using it for hosting this website and <a href='https://nextcloud.com'>Nextcloud</a>. </p> </section> </> diff --git a/src/pages/Post.tsx b/src/pages/Post.tsx index 67f8959..f23b5b4 100644 --- a/src/pages/Post.tsx +++ b/src/pages/Post.tsx @@ -27,9 +27,9 @@ 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 hover:underline"> + <a href="/blog" className="no-underline hover:underline"> ← Back - </Link> + </a> {meta.cover && ( <img |
