mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2023-12-21 10:22:58 +01:00
Show Code Copy scripts only on Kind = page
This commit is contained in:
parent
17c4da86b5
commit
6c64ad0695
@ -17,7 +17,7 @@
|
|||||||
<main class="main">
|
<main class="main">
|
||||||
{{- block "main" . }}{{ end }}
|
{{- block "main" . }}{{ end }}
|
||||||
</main>
|
</main>
|
||||||
{{ partialCached "footer.html" . -}}
|
{{ partialCached "footer.html" . .Layout .Kind -}}
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
@ -85,7 +85,7 @@
|
|||||||
</script>
|
</script>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- if (not .Site.Params.disableCodeCopy) }}
|
{{- if (and (eq .Kind "page") (ne .Layout "archives") (ne .Layout "search") (not .Site.Params.disableCodeCopy)) }}
|
||||||
<script>
|
<script>
|
||||||
document.querySelectorAll('pre > code').forEach((codeblock) => {
|
document.querySelectorAll('pre > code').forEach((codeblock) => {
|
||||||
const container = codeblock.parentNode.parentNode;
|
const container = codeblock.parentNode.parentNode;
|
||||||
|
Loading…
Reference in New Issue
Block a user