mirror of
				https://github.com/BBaoVanC/bobatheme.git
				synced 2025-10-30 01:33:30 -05:00 
			
		
		
		
	Use partialCached on icon partial
This commit is contained in:
		
							
								
								
									
										6
									
								
								layouts/partials/icon_code.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								layouts/partials/icon_code.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,6 @@ | ||||
| {{- $icon_resource := resources.Get (printf "jam/icons/%s.svg" .) -}} | ||||
| {{- $icon := $icon_resource.Content -}} | ||||
| {{- $icon = replaceRE `<svg` `<svg class="icon"` $icon -}} | ||||
| {{- $icon = replaceRE `</svg>` (printf `<title>%s icon</title></svg>` .) $icon -}} | ||||
| {{- $icon = replaceRE `(width|height)="[0-9]*"` "" $icon -}} | ||||
| {{- $icon | safeHTML -}} | ||||
		Reference in New Issue
	
	Block a user