mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-07-19 21:35:31 -04:00
simplify shortcode JS logic and only call AMP script if shortcodes present
fixes https://search.google.com/search-console/amp/drilldown?resource_id=sc-domain%3Ajarv.is&item_key=GgcIIhADKKZO&utm_source=wnc_10030322&utm_medium=gamma&utm_campaign=wnc_10030322&utm_content=msg_100058679&hl=en&sharing_key=VVX9zj1yTzUxHPzmKFP4Gg
This commit is contained in:
7
layouts/shortcodes/vimeo.html
Normal file
7
layouts/shortcodes/vimeo.html
Normal file
@@ -0,0 +1,7 @@
|
||||
<div class="embed vimeo" style="padding:75% 0 0 0;position:relative;">
|
||||
<iframe src="https://player.vimeo.com/video/{{ .Get "id" }}&dnt=1" style="position:absolute;top:0;left:0;width:100%;height:100%;" frameborder="0" allow="fullscreen" allowfullscreen></iframe>
|
||||
</div>
|
||||
|
||||
{{- define "__shortcode_vimeo_js" }}
|
||||
<script src="https://player.vimeo.com/api/player.js"></script>
|
||||
{{ end }}
|
Reference in New Issue
Block a user