|
16 | 16 | </h1>
|
17 | 17 |
|
18 | 18 | {{ with .Params.description }}<p class="text-lg -mt-5 mb-10">{{ . | markdownify }}</p>{{ end }}
|
19 |
| - |
| 19 | + {{ if .Params.categories }} |
| 20 | +<div class="post-categories" style="display: table;"> |
| 21 | + <table style="border-collapse: separate; border-spacing: 0; background-color: #ffffff;"> |
| 22 | + <thead> |
| 23 | + <tr> |
| 24 | + {{ $visibleCategories := slice }} |
| 25 | + {{ range .Params.categories }} |
| 26 | + {{ if not (in (slice "docs" "operate" "integrate" "develop") .) }} |
| 27 | + {{ $visibleCategories = $visibleCategories | append (slice .) }} <!-- Corrected Append --> |
| 28 | + {{ end }} |
| 29 | + {{ end }} |
| 30 | + {{ range $index, $element := $visibleCategories }} |
| 31 | + {{ $displayName := $element }} |
| 32 | + {{ $color := "#ffffff" }} <!-- Default background color (white) --> |
| 33 | + {{ if eq $element "rs" }} |
| 34 | + {{ $displayName = "Redis Enterprise Software" }} |
| 35 | + {{ $color = "#DCFF1E" }} |
| 36 | + {{ else if eq $element "rc" }} |
| 37 | + {{ $displayName = "Redis Cloud" }} |
| 38 | + {{ $color = "#80DBFF" }} |
| 39 | + {{ else if eq $element "kubernetes" }} |
| 40 | + {{ $displayName = "Redis Enterprise for Kubernetes" }} |
| 41 | + {{ $color = "#8A99A0" }} |
| 42 | + {{ else if eq $element "oss" }} |
| 43 | + {{ $displayName = "Redis Source Available" }} |
| 44 | + {{ $color = "#C795E3" }} |
| 45 | + {{ else if eq $element "stack" }} |
| 46 | + {{ $displayName = "Redis Stack" }} |
| 47 | + {{ $color = "#49859C" }} |
| 48 | + {{ else if eq $element "redisinsight" }} |
| 49 | + {{ $displayName = "Redis Insight" }} |
| 50 | + {{ $color = "#FD4439" }} |
| 51 | + {{ end }} |
| 52 | + <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 }}"> |
| 53 | + {{ $displayName }} |
| 54 | + </th> |
| 55 | + {{ end }} |
| 56 | + </tr> |
| 57 | + </thead> |
| 58 | + <tbody> |
| 59 | + <!-- The tbody is intentionally left empty as all content is in the header --> |
| 60 | + </tbody> |
| 61 | + </table> |
| 62 | +</div> |
| 63 | +{{ end }} |
| 64 | + |
20 | 65 | <!-- In-page banner -->
|
21 | 66 | {{ if .Params.bannerText }}
|
22 | 67 | <!-- Banner params are in the current page's front matter -->
|
|
0 commit comments