mirror of
				https://github.com/BBaoVanC/bobatheme.git
				synced 2025-10-30 17:53:28 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			29 lines
		
	
	
		
			803 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			803 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
| {{ $hidecaption := index . "hidecaption" }}
 | |
| 
 | |
| {{ if index . "noborder" }}
 | |
|     <figure>
 | |
| {{ else }}
 | |
|     <figure class="border">
 | |
| {{ end }}
 | |
| 
 | |
|     {{ with index . "src" }}
 | |
|         {{ $media := . }}
 | |
|         {{ if eq .MediaType.MainType "image" }}
 | |
|             <img src="{{ $media.Permalink }}" alt="{{ $media.Title }}" />
 | |
|         {{ else if eq .MediaType.MainType "video" }}
 | |
|             <video controls>
 | |
|                 <source src="{{ $media.Permalink }}" alt="{{ $media.Title }}">
 | |
|                 {{ i18n "browser_no_video_support" }}
 | |
|             </video>
 | |
|         {{ end }}
 | |
| 
 | |
|         {{ if not $hidecaption }}
 | |
|             {{ with $media.Title }}
 | |
|                 <figcaption>
 | |
|                     {{ . | markdownify }}
 | |
|                 </figcaption>
 | |
|             {{ end }}
 | |
|         {{ end }}
 | |
|     {{ end }}
 | |
| </figure>
 |