Skip to content

Commit 645d0a1

Browse files
committed
Consistant Height
1 parent 136d7d0 commit 645d0a1

2 files changed

Lines changed: 24 additions & 8 deletions

File tree

assets/css/tailwind-input.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,22 @@
689689
@apply mt-2 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 2xl:grid-cols-4 gap-4 md:gap-6;
690690
}
691691

692+
.tool-card {
693+
@apply h-[140px] xl:h-[148px];
694+
}
695+
696+
.tool-card__body {
697+
@apply justify-between;
698+
}
699+
700+
.tool-card__desc {
701+
@apply m-0 mt-2 min-h-[2.0625rem] text-xs leading-snug text-slate-500 line-clamp-2 xl:min-h-[2.25rem] xl:text-[13px];
702+
}
703+
704+
.tool-card__meta {
705+
@apply mt-2 h-5 shrink-0;
706+
}
707+
692708
/* About us (/about-us/) */
693709
.about-hero__panel {
694710
@apply relative overflow-hidden rounded-2xl border border-gray-200/80 bg-gradient-to-br from-white via-slate-50/90 to-sky-50/50 shadow-sm sm:rounded-3xl;

layouts/partials/home/tool-card.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515
{{- $linkClass := "tool-card__link text-inherit no-underline hover:text-brand after:absolute after:inset-0 after:rounded-2xl after:z-10 after:content-['']" -}}
1616

1717
<article
18-
class="relative bg-white border border-gray-100 p-3.5 rounded-2xl flex items-center gap-3 hover:-translate-y-1 hover:shadow-md transition-all group"
18+
class="tool-card relative bg-white border border-gray-100 p-3.5 rounded-2xl flex items-center gap-3 hover:-translate-y-1 hover:shadow-md transition-all group"
1919
data-cfd-tool="{{ $item.name }}"
2020
data-cfd-category="{{ $categoryName }}"
2121
data-cfd-source="{{ $source }}"
2222
data-cfd-external="{{ $isExternal }}">
23-
<div class="flex-1 flex flex-col justify-between pt-1 min-w-0">
24-
<div class="flex justify-between items-start gap-1">
23+
<div class="tool-card__body flex-1 flex flex-col min-w-0 min-h-0 self-stretch">
24+
<div class="shrink-0">
2525
{{- if eq $headingLevel 2 -}}
2626
<h2 class="{{ $titleClass }}">
2727
<a href="{{ $item.url }}" class="{{ $linkClass }}"{{ if $isExternal }} target="_blank" rel="noopener noreferrer"{{ end }}>
@@ -41,13 +41,13 @@ <h3 class="{{ $titleClass }}">
4141
</a>
4242
</h3>
4343
{{- end -}}
44-
</div>
45-
<p class="text-xs xl:text-[13px] text-slate-500 leading-snug mt-2 line-clamp-3 m-0">{{ $desc }}</p>
46-
{{- with $item.date -}}
47-
<div class="mt-4">
44+
</div>
45+
<p class="tool-card__desc">{{ $desc }}</p>
46+
<div class="tool-card__meta">
47+
{{- with $item.date -}}
4848
<span class="inline-block bg-gray-50 px-2 py-0.5 rounded-md text-[10px] xl:text-[11px] font-medium text-slate-500 border border-gray-100">{{ . | time.Format "02 Jan 2006" }}</span>
49+
{{- end -}}
4950
</div>
50-
{{- end -}}
5151
</div>
5252
<div class="w-20 h-20 xl:w-[104px] xl:h-[104px] bg-gray-50/80 rounded-xl shrink-0 flex items-center justify-center p-2 border border-gray-50 group-hover:border-gray-100 transition-colors relative z-0">
5353
<img src="/images/{{ $iconDir }}/{{ $item.icon }}.svg" alt="" class="w-full h-full object-contain opacity-80 group-hover:opacity-100 transition-opacity" loading="lazy" width="80" height="80">

0 commit comments

Comments
 (0)