Skip to content

Commit 5ae0148

Browse files
Feat: Move tags from beside to below page listings
- moved tags from being displayed in right-hand grid column to instead be displayed below each page listing - put `{description}` inside `<p>` tags for HTML semantics - enabled tags to be displayed in page listings on mobile
1 parent 8a8d54f commit 5ae0148

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed

quartz/components/PageList.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,10 @@ export const PageList: QuartzComponent = ({ cfg, fileData, allFiles, limit, sort
7070
{title}
7171
</a>
7272
</h3>
73-
{description}
74-
</div>
75-
<ul class="tags">
73+
<p>
74+
{description}
75+
</p>
76+
<ul class="tags">
7677
{tags.map((tag) => (
7778
<li>
7879
<a
@@ -84,6 +85,7 @@ export const PageList: QuartzComponent = ({ cfg, fileData, allFiles, limit, sort
8485
</li>
8586
))}
8687
</ul>
88+
</div>
8789
</div>
8890
</li>
8991
)

quartz/components/styles/listPage.scss

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ li.section-li {
1111

1212
& > .section {
1313
display: grid;
14-
grid-template-columns: fit-content(8em) 3fr 1fr;
14+
grid-template-columns: fit-content(8em) 3fr;
1515

16-
@media all and (max-width: $mobileBreakpoint) {
17-
& > .tags {
18-
display: none;
19-
}
20-
}
16+
// @media all and (max-width: $mobileBreakpoint) {
17+
// & > .tags {
18+
// display: none;
19+
// }
20+
// }
2121

2222
& > .desc > h3 > a {
2323
background-color: transparent;
@@ -27,6 +27,14 @@ li.section-li {
2727
margin: 0 1em 0 0;
2828
opacity: 0.6;
2929
}
30+
31+
& > .desc > ul.tags {
32+
margin: .5rem 0;
33+
}
34+
35+
& > .desc > p {
36+
margin: 0
37+
}
3038
}
3139
}
3240

0 commit comments

Comments
 (0)