Compare commits
3 Commits
ade3da945e
...
658a4ddfac
Author | SHA1 | Date | |
---|---|---|---|
658a4ddfac | |||
14eb01e513 | |||
79b038fea3 |
@ -10,6 +10,13 @@
|
|||||||
</a></h2>
|
</a></h2>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
{{ with (index (.Resources.ByType "video") 0) }}
|
||||||
|
{{/* TODO this current logic does not suport video & image mixed */}}
|
||||||
|
<div class="p-summary">
|
||||||
|
<video controls width="540px" preload="none" poster="{{ $postPermalink }}/thumbnail.png">
|
||||||
|
<source src="{{.Permalink}}" type="video/mp4">
|
||||||
|
</video>
|
||||||
|
{{ else}}
|
||||||
{{ with (index (.Resources.ByType "image") 0) }}
|
{{ with (index (.Resources.ByType "image") 0) }}
|
||||||
{{ $height := add .Height 0.0}}
|
{{ $height := add .Height 0.0}}
|
||||||
{{ $ratio := div $height .Width}}
|
{{ $ratio := div $height .Width}}
|
||||||
@ -20,6 +27,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<div class="p-summary">
|
<div class="p-summary">
|
||||||
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<div class="summary-text">
|
<div class="summary-text">
|
||||||
{{ .Summary }}
|
{{ .Summary }}
|
||||||
|
Reference in New Issue
Block a user