summaryrefslogtreecommitdiffstats
path: root/tpl
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-05-25 11:16:23 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-05-25 11:16:23 +0200
commit448081b840db4a23c0c49c2d869ac207dcb6ac40 (patch)
treecf1c69bad108a1484a52913c2ec51ee19795f57c /tpl
parent1f1d955b56471e41d5288c57f1ef8333dc297120 (diff)
Remove youtube_simple for now
We need to revisit and complete that. See #4751
Diffstat (limited to 'tpl')
-rw-r--r--tpl/tplimpl/embedded/templates.autogen.go21
-rwxr-xr-xtpl/tplimpl/embedded/templates/shortcodes/youtube.html6
-rw-r--r--tpl/tplimpl/embedded/templates/shortcodes/youtube_simple.html14
3 files changed, 3 insertions, 38 deletions
diff --git a/tpl/tplimpl/embedded/templates.autogen.go b/tpl/tplimpl/embedded/templates.autogen.go
index 9637deb10..43e1b4d15 100644
--- a/tpl/tplimpl/embedded/templates.autogen.go
+++ b/tpl/tplimpl/embedded/templates.autogen.go
@@ -384,30 +384,13 @@ M66.52,7.74c-0.78-2.93-2.49-5.41-5.42-6.19C55.79,.13,34,0,34,0S12.21,.13,6.9,1.5
{`shortcodes/youtube.html`, `{{- $pc := .Page.Site.Config.Privacy.YouTube -}}
{{- if not $pc.Disable -}}
{{- $ytHost := cond $pc.PrivacyEnhanced "www.youtube-nocookie.com" "www.youtube.com" -}}
-{{- if $pc.Simple -}}
-{{ template "_internal/shortcodes/youtube_simple.html" . }}
-{{- else -}}
{{- $id := .Get "id" | default (.Get 0) -}}
{{- $class := .Get "class" | default (.Get 1) }}
<div {{ with $class }}class="{{ . }}"{{ else }}style="position: relative; padding-bottom: 56.25%; padding-top: 30px; height: 0; overflow: hidden;"{{ end }}>
<iframe src="//{{ $ytHost }}/embed/{{ $id }}{{ with .Get "autoplay" }}{{ if eq . "true" }}?autoplay=1{{ end }}{{ end }}" {{ if not $class }}style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;" {{ end }}allowfullscreen frameborder="0" title="YouTube Video"></iframe>
</div>
-{{ end }}
-{{- end -}}`},
- {`shortcodes/youtube_simple.html`, `{{ $id := .Get "id" | default (.Get 0) }}
-{{ $class := .Get "class" | default (.Get 1) }}
-{{ $hasClass := $class }}
-{{ $class := $class | default "__h_youtube" }}
-{{ if not $hasClass }}
-{{/* If class is set, assume the user wants to provide his own styles. */}}
-{{ template "__h_simple_css" $ }}
-{{ end }}
-{{ $secondClass := "s_youtube_simple" }}
-<div class="{{ $secondClass }} {{ $class }}">
-{{ $tb := printf "//i.ytimg.com/vi/%s/" $id }}
-<a href="//youtube.com/watch?v={{ $id | safeHTMLAttr }}" target="_blank">
- <img src="{{ printf "%smaxresdefault.jpg" $tb }}" srcset="{{ printf "%shqdefault.jpg" $tb }} 1x {{ printf "%smaxresdefault.jpg" $tb }} 2x" alt="Video">
-<div class="play"><svg height="100%" version="1.1" viewBox="0 0 68 48" width="100%"><path class="ytp-large-play-button-bg" d="{{ template "__h_simple_icon_play" $ }}" fill="#212121" fill-opacity="0.8"></path><path d="M 45,24 27,14 27,34" fill="#fff"></path></svg></div></a></div>`},
+{{ end -}}
+`},
{`twitter_cards.html`, `{{- with $.Params.images -}}
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:image" content="{{ index . 0 | absURL }}"/>
diff --git a/tpl/tplimpl/embedded/templates/shortcodes/youtube.html b/tpl/tplimpl/embedded/templates/shortcodes/youtube.html
index bbb3fdd07..9ba38fa8c 100755
--- a/tpl/tplimpl/embedded/templates/shortcodes/youtube.html
+++ b/tpl/tplimpl/embedded/templates/shortcodes/youtube.html
@@ -1,13 +1,9 @@
{{- $pc := .Page.Site.Config.Privacy.YouTube -}}
{{- if not $pc.Disable -}}
{{- $ytHost := cond $pc.PrivacyEnhanced "www.youtube-nocookie.com" "www.youtube.com" -}}
-{{- if $pc.Simple -}}
-{{ template "_internal/shortcodes/youtube_simple.html" . }}
-{{- else -}}
{{- $id := .Get "id" | default (.Get 0) -}}
{{- $class := .Get "class" | default (.Get 1) }}
<div {{ with $class }}class="{{ . }}"{{ else }}style="position: relative; padding-bottom: 56.25%; padding-top: 30px; height: 0; overflow: hidden;"{{ end }}>
<iframe src="//{{ $ytHost }}/embed/{{ $id }}{{ with .Get "autoplay" }}{{ if eq . "true" }}?autoplay=1{{ end }}{{ end }}" {{ if not $class }}style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;" {{ end }}allowfullscreen frameborder="0" title="YouTube Video"></iframe>
</div>
-{{ end }}
-{{- end -}} \ No newline at end of file
+{{ end -}}
diff --git a/tpl/tplimpl/embedded/templates/shortcodes/youtube_simple.html b/tpl/tplimpl/embedded/templates/shortcodes/youtube_simple.html
deleted file mode 100644
index 641bd124b..000000000
--- a/tpl/tplimpl/embedded/templates/shortcodes/youtube_simple.html
+++ /dev/null
@@ -1,14 +0,0 @@
-{{ $id := .Get "id" | default (.Get 0) }}
-{{ $class := .Get "class" | default (.Get 1) }}
-{{ $hasClass := $class }}
-{{ $class := $class | default "__h_youtube" }}
-{{ if not $hasClass }}
-{{/* If class is set, assume the user wants to provide his own styles. */}}
-{{ template "__h_simple_css" $ }}
-{{ end }}
-{{ $secondClass := "s_youtube_simple" }}
-<div class="{{ $secondClass }} {{ $class }}">
-{{ $tb := printf "//i.ytimg.com/vi/%s/" $id }}
-<a href="//youtube.com/watch?v={{ $id | safeHTMLAttr }}" target="_blank">
- <img src="{{ printf "%smaxresdefault.jpg" $tb }}" srcset="{{ printf "%shqdefault.jpg" $tb }} 1x {{ printf "%smaxresdefault.jpg" $tb }} 2x" alt="Video">
-<div class="play"><svg height="100%" version="1.1" viewBox="0 0 68 48" width="100%"><path class="ytp-large-play-button-bg" d="{{ template "__h_simple_icon_play" $ }}" fill="#212121" fill-opacity="0.8"></path><path d="M 45,24 27,14 27,34" fill="#fff"></path></svg></div></a></div> \ No newline at end of file