Added 404, Linktree, moved blog to /blog from index, improved markdown frontmatter to accept tags
This commit is contained in:
@@ -1,4 +1,12 @@
|
||||
---
|
||||
import type { Props as AstroProps } from 'astro';
|
||||
|
||||
interface Props {
|
||||
tags?: string[];
|
||||
}
|
||||
const { tags = [] } = Astro.props;
|
||||
const selectedTag = Astro.url.searchParams.get('tag');
|
||||
|
||||
const links = [
|
||||
{ label: "github", href: "https://github.com/DerGrumpf", icon: "/github.png" },
|
||||
{ label: "gitea", href: "https://git.cyperpunk.de", icon: "/git.png" },
|
||||
@@ -30,13 +38,15 @@ const links = [
|
||||
</div>
|
||||
|
||||
<div id="sidebar-topics" class="flex flex-col gap-2">
|
||||
<span class="section-label text-ctp-overlay text-xs uppercase tracking-widest">topics</span>
|
||||
<div id="tags" class="flex flex-wrap gap-1">
|
||||
<span class="tag text-xs px-2 py-0.5 rounded-full bg-ctp-surface text-ctp-subtext hover:text-ctp-accent hover:bg-ctp-overlay cursor-pointer transition-colors">Blog</span>
|
||||
<span class="tag text-xs px-2 py-0.5 rounded-full bg-ctp-surface text-ctp-subtext hover:text-ctp-accent hover:bg-ctp-overlay cursor-pointer transition-colors">Git Projects</span>
|
||||
<span class="tag text-xs px-2 py-0.5 rounded-full bg-ctp-surface text-ctp-subtext hover:text-ctp-accent hover:bg-ctp-overlay cursor-pointer transition-colors">Matrix</span>
|
||||
</div>
|
||||
<span class="section-label text-ctp-overlay text-xs uppercase tracking-widest">topics</span>
|
||||
<div id="tags" class="flex flex-wrap gap-1">
|
||||
{tags.map((tag) => (
|
||||
<a href={`/?tag=${tag}`} class={`tag text-xs px-2 py-0.5 rounded-full cursor-pointer transition-colors ${selectedTag === tag ? 'bg-ctp-accent text-ctp-base' : 'bg-ctp-surface text-ctp-subtext hover:text-ctp-accent'}`}>
|
||||
{tag}
|
||||
</a>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="theme-switcher" class="flex gap-2 mt-auto pt-4 border-t border-ctp-surface justify-center">
|
||||
<button data-flavor="mocha" class="theme-dot w-4 h-4 rounded-full bg-[#cba6f7] hover:scale-125 transition-transform" title="Mocha"></button>
|
||||
|
||||
Reference in New Issue
Block a user