mirror of
				https://github.com/imfing/hextra.git
				synced 2025-11-04 00:14:54 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			22 lines
		
	
	
		
			579 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			579 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
{{- /*
 | 
						|
A shortcode for displaying a feature grid.
 | 
						|
 | 
						|
@param {string} cols The number of columns.
 | 
						|
@param {string} style The style of the grid.
 | 
						|
 | 
						|
@example {{< hextra/feature-grid cols="3" >}}{{< /hextra/feature-grid >}}
 | 
						|
*/ -}}
 | 
						|
 | 
						|
{{- $cols := .Get "cols" | default 3 -}}
 | 
						|
{{- $style := .Get "style" | default "" -}}
 | 
						|
 | 
						|
{{- $css := printf "--hextra-feature-grid-cols: %v; %s" $cols $style -}}
 | 
						|
 | 
						|
 | 
						|
<div
 | 
						|
  class="hextra-feature-grid hx:grid hx:sm:max-lg:grid-cols-2 hx:max-sm:grid-cols-1 hx:gap-4 hx:w-full not-prose"
 | 
						|
  {{ with $css }}style="{{ . | safeCSS }}"{{ end }}
 | 
						|
>
 | 
						|
  {{ .Inner }}
 | 
						|
</div>
 |