Skip to content

Commit 5b035f8

Browse files
committed
dev: overrides cards shortcode
1 parent b8924b0 commit 5b035f8

File tree

6 files changed

+30
-23
lines changed

6 files changed

+30
-23
lines changed

docs/content/docs/donate/_index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ If you value it, consider supporting us, we appreciate it! ❤️
1111

1212
You can support us via:
1313

14-
{{< golangci/custom-cards mainClass="support-cards" cols=7 >}}
14+
{{< cards class="support-cards" cols=7 >}}
1515
{{< card link="https://github.com/sponsors/golangci" title="GitHub Sponsors" subtitle="Credit card" image="/images/github-sponsors.svg" >}}
1616
{{< card link="https://opencollective.com/golangci-lint" title="Open Collective" subtitle="Credit card, PayPal, etc." image="/images/open-collective.svg" >}}
1717
{{< card link="https://thanks.dev/u/gh/golangci" title="Thanks.dev" subtitle="Credit card" image="/images/thanks-dev.svg" >}}
18-
{{< /golangci/custom-cards >}}
18+
{{< /cards >}}

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-
{{< golangci/custom-cards mainClass="author-cards" cols=7 >}}
12+
{{< cards class="author-cards" cols=7 >}}
1313
{{< golangci/authors >}}
14-
{{< /golangci/custom-cards >}}
14+
{{< /cards >}}
1515

1616
### Thanks to all contributors
1717

docs/layouts/_partials/golangci/custom-cards.html

Lines changed: 0 additions & 8 deletions
This file was deleted.
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.10.0/layouts/_partials/shortcodes/cards.html */}}
2+
{{- /* This file overrides the details shortcode of the theme */ -}}
3+
4+
{{- $cols := .cols | default 3 -}}
5+
{{- $content := .content -}}
6+
{{- $class := .class | default "hextra-cards" -}}
7+
8+
<div class="{{ $class }} hx:mt-4 hx:gap-4 hx:grid not-prose" style="--hextra-cards-grid-cols: {{ $cols }};">
9+
{{- $content -}}
10+
</div>

docs/layouts/_shortcodes/cards.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{{- /* Modified version of https://github.com/imfing/hextra/blob/v0.10.0/layouts/_shortcodes/cards.html */ -}}
2+
{{- /* This file overrides the cards shortcode of the theme */ -}}
3+
4+
{{- /*
5+
A shortcode for creating cards.
6+
7+
@param {string} cols The number of columns.
8+
@param {string} class The class of the cards.
9+
10+
@example {{< cards cols="3" >}}{{< /cards >}}
11+
*/ -}}
12+
13+
{{- $cols := .Get "cols" | default 3 -}}
14+
{{- $class := .Get "class" | default "hextra-cards" -}}
15+
16+
{{- partial "shortcodes/cards" (dict "cols" $cols "class" $class "content" .Inner) -}}

docs/layouts/_shortcodes/golangci/custom-cards.html

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

0 commit comments

Comments
 (0)