There are two main sizes of figures: fullwidth and small. Full width figures take the full content width. Usually they spread into the "wide" content area too. Main size figures are also full width figures, but they stop at the edges of the main content area. Small figures shrink to fit and are generally 480pts wide. Break all these different types of figures down into separate templates for each variant. Add the ability for resources to specify a "source" with a link and title.
		
			
				
	
	
		
			10 lines
		
	
	
	
		
			276 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			10 lines
		
	
	
	
		
			276 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
| {{- $video := .resource -}}
 | |
| 
 | |
| <figure class="figure  figure--video">
 | |
|   <video controls>
 | |
|     <source src="{{ $video.RelPermalink }}" type="{{ $video.MediaType.Type }}">
 | |
|   </video>
 | |
|   {{ if .shouldShowTitle }}
 | |
|     {{ partial "page/figures/caption.html" . }}
 | |
|   {{ end }}
 | |
| </figure>
 |