mirror of
				https://github.com/BBaoVanC/bobatheme.git
				synced 2025-10-28 16:53:30 -05:00 
			
		
		
		
	Compare commits
	
		
			1 Commits
		
	
	
		
			c0426f191a
			...
			image-resi
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 5fb449a8e7 | 
| @@ -1,7 +1,31 @@ | |||||||
| <figure> | <figure> | ||||||
|     {{ $media := . | resources.Fingerprint "sha512" }} |     {{ $media := . | resources.Fingerprint "sha512" }} | ||||||
|  |  | ||||||
|     {{ if eq .MediaType.MainType "image" }} |     {{ if eq .MediaType.MainType "image" }} | ||||||
|     <img src="{{ $media.Permalink }}" alt="{{ $media.Title }}" /> |  | ||||||
|  |     {{ $tiny := $media.Resize "500x" }} | ||||||
|  |     {{ $small := $media.Resize "800x" }} | ||||||
|  |     {{ $medium := $media.Resize "1200x" }} | ||||||
|  |     {{ $large := $media.Resize "1500x" }} | ||||||
|  |     <img src="{{ $media.Permalink }}" | ||||||
|  |          alt="{{ $media.Title }}" | ||||||
|  |          srcset=' | ||||||
|  |          {{ if ge $media.Width "500" }} | ||||||
|  |              {{ $tiny.RelPermalink}} 500w, | ||||||
|  |          {{ end }} | ||||||
|  |          {{ if ge $media.Width "800" }} | ||||||
|  |              {{ $small.RelPermalink }} 800w, | ||||||
|  |          {{ end }} | ||||||
|  |          {{ if ge $media.Width "1200" }} | ||||||
|  |              {{ $medium.RelPermalink }} 1200w, | ||||||
|  |          {{ end }} | ||||||
|  |          {{ if ge $media.Width "1500" }} | ||||||
|  |              {{ $large.RelPermalink }} 1500w, | ||||||
|  |          {{ end }} | ||||||
|  |          {{ $media.RelPermalink }} {{ $media.Width }}w | ||||||
|  |          ' | ||||||
|  |     /> | ||||||
|  |  | ||||||
|     {{ else if eq .MediaType.MainType "video" }} |     {{ else if eq .MediaType.MainType "video" }} | ||||||
|     <video controls> |     <video controls> | ||||||
|         <source src="{{ $media.Permalink }}" alt="{{ $media.Title }}"> |         <source src="{{ $media.Permalink }}" alt="{{ $media.Title }}"> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user