|
9 | 9 | <section class="flex flex-col gap-8">
|
10 | 10 | <h2 class="ngx-section-header">FEATURED PROJECTS</h2>
|
11 | 11 | <div class="flex flex-col gap-8">
|
12 |
| - {{ partial "projects/card-wide.html" (index $projects 0) }} |
| 12 | + {{ with index $projects 0 }} |
| 13 | +<!-- Wide Card Hidden on Mobile Screens--> |
| 14 | + <div class="hidden w-full bg-white ngx-card-border lg:flex"> |
| 15 | + <div class="w-56 h-56 shrink-0 proj-image-bg flex items-center justify-center"> |
| 16 | + {{ with .Resources.Get (.Param "image") }} |
| 17 | + <img src="{{ .RelPermalink }}" alt="{{ .Title }}" class="w-36 h-36"/> |
| 18 | + {{ end }} |
| 19 | + </div> |
| 20 | + <div class="p-4 gap-2 flex-col flex"> |
| 21 | + <h3 class="font-semibold text-2xl">{{ .Title }}</h3> |
| 22 | + <p class="text-gray-600 grow text-wrap text-sm"> |
| 23 | + {{ .Plain | htmlUnescape }} |
| 24 | + </p> |
| 25 | + <div class="flex w-full gap-1"> |
| 26 | + {{ if .Params.github_url }} |
| 27 | + {{ $iconLinkArgs := (dict "TargetURL" .Params.github_url "TargetIconPath" "svg/github-logo.svg") }} |
| 28 | + {{ partial "icon-link.html" $iconLinkArgs }} |
| 29 | + {{ end }} |
| 30 | + {{ if .Params.external_url }} |
| 31 | + {{ $iconLinkArgs := (dict "TargetURL" .Params.external_url "TargetIconPath" "svg/external-link.svg") }} |
| 32 | + {{ partial "icon-link.html" $iconLinkArgs }} |
| 33 | + {{ end }} |
| 34 | + </div> |
| 35 | + </div> |
| 36 | + </div> |
| 37 | +<!-- Handles mobile screens w/ regular card --> |
| 38 | + <div class="w-full lg:hidden"> |
| 39 | + {{ partial "projects/featured-card.html" . }} |
| 40 | + </div> |
| 41 | + {{ end }} |
13 | 42 | <div class="w-full flex flex-wrap md:flex-nowrap justify-between gap-8 ">
|
14 | 43 | {{ range after 1 $projects }}
|
15 | 44 | {{ partial "projects/featured-card.html" . }}
|
|
0 commit comments