Skip to content

Commit 83ee630

Browse files
committed
Expandable news section
Only show the most recent news with the older news collapsed in a <details> element.
1 parent a79b8df commit 83ee630

File tree

3 files changed

+25
-8
lines changed

3 files changed

+25
-8
lines changed

content/_index.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ bzip2-rs crate which allows for static linking when not using the
6262

6363
This release also contains a few more bugfixes to `stg import`.
6464

65+
[v2.3.2]: https://github.com/stacked-git/stgit/releases/tag/v2.3.2
66+
[v2.3.1]: https://github.com/stacked-git/stgit/releases/tag/v2.3.1
67+
[v2.3.0]: https://github.com/stacked-git/stgit/releases/tag/v2.3.0
68+
69+
{{< details "More StGit News..." >}}
6570
### 2023-05-15: [StGit v2.2.4][v2.2.4] has been released.
6671

6772
StGit regained the ability to upgrade from stacks created by very old
@@ -249,9 +254,6 @@ See the [extension in the VSCode marketplace][marketplace] or checkout
249254

250255
[stgit-at-work2]: https://soap.coffee/~lthms/opinions/StackedGit2.html
251256
[stgit-at-work]: https://soap.coffee/~lthms/opinions/StackedGit.html
252-
[v2.3.2]: https://github.com/stacked-git/stgit/releases/tag/v2.3.2
253-
[v2.3.1]: https://github.com/stacked-git/stgit/releases/tag/v2.3.1
254-
[v2.3.0]: https://github.com/stacked-git/stgit/releases/tag/v2.3.0
255257
[v2.2.4]: https://github.com/stacked-git/stgit/releases/tag/v2.2.4
256258
[v2.2.3]: https://github.com/stacked-git/stgit/releases/tag/v2.2.3
257259
[v2.2.2]: https://github.com/stacked-git/stgit/releases/tag/v2.2.2
@@ -267,6 +269,8 @@ See the [extension in the VSCode marketplace][marketplace] or checkout
267269
[libgit2]: https://libgit2.org/
268270
[gitoxide]: https://github.com/Byron/gitoxide
269271

272+
{{< /details >}}
273+
270274
## Why Stacked Git?
271275

272276
The *stack of patches* model is a natural way to maintain a clean Git

layouts/shortcodes/details.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<details>
2+
<summary>{{ (.Get 0) | markdownify }}</summary>
3+
{{ .Inner | markdownify }}
4+
</details>

static/css/stgit.css

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,22 @@ h2 { font-size: var(--s3); }
123123
h3 { font-size: var(--s2); }
124124
h4 { font-size: var(--s1); }
125125

126-
main > h2 {
126+
main > details > summary {
127+
font-size: var(--s2);
128+
color: var(--color-link);
129+
}
130+
131+
main > details > summary::marker {
132+
color: var(--color-darkish);
133+
}
134+
135+
main h2 {
127136
background: var(--color-lightish);
128137
padding-top: 0.5em;
129138
padding-bottom: 0.25em;
130139
padding-left: 0.25em;
131140
}
132-
main > h3 {
141+
main h3 {
133142
text-decoration: underline;
134143
}
135144

@@ -138,8 +147,8 @@ aside > ol,
138147
aside > ul,
139148
blockquote > ol,
140149
blockquote > ul,
141-
main > ol,
142-
main > ul {
150+
main ol,
151+
main ul {
143152
padding-left: 2em;
144153
}
145154

@@ -148,7 +157,7 @@ ul > li > ul {
148157
padding-left: 2em;
149158
}
150159

151-
main > * + * {
160+
main * + * {
152161
margin-top: var(--s3);
153162
}
154163

0 commit comments

Comments
 (0)