Merge pull request #47376 from dipesh-rawat/cleanup-click-to-zoom
Refactor click-to-zoom option in figure shortcode to align with vanilla Docsypull/47381/head
commit
b469956848
|
@ -91,11 +91,6 @@
|
|||
<script defer src="{{ "js/release_binaries.js" | relURL }}"></script>
|
||||
{{- end -}}
|
||||
|
||||
<!-- Enable zoom-on-click for figures that opt in to this -->
|
||||
{{- if .HasShortcode "figure" -}}
|
||||
<script defer src="{{ "js/zoom.js" | relURL }}"></script>
|
||||
{{- end -}}
|
||||
|
||||
{{- if eq (lower .Params.cid) "community" -}}
|
||||
{{- if eq .Params.community_styles_migrated true -}}
|
||||
<link href="/css/community.css" rel="stylesheet"><!-- legacy styles -->
|
||||
|
|
|
@ -13,3 +13,14 @@
|
|||
{{- if .HasShortcode "cncf-landscape" -}}
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/4.3.9/iframeResizer.min.js" integrity="sha384-hHTwgxzjpO1G1NI0wMHWQYUxnGtpWyDjVSZrFnDrlWa5OL+DFY57qnDWw/5WSJOl" crossorigin="anonymous"></script>
|
||||
{{- end -}}
|
||||
|
||||
{{- if .HasShortcode "figure" -}}
|
||||
<!-- Enable zoom-on-click for figures that opt in to this -->
|
||||
{{- if hugo.IsProduction -}}
|
||||
{{- $zoomJs := resources.Get "js/zoom.js" | minify | fingerprint -}}
|
||||
<script defer src="{{ $zoomJs.RelPermalink }}" integrity="{{ $zoomJs.Data.Integrity }}" crossorigin="anonymous"></script>
|
||||
{{- else -}}
|
||||
{{- $zoomJs := resources.Get "js/zoom.js" -}}
|
||||
<script defer src="{{ $zoomJs.RelPermalink }}"></script>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
Loading…
Reference in New Issue