| 
									
										
										
										
											2024-03-31 12:06:47 +02:00
										 |  |  | {{- $link := .link -}} | 
					
						
							|  |  |  | {{- $title := .title -}} | 
					
						
							|  |  |  | {{- $icon := .icon -}} | 
					
						
							|  |  |  | {{- $subtitle := .subtitle -}} | 
					
						
							|  |  |  | {{- $image := .image -}} | 
					
						
							|  |  |  | {{- $width := .width -}} | 
					
						
							|  |  |  | {{- $height := .height -}} | 
					
						
							|  |  |  | {{- $imageStyle := .imageStyle -}} | 
					
						
							| 
									
										
										
										
											2024-08-11 18:30:19 +02:00
										 |  |  | {{- $tag := .tag -}} | 
					
						
							| 
									
										
										
										
											2025-08-23 15:42:23 +02:00
										 |  |  | {{- $tagColor := .tagColor | default .tagType | default "" -}}{{- /* Compatibility with previous parameter. */ -}} | 
					
						
							| 
									
										
										
										
											2025-08-25 17:49:06 +02:00
										 |  |  | {{- $tagBorder := not (eq .tagBorder false) | default true }} | 
					
						
							|  |  |  | {{- $tagIcon := .tagIcon -}} | 
					
						
							| 
									
										
										
										
											2024-03-31 12:06:47 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-03-29 12:51:42 +00:00
										 |  |  | {{ $linkClass := "hx:hover:border-gray-300 hx:bg-transparent hx:shadow-xs hx:dark:border-neutral-800 hx:hover:bg-slate-50 hx:hover:shadow-md hx:dark:hover:border-neutral-700 hx:dark:hover:bg-neutral-900" }} | 
					
						
							| 
									
										
										
										
											2024-03-31 12:06:47 +02:00
										 |  |  | {{- with $image -}} | 
					
						
							| 
									
										
										
										
											2025-03-29 12:51:42 +00:00
										 |  |  |   {{ $linkClass = "hx:hover:border-gray-300 hx:bg-gray-100 hx:shadow-sm hx:dark:border-neutral-700 hx:dark:bg-neutral-800 hx:dark:text-gray-50 hx:hover:shadow-lg hx:dark:hover:border-neutral-500 hx:dark:hover:bg-neutral-700" }} | 
					
						
							| 
									
										
										
										
											2024-03-31 12:06:47 +02:00
										 |  |  | {{- end -}} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | {{- $external := strings.HasPrefix $link "http" -}} | 
					
						
							|  |  |  | {{- $href := cond (strings.HasPrefix $link "/") ($link | relURL) $link -}} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | <a | 
					
						
							| 
									
										
										
										
											2025-03-29 12:51:42 +00:00
										 |  |  |   class="hextra-card hx:group hx:flex hx:flex-col hx:justify-start hx:overflow-hidden hx:rounded-lg hx:border hx:border-gray-200 hx:text-current hx:no-underline hx:dark:shadow-none hx:hover:shadow-gray-100 hx:dark:hover:shadow-none hx:shadow-gray-100 hx:active:shadow-sm hx:active:shadow-gray-200 hx:transition-all hx:duration-200 {{ $linkClass }}" | 
					
						
							| 
									
										
										
										
											2024-03-31 12:06:47 +02:00
										 |  |  |   {{- if $link -}} | 
					
						
							|  |  |  |     href="{{ $href }}" | 
					
						
							|  |  |  |     {{ with $external }}target="_blank" rel="noreferrer"{{ end -}} | 
					
						
							|  |  |  |   {{- end -}} | 
					
						
							|  |  |  | > | 
					
						
							|  |  |  |   {{- with $image -}} | 
					
						
							|  |  |  |     <img | 
					
						
							|  |  |  |       alt="{{ $title }}" | 
					
						
							|  |  |  |       class="hextra-card-image" | 
					
						
							|  |  |  |       loading="lazy" | 
					
						
							|  |  |  |       decoding="async" | 
					
						
							|  |  |  |       src="{{ $image | safeURL }}" | 
					
						
							|  |  |  |       {{ with $width }}width="{{ . }}"{{ end }} | 
					
						
							|  |  |  |       {{ with $height }}height="{{ . }}"{{ end }} | 
					
						
							|  |  |  |       {{ with $imageStyle }}style="{{ . | safeCSS }}"{{ end }} | 
					
						
							|  |  |  |     /> | 
					
						
							|  |  |  |   {{- end -}} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-03-29 12:51:42 +00:00
										 |  |  |   {{- $padding := "hx:p-4" -}} | 
					
						
							| 
									
										
										
										
											2024-03-31 12:06:47 +02:00
										 |  |  |   {{- with $subtitle -}} | 
					
						
							| 
									
										
										
										
											2025-03-29 12:51:42 +00:00
										 |  |  |     {{- $padding = "hx:pt-4 hx:px-4" -}} | 
					
						
							| 
									
										
										
										
											2024-03-31 12:06:47 +02:00
										 |  |  |   {{- end -}} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-03-29 12:51:42 +00:00
										 |  |  |   <span class="hextra-card-icon hx:flex hx:font-semibold hx:items-start hx:gap-2 {{ $padding }} hx:text-gray-700 hx:hover:text-gray-900 hx:dark:text-neutral-200 hx:dark:hover:text-neutral-50"> | 
					
						
							| 
									
										
										
										
											2024-03-31 12:06:47 +02:00
										 |  |  |     {{- with $icon }}{{ partial "utils/icon.html" (dict "name" $icon) -}}{{- end -}} | 
					
						
							|  |  |  |     {{- $title -}} | 
					
						
							|  |  |  |   </span> | 
					
						
							|  |  |  |   {{- with $subtitle -}} | 
					
						
							| 
									
										
										
										
											2025-03-29 12:51:42 +00:00
										 |  |  |     <div class="hextra-card-subtitle hx:line-clamp-3 hx:text-sm hx:font-normal hx:text-gray-500 hx:dark:text-gray-400 hx:px-4 hx:mb-4 hx:mt-2">{{- $subtitle | markdownify -}}</div> | 
					
						
							| 
									
										
										
										
											2024-03-31 12:06:47 +02:00
										 |  |  |   {{- end -}} | 
					
						
							| 
									
										
										
										
											2024-08-11 18:30:19 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |   {{- if $tag }} | 
					
						
							| 
									
										
										
										
											2024-09-22 22:12:22 +01:00
										 |  |  |     {{- partial "shortcodes/badge.html" (dict | 
					
						
							|  |  |  |       "content" $tag | 
					
						
							| 
									
										
										
										
											2025-08-23 15:42:23 +02:00
										 |  |  |       "color" $tagColor | 
					
						
							| 
									
										
										
										
											2024-09-22 22:12:22 +01:00
										 |  |  |       "class" "hextra-card-tag" | 
					
						
							| 
									
										
										
										
											2025-08-25 17:49:06 +02:00
										 |  |  |       "border" $tagBorder | 
					
						
							|  |  |  |       "icon" $tagIcon | 
					
						
							| 
									
										
										
										
											2024-09-22 22:12:22 +01:00
										 |  |  |       ) | 
					
						
							|  |  |  |     -}} | 
					
						
							| 
									
										
										
										
											2024-08-11 18:47:03 +01:00
										 |  |  |   {{- end -}} | 
					
						
							| 
									
										
										
										
											2024-03-31 12:06:47 +02:00
										 |  |  | </a> | 
					
						
							|  |  |  | {{- /* Strip trailing newline. */ -}} |