Skip to content

Commit d8a6278

Browse files
committed
project h2, p, li vertical margins
1 parent 7ef0736 commit d8a6278

File tree

6 files changed

+18
-7
lines changed

6 files changed

+18
-7
lines changed

docs/working-notes/todo4.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ semantic release, conventional commits
5353
git checkout feat/tailwind4-v2
5454
----------
5555
astro markdown link in new tab
56+
mdx not formatting, prettierignore, breaks them
5657
```
5758

5859

src/content/project/2024/12-09-hackernews-new-jobs/index.mdx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,8 @@ Evaluate the potential of the idea and the level of interest for a website of th
5151
## Links
5252

5353

54-
**HackerNews ShowHN thread:** <Link href="https://news.ycombinator.com/item?id=42373936" variant="link-markdown" target="_blank" title="HackerNews ShowHN thread" />
55-
56-
**Demo:** <Link href="https://hackernews-new-jobs.arm1.nemanjamitic.com" variant="link-markdown" target="_blank" title="HackerNews new jobs demo" />
57-
58-
**Repository:** <Link href="https://github.com/nemanjam/hn-new-jobs" variant="link-markdown" target="_blank" title="HackerNews new jobs repository" />
54+
- **HackerNews:** <Link href="https://news.ycombinator.com/item?id=42373936" variant="link-markdown" target="_blank" title="HackerNews ShowHN thread" />
55+
- **Demo:** <Link href="https://hackernews-new-jobs.arm1.nemanjamitic.com" variant="link-markdown" target="_blank" title="HackerNews new jobs demo" />
56+
- **Repository:** <Link href="https://github.com/nemanjam/hn-new-jobs" variant="link-markdown" target="_blank" title="HackerNews new jobs repository" />
5957

6058

src/layouts/Project.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const props = Astro.props;
1111
---
1212

1313
<Centered {...props}>
14-
<article class="my-prose">
14+
<article class="my-prose my-prose-project">
1515
<slot />
1616
</article>
1717
</Centered>

src/pages/projects/[slug].astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,5 @@ const { Content } = await render(Astro.props);
4444

4545
<ProjectLayout {metadata}>
4646
<Content />
47-
<Share {...shareProps} />
47+
<Share {...shareProps} class="mt-4 md:mt-6" />
4848
</ProjectLayout>

src/styles/base/index.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@import './base.css';
22
@import './my-prose.css';
3+
@import './my-prose-project.css';
34
/* after, for override */
45
@import './tags.css';

src/styles/base/my-prose-project.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/* smaller margins for Project */
2+
3+
@layer base {
4+
.my-prose-project:not(:where([class~='not-prose'], [class~='not-prose'] *)) {
5+
/* h2 vertical margin same as default p */
6+
@apply prose-h2:my-5 md:prose-h2:my-6;
7+
8+
/* default line-height: 1.5; is enough */
9+
@apply prose-p:my-0 prose-li:my-0;
10+
}
11+
}

0 commit comments

Comments
 (0)