Skip to content

Commit eb9c707

Browse files
Update single.html
1 parent 90173af commit eb9c707

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

layouts/operate/single.html

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,41 +14,43 @@ <h1>
1414
{{ end }}
1515
{{ .Title }}</h1>
1616
{{ with .Params.description }}<p class="text-lg -mt-5 mb-10">{{ . | markdownify }}</p>{{ end }}
17-
{{ if .Params.categories }}
17+
{{ if .Params.categories }}
1818
<div class="post-categories" style="display: table;">
1919
<table style="border-collapse: separate; border-spacing: 0; background-color: #ffffff;">
2020
<thead>
2121
<tr>
22-
{{ $total := len .Params.categories }} <!-- Store the total number of categories -->
23-
{{ range $index, $element := .Params.categories }}
24-
{{ if not (in (slice "docs" "operate" "integrate" "develop") .) }} <!-- Exclude specific categories -->
25-
{{ $displayName := $element }} <!-- Set default display name -->
26-
{{ $color := "#000000" }} <!-- Default color (black) -->
22+
{{ $visibleCategories := slice }}
23+
{{ range .Params.categories }}
24+
{{ if not (in (slice "docs" "operate" "integrate" "develop") .) }}
25+
{{ $visibleCategories = append $visibleCategories . }}
26+
{{ end }}
27+
{{ end }}
28+
{{ range $index, $element := $visibleCategories }}
29+
{{ $displayName := $element }}
30+
{{ $color := "#ffffff" }} <!-- Default background color (white) -->
2731
{{ if eq $element "rs" }}
2832
{{ $displayName = "Redis Enterprise Software" }}
29-
{{ $color = "#DCFF1E" }} <!-- Yellow bullet point for Redis Enterprise Software -->
33+
{{ $color = "#DCFF1E" }} <!-- Yellow background for Redis Enterprise Software -->
3034
{{ else if eq $element "rc" }}
3135
{{ $displayName = "Redis Cloud" }}
32-
{{ $color = "#80DBFF" }} <!-- Blue bullet point for Redis Cloud -->
36+
{{ $color = "#80DBFF" }} <!-- Blue background for Redis Cloud -->
3337
{{ else if eq $element "kubernetes" }}
3438
{{ $displayName = "Redis Enterprise for Kubernetes" }}
35-
{{ $color = "#8A99A0" }} <!-- Light grey bullet point for Kubernetes -->
39+
{{ $color = "#8A99A0" }} <!-- Light grey background for Kubernetes -->
3640
{{ else if eq $element "oss" }}
3741
{{ $displayName = "Redis Source Available" }}
38-
{{ $color = "#C795E3" }} <!-- Purple bullet point for Redis Source Available -->
42+
{{ $color = "#C795E3" }} <!-- Purple background for Redis Source Available -->
3943
{{ else if eq $element "stack" }}
4044
{{ $displayName = "Redis Stack" }}
41-
{{ $color = "#49859C" }} <!-- Medium blue bullet point for Redis Stack -->
45+
{{ $color = "#49859C" }} <!-- Medium blue background for Redis Stack -->
4246
{{ else if eq $element "redisinsight" }}
4347
{{ $displayName = "Redis Insight" }}
44-
{{ $color = "#FD4439" }} <!-- Red bullet point for Redis Insight -->
48+
{{ $color = "#FD4439" }} <!-- Red background for Redis Insight -->
4549
{{ end }}
46-
<th style="border: 1px solid #ccc; padding: 8px; text-align: left; font-weight: normal; {{ if eq $index 0 }}border-top-left-radius: 10px; border-bottom-left-radius: 10px;{{ else if eq $index (sub $total 1) }}border-top-right-radius: 10px; border-bottom-right-radius: 10px;{{ end }}">
47-
<span style="color: {{ $color }}; font-size: 30px;">&#8226;</span> <!-- Even larger colored bullet point -->
50+
<th style="border: 1px solid #ccc; padding: 8px; text-align: left; font-weight: normal; background-color: {{ $color }}; {{ if eq $index 0 }}border-top-left-radius: 10px; border-bottom-left-radius: 10px;{{ end }}{{ if eq $index (sub (len $visibleCategories) 1) }}border-top-right-radius: 10px; border-bottom-right-radius: 10px;{{ end }}">
4851
{{ $displayName }}
4952
</th>
5053
{{ end }}
51-
{{ end }}
5254
</tr>
5355
</thead>
5456
<tbody>
@@ -61,6 +63,7 @@ <h1>
6163

6264

6365

66+
6467
<!-- In-page banner -->
6568
{{ if .Params.bannerText }}
6669
<!-- Banner params are in the current page's front matter -->

0 commit comments

Comments
 (0)