mirror of
https://github.com/thiloho/thiloho.github.io.git
synced 2025-11-22 02:11:35 +01:00
Compare commits
2 Commits
346390ff73
...
822fc4d0ca
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
822fc4d0ca | ||
|
|
0e576a98d8 |
@@ -4,6 +4,54 @@ import sitemap from "@astrojs/sitemap";
|
|||||||
import rehypeAutolinkHeadings from "rehype-autolink-headings";
|
import rehypeAutolinkHeadings from "rehype-autolink-headings";
|
||||||
import rehypeSlug from "rehype-slug";
|
import rehypeSlug from "rehype-slug";
|
||||||
|
|
||||||
|
type RehypeNode = {
|
||||||
|
type: string;
|
||||||
|
tagName?: string;
|
||||||
|
children?: RehypeNode[];
|
||||||
|
properties?: {
|
||||||
|
[key: string]: unknown;
|
||||||
|
className?: string[];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
type RehypeParent = RehypeNode & {
|
||||||
|
children: RehypeNode[];
|
||||||
|
};
|
||||||
|
|
||||||
|
type RehypeRoot = RehypeParent;
|
||||||
|
|
||||||
|
const rehypeWrapTables = () => {
|
||||||
|
const visit = (node: RehypeNode, parent: RehypeParent | null) => {
|
||||||
|
if (node.type === "element" && node.tagName === "table" && parent) {
|
||||||
|
const wrapper: RehypeNode = {
|
||||||
|
type: "element",
|
||||||
|
tagName: "div",
|
||||||
|
properties: {
|
||||||
|
className: ["overflow-x-auto", "max-w-full"],
|
||||||
|
},
|
||||||
|
children: [node],
|
||||||
|
};
|
||||||
|
|
||||||
|
const index = parent.children.indexOf(node);
|
||||||
|
if (index !== -1) {
|
||||||
|
parent.children[index] = wrapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Array.isArray(node.children)) {
|
||||||
|
for (const child of node.children) {
|
||||||
|
visit(child, node as RehypeParent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return (tree: RehypeRoot) => {
|
||||||
|
visit(tree, null);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
site: "https://thilohohlt.com",
|
site: "https://thilohohlt.com",
|
||||||
|
|
||||||
@@ -27,6 +75,7 @@ export default defineConfig({
|
|||||||
behavior: "wrap",
|
behavior: "wrap",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
rehypeWrapTables,
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -18,8 +18,11 @@ I am a software developer from Germany who is passionate about building high qua
|
|||||||
## Software
|
## Software
|
||||||
|
|
||||||
- [Arch Linux](https://archlinux.org)
|
- [Arch Linux](https://archlinux.org)
|
||||||
- [KDE Plasma](https://kde.org/plasma-desktop)
|
|
||||||
- [Visual Studio Code](https://code.visualstudio.com)
|
|
||||||
- [Firefox Developer Edition](https://www.mozilla.org/en-US/firefox/developer)
|
- [Firefox Developer Edition](https://www.mozilla.org/en-US/firefox/developer)
|
||||||
- [Tuta Mail](https://tuta.com)
|
- [IntelliJ](https://www.jetbrains.com/idea)
|
||||||
|
- [KDE Plasma](https://kde.org/plasma-desktop)
|
||||||
|
- [LocalSend](https://localsend.org)
|
||||||
- [Mullvad VPN](https://mullvad.net)
|
- [Mullvad VPN](https://mullvad.net)
|
||||||
|
- [qBittorrent](https://www.qbittorrent.org)
|
||||||
|
- [Tuta Mail](https://tuta.com)
|
||||||
|
- [Visual Studio Code](https://code.visualstudio.com)
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ const { title, description, pubDate, modDate, slug } = Astro.props;
|
|||||||
<Header {title} {pubDate} {modDate} {slug} />
|
<Header {title} {pubDate} {modDate} {slug} />
|
||||||
<main class="flex-1 bg-white dark:bg-neutral-800">
|
<main class="flex-1 bg-white dark:bg-neutral-800">
|
||||||
<div
|
<div
|
||||||
class={`relative prose prose-neutral dark:prose-invert mx-auto px-4 ${pubDate ? "pt-0" : "pt-8"} pb-16 ${Astro.originPathname === "/" ? "prose-headings:scroll-mt-12" : "prose-headings:scroll-mt-24 lg:prose-headings:scroll-mt-16"} prose-h1:font-bold prose-pre:!bg-neutral-700 prose-a:font-normal prose-a:not-in-prose-headings:text-blue-800 prose-a:not-in-prose-headings:dark:text-blue-300 prose-a:hover:no-underline prose-a:active:bg-neutral-200 prose-a:active:dark:bg-neutral-700 prose-a:in-prose-headings:font-bold prose-a:in-prose-headings:decoration-2 prose-a:in-prose-headings:no-underline prose-a:in-prose-headings:hover:underline`}
|
class={`relative prose prose-neutral dark:prose-invert mx-auto px-4 ${pubDate ? "pt-0" : "pt-8"} pb-16 ${Astro.originPathname === "/" ? "prose-headings:scroll-mt-12" : "prose-headings:scroll-mt-24 lg:prose-headings:scroll-mt-16"} prose-table:text-base prose-h1:font-bold prose-pre:!bg-neutral-700 prose-a:font-normal prose-a:not-in-prose-headings:text-blue-800 prose-a:not-in-prose-headings:dark:text-blue-300 prose-a:hover:no-underline prose-a:active:bg-neutral-200 prose-a:active:dark:bg-neutral-700 prose-a:in-prose-headings:font-bold prose-a:in-prose-headings:decoration-2 prose-a:in-prose-headings:no-underline prose-a:in-prose-headings:hover:underline`}
|
||||||
>
|
>
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -27,6 +27,18 @@
|
|||||||
mark {
|
mark {
|
||||||
@apply bg-neutral-200 text-current dark:bg-neutral-600;
|
@apply bg-neutral-200 text-current dark:bg-neutral-600;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#software + ul {
|
||||||
|
@apply flex flex-wrap gap-4 !p-0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#software + ul > li {
|
||||||
|
@apply !m-0 list-none !p-0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#software + ul > li a {
|
||||||
|
@apply border border-neutral-300 px-2 py-1 dark:border-neutral-600;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Styrene A Font Family */
|
/* Styrene A Font Family */
|
||||||
|
|||||||
Reference in New Issue
Block a user