Skip to content

Commit e44d589

Browse files
committed
styling adjustments
1 parent 51ddf7d commit e44d589

7 files changed

Lines changed: 42 additions & 14 deletions

File tree

src/components/Footer.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import config from "../config";
55
<footer class="flex flex-col gap-5 py-10 mx-auto max-w-3xl w-full">
66
<!-- TODO: move into a fixed FAB button, outside of footer -->
77
<div class="text-right">
8-
<button onclick="scrollToTop()">Back to top</button>
8+
<button class="hover:opacity-80 transition-opacity" onclick="scrollToTop()">Back to top</button>
99
</div>
1010
<div class="text-center">
1111
&copy; {new Date().getFullYear()}

src/components/LandingPage.astro

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ const cards = [
2121
},
2222
},
2323
{
24-
name: "value-log",
25-
repo: "https://github.com/fjall-rs/value-log",
26-
description: "Log-structured value log for key-value separated storage",
24+
name: "sfa",
25+
repo: "https://github.com/fjall-rs/sfa",
26+
description: "Minimal, flat file archive encoding/decoding library",
2727
license: "MIT / Apache",
2828
colors: {
29-
title: "text-pink-700 dark:text-pink-300",
30-
card: "hover:border-pink-500 hover:bg-pink-500",
29+
title: "text-amber-700 dark:text-amber-300",
30+
card: "hover:border-amber-500 hover:bg-amber-500",
3131
},
3232
},
3333
{
@@ -57,9 +57,9 @@ const cards = [
5757
class={`${card.colors.card} flex flex-col gap-2 rounded-lg border border-gray-500 border-opacity-30 bg-white bg-opacity-5 p-3 transition-all hover:bg-opacity-5`}
5858
>
5959
<div class="flex items-center justify-between gap-2">
60-
<h3 class={`${card.colors.title} text-xl font-medium`}>{card.name}</h3>
60+
<h3 class={`${card.colors.title} font-medium`}>{card.name}</h3>
6161
</div>
62-
<div class="opacity-75">{card.description}</div>
62+
<div class="opacity-75 text-sm">{card.description}</div>
6363
<div class="grow" />
6464
<div class="flex">
6565
<div class="rounded bg-black bg-opacity-20 px-2 py-1 text-xs font-semibold">
@@ -73,7 +73,7 @@ const cards = [
7373

7474
<h2 class="mb-3 italic">Sponsors</h2>
7575
<div class="flex flex-wrap gap-8">
76-
<a href="https://sqlsync.dev" target="_blank">
76+
<a class="hover:opacity-80 transition-opacity" href="https://sqlsync.dev" target="_blank">
7777
<img class="max-w-80 dark:hidden" src="/logos/orbitinghail.svg" alt="Orbitinghail" />
7878
<img
7979
class="max-w-80 hidden dark:block"

src/components/PostHeader.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const { title, publishedAt, author, readingMinutes, tags, image } = Astro.props;
4444
)
4545
}
4646
</div>
47-
{tags.length > 0 && <TagList transition items={tags} />}
47+
{tags.length > 0 && tags.length <= config.post.maxTags && <TagList transition items={tags} />}
4848
{
4949
image && (
5050
<img

src/config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ export default {
5252
/// Show reading progress bar on top of page
5353
showReadingProgress: true,
5454

55+
/// Hide the tags when there are too many tags
56+
///
57+
/// Will always be shown in the footer
58+
maxTags: 10,
59+
5560
/// Shows a reading time estimate on top of every blog post
5661
readingTime: {
5762
enabled: true,

src/content/blog/2024-08-09_block-format.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ tags:
1111
published_at: 2024-08-09T18:01:53.233Z
1212
last_modified_at: 2024-08-11T23:30:53.233Z
1313
image: /media/thumbs/pantheon.jpg
14+
outdated: true
1415
---
1516

1617
[Fjall](https://github.com/fjall-rs/fjall) is an LSM-tree based storage engine written in Rust.

src/content/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const blogCollection = defineCollection({
1818
draft: z.boolean().optional(),
1919
featured: z.boolean().optional(),
2020
image: z.string().optional(),
21+
outdated: z.boolean().optional(),
2122
})
2223
.strict(),
2324
});

src/pages/post/[...slug]/index.astro

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ const readingMinutes = Math.max(
3434
<!-- Global -->
3535
{config.post.showReadingProgress && <ReadingProgressBar />}
3636

37+
{
38+
post.data.outdated && (
39+
<div class="border border-amber-300 dark:border-amber-800 text-amber-700 dark:text-amber-200 p-5 mb-10 bg-amber-100 dark:bg-amber-500/30 rounded-xl">
40+
This post is very outdated.
41+
</div>
42+
)
43+
}
44+
3745
<!-- Post header -->
3846
<PostHeader
3947
title={post.data.title}
@@ -45,7 +53,9 @@ const readingMinutes = Math.max(
4553
/>
4654

4755
<!-- Content -->
48-
<article class="my-10 w-full !max-w-full prose dark:prose-invert text-justify dark:prose-gray">
56+
<article
57+
class="[&_p]:dark:text-gray-300/90 my-10 w-full !max-w-full prose dark:prose-invert text-justify dark:prose-gray"
58+
>
4959
<Content />
5060
<hr />
5161
<ArticleAddendum />
@@ -74,6 +84,15 @@ const readingMinutes = Math.max(
7484
overflow-x: hidden;
7585
}
7686

87+
article h1,
88+
h2,
89+
h3,
90+
h4,
91+
h5,
92+
h6 {
93+
text-align: left;
94+
}
95+
7796
article a {
7897
color: rgb(7 89 133) !important;
7998
text-decoration: underline dotted !important;
@@ -102,8 +121,8 @@ const readingMinutes = Math.max(
102121
}
103122

104123
p code {
105-
border-radius: 4px;
106-
padding: 2px 4px;
124+
border-radius: 5px;
125+
padding: 3px 5px;
107126
white-space: normal !important;
108127
}
109128

@@ -112,7 +131,7 @@ const readingMinutes = Math.max(
112131
}
113132

114133
.dark p code {
115-
color: rgb(193, 228, 248) !important;
134+
color: rgb(150, 228, 255) !important;
116135
background: rgba(7, 89, 133, 0.33) !important;
117136
}
118137

@@ -139,5 +158,7 @@ const readingMinutes = Math.max(
139158
font-style: var(--shiki-dark-font-style) !important;
140159
font-weight: var(--shiki-dark-font-weight) !important;
141160
text-decoration: var(--shiki-dark-text-decoration) !important;
161+
font-size: 14px;
162+
line-height: 25px;
142163
}
143164
</style>

0 commit comments

Comments
 (0)