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
				
			
		| 
						 | 
				
			
			@ -1,14 +1,3 @@
 | 
			
		|||
 | 
			
		||||
{{ 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 }}
 | 
			
		||||
 | 
			
		||||
<h1 class="display-4">{{ .Title }}</h1>
 | 
			
		||||
{{ if .Params.subtitle }}
 | 
			
		||||
  <h5 class="my-3">{{ markdownify .Params.subtitle | emojify }}</h5>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue