|
14 | 14 | {{ end }}
|
15 | 15 | {{ .Title }}</h1>
|
16 | 16 | {{ with .Params.description }}<p class="text-lg -mt-5 mb-10">{{ . | markdownify }}</p>{{ end }}
|
17 |
| - {{ if .Params.categories }} |
| 17 | + {{ if .Params.categories }} |
18 | 18 | <div class="post-categories" style="display: table;">
|
19 | 19 | <table style="border-collapse: separate; border-spacing: 0; background-color: #ffffff;">
|
20 | 20 | <thead>
|
21 | 21 | <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) --> |
27 | 31 | {{ if eq $element "rs" }}
|
28 | 32 | {{ $displayName = "Redis Enterprise Software" }}
|
29 |
| - {{ $color = "#DCFF1E" }} <!-- Yellow bullet point for Redis Enterprise Software --> |
| 33 | + {{ $color = "#DCFF1E" }} <!-- Yellow background for Redis Enterprise Software --> |
30 | 34 | {{ else if eq $element "rc" }}
|
31 | 35 | {{ $displayName = "Redis Cloud" }}
|
32 |
| - {{ $color = "#80DBFF" }} <!-- Blue bullet point for Redis Cloud --> |
| 36 | + {{ $color = "#80DBFF" }} <!-- Blue background for Redis Cloud --> |
33 | 37 | {{ else if eq $element "kubernetes" }}
|
34 | 38 | {{ $displayName = "Redis Enterprise for Kubernetes" }}
|
35 |
| - {{ $color = "#8A99A0" }} <!-- Light grey bullet point for Kubernetes --> |
| 39 | + {{ $color = "#8A99A0" }} <!-- Light grey background for Kubernetes --> |
36 | 40 | {{ else if eq $element "oss" }}
|
37 | 41 | {{ $displayName = "Redis Source Available" }}
|
38 |
| - {{ $color = "#C795E3" }} <!-- Purple bullet point for Redis Source Available --> |
| 42 | + {{ $color = "#C795E3" }} <!-- Purple background for Redis Source Available --> |
39 | 43 | {{ else if eq $element "stack" }}
|
40 | 44 | {{ $displayName = "Redis Stack" }}
|
41 |
| - {{ $color = "#49859C" }} <!-- Medium blue bullet point for Redis Stack --> |
| 45 | + {{ $color = "#49859C" }} <!-- Medium blue background for Redis Stack --> |
42 | 46 | {{ else if eq $element "redisinsight" }}
|
43 | 47 | {{ $displayName = "Redis Insight" }}
|
44 |
| - {{ $color = "#FD4439" }} <!-- Red bullet point for Redis Insight --> |
| 48 | + {{ $color = "#FD4439" }} <!-- Red background for Redis Insight --> |
45 | 49 | {{ 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;">•</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 }}"> |
48 | 51 | {{ $displayName }}
|
49 | 52 | </th>
|
50 | 53 | {{ end }}
|
51 |
| - {{ end }} |
52 | 54 | </tr>
|
53 | 55 | </thead>
|
54 | 56 | <tbody>
|
|
61 | 63 |
|
62 | 64 |
|
63 | 65 |
|
| 66 | + |
64 | 67 | <!-- In-page banner -->
|
65 | 68 | {{ if .Params.bannerText }}
|
66 | 69 | <!-- Banner params are in the current page's front matter -->
|
|
0 commit comments