mirror of
				https://github.com/ItsDrike/itsdrike.com.git
				synced 2025-11-04 04:06:36 +00:00 
			
		
		
		
	Separate header_image to it's own partial
This commit is contained in:
		
							parent
							
								
									fb21e83c33
								
							
						
					
					
						commit
						cc78f9d92c
					
				
					 3 changed files with 10 additions and 11 deletions
				
			
		
							
								
								
									
										9
									
								
								layouts/partials/header_image.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								layouts/partials/header_image.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,9 @@
 | 
			
		|||
{{ if .Params.image }}
 | 
			
		||||
  {{ .Scratch.Set "image" .Params.image }}
 | 
			
		||||
  {{ if hasPrefix .Params.image "resource:" }}
 | 
			
		||||
    {{ $resource := .Resources.GetMatch (replace .Params.image "resource:" "") }}
 | 
			
		||||
    {{ .Scratch.Set "image" ($resource.Resize "2000x").RelPermalink }}
 | 
			
		||||
  {{ end }}
 | 
			
		||||
 | 
			
		||||
  <img class="mb-3 header-image" src='{{ .Scratch.Get "image" }}' />
 | 
			
		||||
{{ end }}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue