Skip to content

Commit 6a064c7

Browse files
LinksHeader: add flex to desktop view
- Display reverts to `block` on mobile - added `.links-header-item` class to `<a>` children of links header container
1 parent fe41d15 commit 6a064c7

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
lines changed

quartz/components/LinksHeader.tsx

+6-6
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,24 @@ export default (() => {
1010
return (
1111
<div id="links-header-container">
1212
<div id="links-header">
13-
<a href="/guides/">
13+
<a class="links-header-item" href="/guides/">
1414
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-book-open-check"><path d="M8 3H2v15h7c1.7 0 3 1.3 3 3V7c0-2.2-1.8-4-4-4Z"/><path d="m16 12 2 2 4-4"/><path d="M22 6V3h-6c-2.2 0-4 1.8-4 4v14c0-1.7 1.3-3 3-3h7v-2.3"/></svg>
1515
Guides</a>
16-
<a href="/modding-tools/">
16+
<a class="links-header-item" href="/modding-tools/">
1717
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-wrench"><path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"/></svg>
1818
Tools</a>
19-
<a href="https://tes3cs.pages.dev/">
19+
<a class="links-header-item" href="https://tes3cs.pages.dev/">
2020
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-pencil-ruler"><path d="M13 7 8.7 2.7a2.41 2.41 0 0 0-3.4 0L2.7 5.3a2.41 2.41 0 0 0 0 3.4L7 13"/><path d="m8 6 2-2"/><path d="m18 16 2-2"/><path d="m17 11 4.3 4.3c.94.94.94 2.46 0 3.4l-2.6 2.6c-.94.94-2.46.94-3.4 0L11 17"/><path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"/><path d="m15 5 4 4"/></svg>
2121
Construction Set</a>
22-
<a href="/programmers-reference/">
22+
<a class="links-header-item" href="/programmers-reference/">
2323
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file-json"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4"/><path d="M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1"/><path d="M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1"/></svg>
2424
Programmers Reference</a>
2525
{/* <div>
2626
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-globe"><circle cx="12" cy="12" r="10"/><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"/><path d="M2 12h20"/></svg>
27-
<a href="/Projects/">Projects</a>
27+
<a class="links-header-item" href="/Projects/">Projects</a>
2828
</div> */}
2929
{/* commented out 'Projects' as it has no content and its use-case is still dubious */}
30-
<a href="/contributing/">
30+
<a class="links-header-item" href="/contributing/">
3131
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-shield-alert"><path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"/><path d="M12 8v4"/><path d="M12 16h.01"/></svg>
3232
Contributing</a>
3333
</div>

quartz/components/styles/linksHeader.scss

+13-1
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,22 @@ header {
88
#links-header {
99
font-size: 1.2em;
1010
margin: 0 0.2em;
11+
display: flex;
12+
flex-flow: row wrap;
13+
justify-content: flex-start;
14+
align-content: space-between;
1115

1216
svg {
1317
height: 1em;
1418
margin: 0 0.3em 0 0;
1519
vertical-align: middle;
1620
}
1721

18-
a {
22+
a.links-header-item {
1923
display: inline-block;
2024
padding: 10px 15px;
25+
box-sizing: border-box;
26+
width: 20%;
2127
}
2228
}
2329

@@ -29,7 +35,13 @@ header {
2935

3036
@media screen and (max-width: $mobileBreakpoint) {
3137
#links-header {
38+
display: block;
3239
overflow: scroll;
3340
white-space: nowrap;
41+
42+
& a.links-header-item {
43+
box-sizing: unset;
44+
width: unset;
45+
}
3446
}
3547
}

0 commit comments

Comments
 (0)