Skip to content

Commit 63b4b52

Browse files
committed
docs: better render of image cards
1 parent 0cd7324 commit 63b4b52

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

docs/content/docs/welcome/install.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,10 @@ and it can be much faster than the simple binary installation.
2626
Also, the action creates GitHub annotations for found issues (you don't need to dig into build log to see found by golangci-lint issues).
2727

2828
{{< cards cols=2 >}}
29-
{{< card subtitle="Console Output" image="/images/colored-line-number.png" >}}
30-
{{< card subtitle="Annotations" image="/images/annotations.png" >}}
29+
{{< image-card src="/images/colored-line-number.png" title="Console Output" >}}
30+
{{< image-card src="/images/annotations.png" title="Annotations" >}}
3131
{{< /cards >}}
3232

33-
3433
### GitLab CI
3534

3635
GitLab provides a [guide for integrating golangci-lint into the Code Quality widget](https://docs.gitlab.com/ci/testing/code_quality/#golangci-lint).
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{{- /*
2+
Creates a card for an image.
3+
4+
@param {string} src The path to the image.
5+
@param {string} title The title text for the image.
6+
7+
@example {{< image-card src="path/to/image.png" title="Image description" >}}
8+
*/ -}}
9+
10+
{{- $src := .Get "src" -}}
11+
{{- $title := .Get "title" -}}
12+
13+
<div class="hextra-card hx-group hx-flex hx-flex-col hx-justify-start hx-overflow-hidden">
14+
<img class="hextra-card-image" src="{{ $src }}" alt="{{ $title }}" title="{{ $title }}"/>
15+
</div>

0 commit comments

Comments
 (0)