mirror of
				https://github.com/imfing/hextra.git
				synced 2025-10-30 23:40:14 -04:00 
			
		
		
		
	 79bb4504a0
			
		
	
	79bb4504a0
	
	
	
		
			
			* feat: add icon support to badge shortcodes - Introduced an optional icon parameter to both badge.html files. - Updated the badge rendering to include the icon alongside the content. - Enhanced the layout for better alignment of icon and text. * feat: add new feature shortcode * docs: update badge doc
		
			
				
	
	
		
			12 lines
		
	
	
		
			628 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
		
			628 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
| {{- $version := .Get "version" | default "" -}}
 | |
| {{- $icon := .Get "icon" | default "" -}}
 | |
| {{- $defaultLink := cond (eq $version "") "https://github.com/imfing/hextra/tree/main" (printf "https://github.com/imfing/hextra/releases/tag/%s" $version) -}}
 | |
| {{- $link := .Get "link" | default $defaultLink -}}
 | |
| {{- $content := cond (eq $version "") "New in main branch" (printf "New in %s" $version) -}}
 | |
| 
 | |
| <div style="margin-top: 1rem; display: inline-flex;">
 | |
|   <a href="{{ $link }}" title="{{ $link | plainify }}" target="_blank">
 | |
|     {{- partial "shortcodes/badge" (dict "content" $content "border" true "icon" $icon) -}}
 | |
|   </a>
 | |
| </div>
 |