|
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 |
| - <th style="border: 1px solid #ccc; padding: 8px; text-align: left; font-weight: normal; white-space: nowrap; border-top-left-radius: 10px; border-bottom-left-radius: 10px;">Applies to:</th> <!-- Added rounded corners for the first cell --> |
23 |
| - {{ range .Params.categories }} |
| 22 | + <th style="border: 1px solid #ccc; padding: 8px; text-align: left; font-weight: normal; white-space: nowrap; border-top-left-radius: 10px; border-bottom-left-radius: 10px;">Applies to:</th> <!-- Rounded corners for the first cell --> |
| 23 | + {{ $total := len .Params.categories }} <!-- Store the total number of categories --> |
| 24 | + {{ range $index, $element := .Params.categories }} |
24 | 25 | {{ if not (in (slice "docs" "operate" "integrate" "develop") .) }} <!-- Exclude specific categories -->
|
25 |
| - {{ $displayName := . }} <!-- Set default display name --> |
| 26 | + {{ $displayName := $element }} <!-- Set default display name --> |
26 | 27 | {{ $color := "#000000" }} <!-- Default color (black) -->
|
27 |
| - {{ if eq . "rs" }} |
| 28 | + {{ if eq $element "rs" }} |
28 | 29 | {{ $displayName = "Redis Enterprise Software" }}
|
29 | 30 | {{ $color = "#DCFF1E" }} <!-- Yellow bullet point for Redis Enterprise Software -->
|
30 |
| - {{ else if eq . "rc" }} |
| 31 | + {{ else if eq $element "rc" }} |
31 | 32 | {{ $displayName = "Redis Cloud" }}
|
32 | 33 | {{ $color = "#80DBFF" }} <!-- Blue bullet point for Redis Cloud -->
|
33 |
| - {{ else if eq . "kubernetes" }} |
| 34 | + {{ else if eq $element "kubernetes" }} |
34 | 35 | {{ $displayName = "Redis Enterprise for Kubernetes" }}
|
35 | 36 | {{ $color = "#8A99A0" }} <!-- Light grey bullet point for Kubernetes -->
|
36 |
| - {{ else if eq . "oss" }} |
| 37 | + {{ else if eq $element "oss" }} |
37 | 38 | {{ $displayName = "Redis Source Available" }}
|
38 | 39 | {{ $color = "#C795E3" }} <!-- Purple bullet point for Redis Source Available -->
|
39 |
| - {{ else if eq . "stack" }} |
| 40 | + {{ else if eq $element "stack" }} |
40 | 41 | {{ $displayName = "Redis Stack" }}
|
41 | 42 | {{ $color = "#49859C" }} <!-- Medium blue bullet point for Redis Stack -->
|
42 |
| - {{ else if eq . "redisinsight" }} |
| 43 | + {{ else if eq $element "redisinsight" }} |
43 | 44 | {{ $displayName = "Redis Insight" }}
|
44 | 45 | {{ $color = "#FD4439" }} <!-- Red bullet point for Redis Insight -->
|
45 | 46 | {{ end }}
|
46 |
| - {{ $last := eq (add 1 (index $.Params.categories)) (len $.Params.categories) }} <!-- Check if it is the last category --> |
47 |
| - <th style="border: 1px solid #ccc; padding: 8px; text-align: left; font-weight: normal; {{ if $last }}border-top-right-radius: 10px; border-bottom-right-radius: 10px;{{ end }}"> |
| 47 | + <th style="border: 1px solid #ccc; padding: 8px; text-align: left; font-weight: normal; {{ if eq $index (sub $total 1) }}border-top-right-radius: 10px; border-bottom-right-radius: 10px;{{ end }}"> |
48 | 48 | <span style="color: {{ $color }}; font-size: 20px;">•</span> <!-- Larger colored bullet point -->
|
49 | 49 | {{ $displayName }}
|
50 | 50 | </th>
|
|
64 | 64 |
|
65 | 65 |
|
66 | 66 |
|
| 67 | + |
67 | 68 | <!-- In-page banner -->
|
68 | 69 | {{ if .Params.bannerText }}
|
69 | 70 | <!-- Banner params are in the current page's front matter -->
|
|
0 commit comments