Skip to content

Commit 8c86fdf

Browse files
authored
docs: dedicated donation page (#5998)
1 parent 22f5bfc commit 8c86fdf

File tree

13 files changed

+79
-21
lines changed

13 files changed

+79
-21
lines changed

docs/assets/css/custom.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@
1313
grid-template-columns: repeat(auto-fill, minmax(max(150px, calc((100% - 1rem * 4) / var(--hextra-cards-grid-cols))), 1fr));
1414
}
1515

16+
.support-cards {
17+
grid-template-columns: repeat(auto-fill, minmax(max(200px, calc((100% - 1rem * 4) / var(--hextra-cards-grid-cols))), 1fr));
18+
}
19+
20+
.support-cards .hextra-card-image {
21+
margin: 2rem;
22+
}
23+
1624
.gl-hidden {
1725
display: none;
1826
}

docs/content/docs/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Golangci-lint is a free and open-source project built by volunteers.
3333
If you value it, consider supporting us, we appreciate it!
3434

3535
<div class="hx-mt-6 hx-mb-6">
36-
{{< hextra/hero-button text="Donate ❤️" link="https://donate.golangci.org" >}}
36+
{{< hextra/hero-button text="Donate ❤️" link="/docs/donate" >}}
3737
</div>
3838

3939
## Contributors

docs/content/docs/donate/_index.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: Support Us
3+
weight: 8
4+
aliases:
5+
- /donate/
6+
---
7+
8+
Golangci-lint is a free and open-source project built by volunteers.
9+
10+
If you value it, consider supporting us, we appreciate it! ❤️
11+
12+
You can support us via:
13+
14+
{{< custom-cards mainClass="support-cards" cols=7 >}}
15+
{{< card link="https://github.com/sponsors/golangci" title="GitHub Sponsors" subtitle="Credit card" image="/images/github-sponsors.svg" >}}
16+
{{< card link="https://opencollective.com/golangci-lint" title="Open Collective" subtitle="Credit card, PayPal, etc." image="/images/open-collective.svg" >}}
17+
{{< card link="https://thanks.dev/u/gh/golangci" title="Thanks.dev" subtitle="Credit card" image="/images/thanks-dev.svg" >}}
18+
{{< /custom-cards >}}

docs/content/docs/product/changelog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Follow the news and releases on [Mastodon](https://fosstodon.org/@golangcilint)
1313
If you value it, consider supporting us, we appreciate it!
1414

1515
<div class="hx-mt-6 hx-mb-6">
16-
{{< hextra/hero-button text="Donate ❤️" link="https://donate.golangci.org" >}}
16+
{{< hextra/hero-button text="Donate ❤️" link="/docs/donate" >}}
1717
</div>
1818

1919
{{% embed file=".tmp/raw_changelog.tmp" %}}

docs/content/docs/product/thanks.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ aliases:
99

1010
### Thanks to developers and authors of used linters
1111

12-
{{< author-cards cols=7 >}}
12+
{{< custom-cards mainClass="author-cards" cols=7 >}}
1313
{{< authors >}}
14-
{{< /author-cards >}}
14+
{{< /custom-cards >}}
1515

1616
### Thanks to all contributors
1717

docs/data/icons.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
heart-red: <svg xmlns="http://www.w3.org/2000/svg" color="red" fill="red" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z"/></svg>

docs/hugo.yaml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,11 @@ menu:
4242
pageRef: /docs
4343
weight: 1
4444
- identifier: donate
45-
name: "Donate"
46-
url: "https://donate.golangci.org"
45+
name: "Support us"
46+
pageRef: /docs/donate/
4747
weight: 2
4848
params:
49-
icon: heart
50-
color: green
49+
icon: "heart-red"
5150
- identifier: linters
5251
name: Linters
5352
pageRef: /docs/linters/
@@ -65,10 +64,6 @@ menu:
6564
params:
6665
icon: github
6766
sidebar:
68-
- identifier: donate
69-
name: "Support Us"
70-
url: "https://donate.golangci.org"
71-
weight: 1
7267
- identifier: more
7368
name: More
7469
params:

docs/layouts/_partials/author-cards.html

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
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+
{{- $mainClass := .mainClass | default "hextra-cards" -}}
5+
6+
<div class="{{$mainClass}} hx-mt-4 hx-gap-4 hx-grid not-prose" style="--hextra-cards-grid-cols: {{ $cols }};">
7+
{{- $content -}}
8+
</div>

docs/layouts/_shortcodes/author-cards.html renamed to docs/layouts/_shortcodes/custom-cards.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
{{- /*
33
Creates a card for each author of a linter/formatter.
44

5-
@example {{< author-cards cols=7 >}}{{< authors >}}{{< /author-cards >}}
5+
@example {{< custom-cards cols=7 >}}{{< authors >}}{{< /custom-cards >}}
66
*/ -}}
77

88
{{- $cols := .Get "cols" | default 3 -}}
9+
{{- $mainClass := .Get "mainClass" | default "hextra-cards" -}}
910

10-
{{- partial "author-cards" (dict "cols" $cols "content" .Inner) -}}
11+
{{- partial "custom-cards" (dict "cols" $cols "mainClass" $mainClass "content" .Inner) -}}

0 commit comments

Comments
 (0)