Skip to content

Commit 90e05c0

Browse files
authored
Merge pull request #33 from redis-learn/greg-integration-labels
Added labels to integration cards, updated commands styles to match
2 parents a5b87dc + 987eaca commit 90e05c0

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

layouts/commands/list.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,18 +124,20 @@ <h1>Commands</h1>
124124
<div id="commands-grid" class="flex flex-col md:grid grid-cols-[repeat(auto-fit,minmax(18rem,1fr))] gap-4 text-redis-ink-900 mx-auto">
125125
{{ range $index, $page := $pages }}
126126
<article
127-
class="flex flex-col justify-start transition relative h-full p-6 text-sm text-redis-ink-900 hover:text-red-900 focus-within:text-red-900 bg-white hover:bg-red-50/50 focus-within:bg-red-50/50 border border-redis-ink-900 focus-within:ring-red-200 focus-within:ring-[3px] focus-within:outline-none bg-clip-padding rounded-md"
127+
class="flex flex-col gap-2 transition relative h-full py-4 text-sm text-redis-ink-900 hover:text-red-900 focus-within:text-red-900 bg-white hover:bg-red-50/50 focus-within:bg-red-50/50 border border-redis-pen-800 focus-within:ring-red-200 focus-within:ring-[3px] focus-within:outline-none bg-clip-padding rounded-md group"
128128
data-name="{{ .Title }}"
129129
data-group="{{ .Params.group }}"
130130
data-version
131131
data-top
132132
>
133-
<h1 class="truncate font-mono font-medium mb-1.5">
133+
<h1 class="truncate font-mono font-medium text-lg mb-1.5 px-6">
134134
{{ .Title }}
135135
</h1>
136-
<p class="opacity-70">
136+
<p class="px-6">
137137
{{ .Params.summary }}
138138
</p>
139+
<div class="grow"></div>
140+
<div class="text-xs font-mono group-hover:underline px-6">Learn more →</div>
139141
<a class="absolute inset-0 outline-0" href="{{ .RelPermalink }}">
140142
<span class="sr-only">Read more</span>
141143
</a>

layouts/integrate/list.html

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,20 +53,28 @@ <h1>{{ .Title }}</h1>
5353
</form>
5454

5555
<div id="commands-grid" class="flex flex-col md:grid grid-cols-[repeat(auto-fit,minmax(18rem,1fr))] gap-4 text-slate-500 mx-auto">
56+
{{ $labelColors := (dict "library" "bg-redis-yellow-500" "framework" "bg-violet-300" "observability" "bg-blue-300" "provisioning" "bg-redis-red-500" "mig" "bg-pink-300" "di" "bg-teal-300" "cloud-service" "bg-rose-300") }}
57+
{{ $labelText := (dict "mig" "data migration" "di" "data integration" "cloud-service" "cloud service") }}
5658
{{ range .CurrentSection.Sections }}
5759
<article
58-
class="flex flex-col justify-start transition relative h-full p-6 text-sm text-redis-ink-900 hover:text-red-900 focus-within:text-red-900 bg-white hover:bg-red-50/50 focus-within:bg-red-50/50 border border-redis-ink-900 focus-within:ring-red-200 focus-within:ring-[3px] focus-within:outline-none bg-clip-padding rounded-md"
60+
class="flex flex-col gap-2 relative transition h-full text-redis-ink-900 hover:text-red-900 focus-within:text-red-900 bg-white hover:bg-red-50/50 focus-within:bg-red-50/50 border border-redis-pen-800 focus-within:ring-red-200 focus-within:ring-[3px] focus-within:outline-none bg-clip-padding rounded-md group"
5961
data-name="{{ .Title }}"
6062
data-group="{{ .Params.group }}"
6163
data-version
6264
data-top
6365
>
64-
<h1 class="truncate font-mono font-medium mb-1.5">
66+
<div class="flex flex-row items-center gap-1 uppercase font-mono text-xs border-b border-redis-pen-800 px-6 py-2">
67+
<div class='h-3 w-3 rounded-md border border-redis-pen-600 {{ index $labelColors .Params.group | default "bg-green-300" }}'></div>
68+
{{ index $labelText .Params.group | default .Params.group }}
69+
</div>
70+
<h1 class="text-xl leading-tight px-6 py-4">
6571
{{ .Title }}
6672
</h1>
67-
<p class="opacity-70">
73+
<p class="text-sm px-6">
6874
{{ .Params.summary }}
6975
</p>
76+
<div class="grow"></div>
77+
<div class="text-xs font-mono group-hover:underline px-6 pb-4">Learn more →</div>
7078
<a class="absolute inset-0 outline-0" href="{{ .RelPermalink }}">
7179
<span class="sr-only">Read more</span>
7280
</a>

0 commit comments

Comments
 (0)