Skip to content

Commit e704fec

Browse files
committed
Improve Article, ArticleCard and SideNav
1 parent 24da58c commit e704fec

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

src/lib/components/blog/Article.svelte

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,17 @@
1616
</script>
1717

1818
<div class={twMerge('flex flex-col space-y-4', className)} {...restProps}>
19-
<div class="flex items-center space-x-4">
20-
<p class=" text-foreground text-2xl font-bold">
19+
<div class="flex items-baseline space-x-4">
20+
<p class="text-foreground grow text-2xl font-bold">
2121
{article.title}
2222
</p>
23+
<span class="text-muted-foreground hidden text-sm sm:block">
24+
{article.date.toLocaleDateString()}
25+
</span>
2326
</div>
27+
<span class="text-muted-foreground block text-sm sm:hidden">
28+
{article.date.toLocaleDateString()}
29+
</span>
2430

2531
{#if children}
2632
{@render children()}

src/lib/components/blog/ArticleCard.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
></Card.Title
2222
>
2323
{#if article.tags != undefined}
24-
<div class="mt-1 space-x-1">
24+
<div class="mt-1 flex flex-wrap space-x-1">
2525
{#each article.tags as tag}
26-
<span class="text-muted-foreground bg-muted rounded-md px-1 py-0.5 text-xs">
26+
<span class="text-muted-foreground bg-muted mb-1 rounded-md px-1 py-0.5 text-xs">
2727
{tag}
2828
</span>
2929
{/each}

src/lib/components/shared/SideNav.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<li><NavAnchor {onclick} fuzzy href="/projects/other">Other</NavAnchor></li>
2525
</ul>
2626
</li>
27-
<li><NavAnchor {onclick} href="/blog">Blog</NavAnchor></li>
28-
<li><NavAnchor {onclick} href="/hobbies">Hobbies</NavAnchor></li>
27+
<li><NavAnchor {onclick} fuzzy href="/blog">Blog</NavAnchor></li>
28+
<li><NavAnchor {onclick} fuzzy href="/hobbies">Hobbies</NavAnchor></li>
2929
</ul>
3030
</div>

0 commit comments

Comments
 (0)