Skip to content

Commit a50ec4f

Browse files
committed
feat: improve thanks page
1 parent 88952f1 commit a50ec4f

File tree

6 files changed

+53
-33
lines changed

6 files changed

+53
-33
lines changed

docs/assets/css/custom.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,7 @@
88
.hx-line-clamp-3.hextra-card-subtitle {
99
-webkit-line-clamp: 30;
1010
}
11+
12+
.author-cards {
13+
grid-template-columns: repeat(auto-fill, minmax(max(150px, calc((100% - 1rem * 4) / var(--hextra-cards-grid-cols))), 1fr));
14+
}

docs/content/docs/product/thanks.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,17 @@ weight: 1
55

66
## ❤️
77

8-
Thanks to all [contributors](https://github.com/golangci/golangci-lint/graphs/contributors)!
8+
### Thanks to developers and authors of used linters
99

10-
Thanks to developers and authors of used linters:
10+
{{< author-cards cols=7 >}}
11+
{{< authors >}}
12+
{{< /author-cards >}}
1113

12-
{{< thanks >}}
14+
### Thanks to all contributors
15+
16+
[![golangci-lint contributors](https://opencollective.com/golangci-lint/contributors.svg?width=890&button=false&skip=golangcidev,CLAassistant,renovate,fossabot,golangcibot,kortschak,golangci-releaser,dependabot%5Bbot%5D)](https://github.com/golangci/golangci-lint/graphs/contributors)
17+
18+
### Special thanks
1319

1420
Thanks to [alecthomas/gometalinter](https://github.com/alecthomas/gometalinter) for inspiration and amazing work.
1521

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{{/* Modified version of https://github.com/imfing/hextra/blob/v0.9.7/layouts/partials/shortcodes/cards.html */}}
2+
{{- $cols := .cols | default 3 -}}
3+
{{- $content := .content -}}
4+
5+
<div class="author-cards hx-mt-4 hx-gap-4 hx-grid not-prose" style="--hextra-cards-grid-cols: {{ $cols }};">
6+
{{- $content -}}
7+
</div>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{{- /* Modified version of https://github.com/imfing/hextra/blob/v0.9.7/layouts/shortcodes/cards.html */ -}}
2+
{{- /*
3+
Creates a card for each author of a linter/formatter.
4+
5+
@example {{< author-cards cols=7 >}}{{< authors >}}{{< /author-cards >}}
6+
*/ -}}
7+
8+
{{- $cols := .Get "cols" | default 3 -}}
9+
10+
{{- partial "author-cards" (dict "cols" $cols "content" .Inner) -}}

docs/layouts/_shortcodes/authors.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{{- /*
2+
Creates a card for each author of a linter/formatter.
3+
4+
@example {{< authors >}}
5+
*/ -}}
6+
7+
{{- $thanks := index $.Site.Data.thanks -}}
8+
{{- range $thanks }}
9+
10+
{{ $v := slice }}
11+
{{- range .linters -}}
12+
{{- $v = $v | append (printf "<code>%s</code>" .) -}}
13+
{{- end -}}
14+
15+
{{- partial "shortcodes/card" (dict
16+
"page" .Page
17+
"link" .profile
18+
"title" .name
19+
"subtitle" (delimit $v "<br>")
20+
"image" .avatar
21+
)
22+
-}}
23+
{{- end -}}

docs/layouts/_shortcodes/thanks.html

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)