chore: formatting

This commit is contained in:
Lio 2025-12-19 13:31:46 +01:00
parent 8af07f8071
commit 72fb1f189b
3 changed files with 20 additions and 9 deletions

View file

@ -34,7 +34,7 @@ const { Content } = await render(post)
<article class="prose dark:prose-invert w-full max-w-3xl overflow-hidden"> <article class="prose dark:prose-invert w-full max-w-3xl overflow-hidden">
<div class="flex flex-col gap-2"> <div class="flex flex-col gap-2">
<h2 class="my-0! text-3xl font-semibold">{post.data.title}</h2> <h2 class="my-0! text-3xl font-semibold">{post.data.title}</h2>
<p class="my-0! text-md text-gray-700 dark:text-white/80"> <p class="text-md my-0! text-gray-700 dark:text-white/80">
{post.data.description} {post.data.description}
</p> </p>
<div class="text-sm text-gray-500 dark:text-white/80"> <div class="text-sm text-gray-500 dark:text-white/80">
@ -50,7 +50,9 @@ const { Content } = await render(post)
{ {
post.data.tags.map((tag: string) => ( post.data.tags.map((tag: string) => (
<a href={`/${lang}/tags/${tag}`} class="no-underline"> <a href={`/${lang}/tags/${tag}`} class="no-underline">
<p class="inline-block hover:scale-105 bg-amber-500 dark:bg-amber-400 dark:text-black p-1">#{tag}</p> <p class="inline-block bg-amber-500 p-1 hover:scale-105 dark:bg-amber-400 dark:text-black">
#{tag}
</p>
</a> </a>
)) ))
} }

View file

@ -9,8 +9,14 @@ body {
font-family: "JetBrains Mono Variable", monospace; font-family: "JetBrains Mono Variable", monospace;
} }
@layer base {
@layer base { h1 { font-size: var(--text-2xl); } h2 { font-size: var(--text-xl); }} h1 {
font-size: var(--text-2xl);
}
h2 {
font-size: var(--text-xl);
}
}
code { code {
border-radius: 0.25rem; border-radius: 0.25rem;
@ -28,11 +34,11 @@ code::after {
content: none !important; content: none !important;
} }
ol, ul { ol,
ul {
list-style-type: "- "; list-style-type: "- ";
} }
.nav-links, .nav-links,
.markdown-link { .markdown-link {
text-decoration: none; text-decoration: none;
@ -51,7 +57,7 @@ ol, ul {
display: inline-block; display: inline-block;
} }
.nav-links:hover, .markdown-link:hover { .nav-links:hover,
.markdown-link:hover {
text-decoration: underline; text-decoration: underline;
} }

View file

@ -38,7 +38,10 @@ export const getPostsByLocale = async (locale: string) => {
posts.forEach((post: any) => { posts.forEach((post: any) => {
post.data.lang = locale post.data.lang = locale
}) })
const filtered = import.meta.env.MODE === 'development'? posts : posts.filter((p) => p.data.published) const filtered =
import.meta.env.MODE === "development"
? posts
: posts.filter((p) => p.data.published)
return filtered.sort( return filtered.sort(
(a: any, b: any) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf(), (a: any, b: any) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf(),
) )