Consolidate list template
Rearrange styles and templates to use the list partial templates in termlite.
This commit is contained in:
		
							parent
							
								
									4cb92ab5a9
								
							
						
					
					
						commit
						9620d4e8b5
					
				
					 3 changed files with 17 additions and 61 deletions
				
			
		| 
						 | 
				
			
			@ -1,9 +1,16 @@
 | 
			
		|||
{{- $gridSize := $.Site.Params.photos.thumbnailSize -}}
 | 
			
		||||
 | 
			
		||||
{{- $thumbnail := partial "photostream/thumbnail.html" (dict "Page" . "Width" $gridSize "Height" $gridSize) -}}
 | 
			
		||||
{{- $thumbnail = $thumbnail.Crop (printf "%dx%d" $gridSize $gridSize) -}}
 | 
			
		||||
 | 
			
		||||
{{- $altText := $thumbnail.Params.alt -}}
 | 
			
		||||
 | 
			
		||||
{{- $linkTitle := .LinkTitle | markdownify -}}
 | 
			
		||||
{{- $showsTitle := le (len $linkTitle) 18 -}}
 | 
			
		||||
{{- if not $showsTitle -}}
 | 
			
		||||
  {{ warnf "Title for photostream item is too long for grid: %s" .Permalink }}  
 | 
			
		||||
{{- end -}}
 | 
			
		||||
 | 
			
		||||
<article class="photostream-item">
 | 
			
		||||
  {{ if $showsTitle }}
 | 
			
		||||
    <h3 class="photostream-item__title">{{ $linkTitle }}</h3>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue