supporting video media
This commit is contained in:
@@ -152,7 +152,7 @@ func layoutsShortcodesCommentsHtml() (*asset, error) {
|
||||
return a, nil
|
||||
}
|
||||
|
||||
var _layoutsShortcodesThumbHtml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x74\x90\xc1\x6a\xec\x30\x0c\x45\xf7\xf9\x0a\xa1\xd5\x7b\x8b\x99\x4c\xf7\x49\xb6\xfd\x8c\xa2\x26\x8a\x2d\xea\xb8\x69\x22\x98\x82\xd0\xbf\x17\xa7\x66\x98\x0e\xed\xc6\x20\x38\xe7\xfa\x72\xbb\xb5\x31\x03\x99\x81\x3f\xe0\xdf\xf9\x99\x15\x90\x92\x84\x8c\xff\x01\x13\xcf\x8a\xe0\x3e\x26\xda\xf7\xfe\x38\x65\x09\x68\xc6\x69\xe7\xe2\x3c\x0a\x9b\x84\xa8\x78\x13\x8e\xb3\x1a\x79\x82\x93\x7b\x33\x74\x04\x71\xe3\xb9\xc7\x76\xe1\x49\xa8\x35\x83\xef\x90\x59\x12\x67\x5a\x18\xdd\x11\x94\xb6\xc0\xda\xe3\xcb\x6b\xa2\xfc\x86\x43\x27\x4b\x80\x7d\x1b\x6f\x5a\x63\x76\x82\xab\x68\xac\xf6\x55\x26\x8d\xe8\x6e\x76\x2e\x4f\x29\xe8\xfe\x74\xb9\x1c\x3f\xbb\x7f\x9a\xdd\xc1\x91\x6b\xcf\x1f\x74\x45\x7f\x69\x54\x9a\x63\x99\xe9\x2e\x63\xa4\x55\xe5\x3d\x97\x79\x54\x34\x71\x8f\x47\x18\xd6\x94\xbf\x69\x4a\xfa\xc8\xb6\x43\xd7\xd2\xd0\x74\xed\x3a\x34\x5f\x01\x00\x00\xff\xff\x52\x23\x84\xaa\x90\x01\x00\x00")
|
||||
var _layoutsShortcodesThumbHtml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xc4\x90\xcf\x6e\x83\x30\x0c\xc6\xef\x3c\x85\x65\xed\xd0\x1e\x5a\x3a\xa9\xa7\x09\xb8\xee\x31\xa6\x14\x0c\x44\x33\x81\x11\x77\xad\x14\xf9\xdd\xa7\xa4\xac\xff\xa4\x9d\x77\x89\x64\xe7\xfb\x3e\xff\xec\x10\xe0\xa5\xb5\x4c\xce\x0c\x04\x6f\x25\x6c\xdf\x49\x00\x7f\x3b\x08\x1b\xd5\x2c\x6a\xe8\x2c\xf1\xdb\x1f\x0f\x5e\xe6\x3b\xcb\xca\x1f\x0f\xb0\x62\x72\xb7\xde\x1a\xf6\x6b\x50\xcd\x8a\x29\x3a\x6d\x0b\xf4\x05\xab\x4b\xae\x61\xdb\x39\x5c\x03\x32\xb5\x82\xa0\x5a\xb3\xf1\xbe\x4c\xa5\x1d\x3a\x0c\x81\xd8\x53\xf4\x3c\x1b\x66\xdb\xf5\x82\x57\x43\x2a\x17\x87\x6b\x40\xb5\xba\xcd\x4a\xac\xb8\x1d\xa6\x3d\x26\x8c\x6f\xdb\xd0\x08\x7e\xae\x4b\xcc\x07\x6a\xac\xc9\xb3\x10\x36\x70\xb2\xd2\x2f\xeb\x9e\x6c\x23\x3d\xaa\x86\xb0\x8d\x4f\x64\x50\x7d\xdd\xed\x52\xb8\xea\x39\x84\x3b\x71\x4f\x0b\xca\x83\x7a\x91\xe6\x0f\xf7\xdc\xa8\x62\x56\x8f\x4e\xe6\x91\x3d\x18\xe6\xf1\xd4\x1e\x99\x7d\x3d\x13\xb9\xac\x2a\xf2\x84\x96\xd0\xd3\xde\x91\xd6\x40\x3f\x53\x7b\x45\x7d\xc8\x53\x45\x10\x33\x77\x24\x25\x7e\x1c\xd8\xb8\x4f\xac\x0a\x3b\x74\xff\xb7\x5c\x08\xf7\xa3\x6a\x33\x89\x1d\x5d\x3c\xbb\x58\x61\x2a\x31\xc5\xe0\xe2\xff\x5b\x6d\x58\x9e\xb5\x79\x55\xe4\x26\x9e\xe6\x52\x16\xf9\x54\x65\x3f\x01\x00\x00\xff\xff\xca\x5c\x71\xf7\xad\x02\x00\x00")
|
||||
|
||||
func layoutsShortcodesThumbHtmlBytes() ([]byte, error) {
|
||||
return bindataRead(
|
||||
@@ -167,7 +167,7 @@ func layoutsShortcodesThumbHtml() (*asset, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "layouts/shortcodes/thumb.html", size: 400, mode: os.FileMode(420), modTime: time.Unix(1504974306, 0)}
|
||||
info := bindataFileInfo{name: "layouts/shortcodes/thumb.html", size: 685, mode: os.FileMode(420), modTime: time.Unix(1505244603, 0)}
|
||||
a := &asset{bytes: bytes, info: info}
|
||||
return a, nil
|
||||
}
|
||||
|
||||
@@ -1,8 +1,17 @@
|
||||
{{ $filename := .Get "filename" -}}
|
||||
{{ $ext := substr $filename (sub (len $filename) 4) }}
|
||||
<p
|
||||
{{ if eq (.Get "align") "left" }}class="leftimg"{{else if (.Get "align") "right"}}class="rightimg"{{end -}}
|
||||
><a href="/media/{{ .Get "filename"}}" target="_blank"><img src="/media/
|
||||
{{- with .Get "width"}}{{.}}{{else}}100{{end}}x{{with .Get "height"}}{{.}}{{else}}{{end}}/{{ .Get "filename" -}}"
|
||||
{{ if eq (.Get "align") "left" }}class="leftimg"{{else if (.Get "align") "right"}}class="rightimg"{{end }}>
|
||||
{{ if eq $ext ".mp4" }}
|
||||
<video src="/media/
|
||||
{{- with .Get "width"}}{{.}}{{else}}100{{end}}x{{with .Get "height"}}{{.}}{{else}}{{end}}/{{ $filename -}}"
|
||||
controls allowfullscreen
|
||||
></video>
|
||||
{{ else }}
|
||||
<a href="/media/{{ $filename }}" target="_blank"><img src="/media/
|
||||
{{- with .Get "width"}}{{.}}{{else}}100{{end}}x{{with .Get "height"}}{{.}}{{else}}{{end}}/{{ $filename -}}"
|
||||
{{ with .Get "caption" }}title="{{.}}"{{end}}
|
||||
{{ with .Get "caption" }}alt="{{.}}"{{end}}
|
||||
/></a>
|
||||
{{end}}
|
||||
</p>
|
||||
|
||||
Reference in New Issue
Block a user