diff options
author | MY_ <lartpang@users.noreply.github.com> | 2018-07-22 15:29:36 +0300 |
---|---|---|
committer | Chen Xianmin <xianmin12@gmail.com> | 2018-07-22 15:29:36 +0300 |
commit | 667197003d67fb3ceccfe78cc62a42918f5066ae (patch) | |
tree | a37f23026c0b60f6d866e796c6a4b542e81bbaa9 | |
parent | bd2441fc1936f03fe64d94bc026d88cd020f4f30 (diff) |
update youku shortcode (#90)
close #87
-rw-r--r-- | layouts/shortcodes/youku.html | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/layouts/shortcodes/youku.html b/layouts/shortcodes/youku.html index 0fe5268..108f1c2 100644 --- a/layouts/shortcodes/youku.html +++ b/layouts/shortcodes/youku.html @@ -1,13 +1,14 @@ {{ if .IsNamedParams }} -<div {{ if .Get "class" }}class="{{ .Get "class" }}"{{ else }}style="position: relative; padding-bottom: 56.25%; padding-top: 30px; height: 0; overflow: hidden;"{{ end }}> - <iframe src="//www.youku.com/embed/{{ .Get " id " }}?{{ with .Get "autoplay" }}{{ if eq . "true " }}autoplay=1{{ end }}{{ end }}" - {{ if not (.Get "class") }}style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"{{ end }} - allowfullscreen frameborder="0" title="YouKu Video"></iframe> + +<div {{ if .Get "class" }}class="{{ .Get "class" }}"{{ else }} style="position: relative; padding-bottom: 56.25%; padding-top: 30px; height: 0; overflow: hidden;"{{ end }}> + <iframe src="https://player.youku.com/embed/{{ .Get "id" }}?{{ with .Get "autoplay" }}{{ if eq . "true" }}autoplay=1{{ end }}{{ end }}"{{ if not (.Get "class") }} style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"{{ end }} allowfullscreen frameborder="0" title="YouKu Video"></iframe> </div> + {{ else }} -<div {{ if len .Params | eq 2 }}class="{{ .Get 1 }}" {{ else }}style="position: relative; padding-bottom: 56.25%; padding-top: 30px; height: 0; overflow: hidden;"{{ end }}> - <iframe src="//player.youku.com/embed/{{ .Get 0 }}?autoplay=0" - {{ if len .Params | eq 1 }}style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"{{ end }} - allowfullscreen frameborder="0" title="YouKu Video"></iframe> + +<div{{ if len .Params | eq 2 }} class="{{ .Get 1 }}"{{ else }} style="position: relative; padding-bottom: 56.25%; padding-top: 30px; height: 0; overflow: hidden;"{{ end }}> + <iframe src="https://player.youku.com/embed/{{ .Get 0 }}?autoplay=0"{{ if len .Params | eq 1 }} style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"{{ end }} allowfullscreen frameborder="0" title="YouKu Video"> + </iframe> </div> -{{ end }} + +{{ end }}
\ No newline at end of file |