chore: formatting
This commit is contained in:
parent
8af07f8071
commit
72fb1f189b
3 changed files with 20 additions and 9 deletions
|
|
@ -34,7 +34,7 @@ const { Content } = await render(post)
|
|||
<article class="prose dark:prose-invert w-full max-w-3xl overflow-hidden">
|
||||
<div class="flex flex-col gap-2">
|
||||
<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}
|
||||
</p>
|
||||
<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) => (
|
||||
<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>
|
||||
))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,8 +9,14 @@ body {
|
|||
font-family: "JetBrains Mono Variable", monospace;
|
||||
}
|
||||
|
||||
|
||||
@layer base { h1 { font-size: var(--text-2xl); } h2 { font-size: var(--text-xl); }}
|
||||
@layer base {
|
||||
h1 {
|
||||
font-size: var(--text-2xl);
|
||||
}
|
||||
h2 {
|
||||
font-size: var(--text-xl);
|
||||
}
|
||||
}
|
||||
|
||||
code {
|
||||
border-radius: 0.25rem;
|
||||
|
|
@ -28,11 +34,11 @@ code::after {
|
|||
content: none !important;
|
||||
}
|
||||
|
||||
ol, ul {
|
||||
ol,
|
||||
ul {
|
||||
list-style-type: "- ";
|
||||
}
|
||||
|
||||
|
||||
.nav-links,
|
||||
.markdown-link {
|
||||
text-decoration: none;
|
||||
|
|
@ -51,7 +57,7 @@ ol, ul {
|
|||
display: inline-block;
|
||||
}
|
||||
|
||||
.nav-links:hover, .markdown-link:hover {
|
||||
.nav-links:hover,
|
||||
.markdown-link:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,10 @@ export const getPostsByLocale = async (locale: string) => {
|
|||
posts.forEach((post: any) => {
|
||||
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(
|
||||
(a: any, b: any) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf(),
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue