diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index 662fd2f..d78a2ee 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -91,133 +91,6 @@
{{- end }}
-{{- if (and (eq .Kind "page") (ne .Layout "archives") (ne .Layout "search") (.Param "ShowCodeCopyButtons")) }}
-
-{{- end }}
-
-
-
-
-
{{- /* Base64Email */}}
{{- if (.Param "MaskedEmail") }}
{{- end -}}
-{{- if (.Param "EnableImageZoom") }}
+
+{{/* Clear ToC Scroll */}}
+
+
+{{/* Load mediumZoom script */}}
+{{/* It has to be loaded here because of the data-no-instant attribute */}}
{{- $imagezoom := resources.Get "js/medium-zoom.min.js" }}
-
-{{- end }}
-{{- if not (.Param "noComments") }}
-{{ partial "comments_js.html" . }}
-{{ end }}
+{{- if .IsPage }}
+ {{- partial "page_footer.html" . }}
+{{- else }}
+{{- end}}
{{- /* Search */}}
{{- if (eq .Layout `search`) -}}
diff --git a/layouts/partials/page_footer.html b/layouts/partials/page_footer.html
new file mode 100644
index 0000000..7420ec9
--- /dev/null
+++ b/layouts/partials/page_footer.html
@@ -0,0 +1,127 @@
+
+{{- if (and (eq .Kind "page") (ne .Layout "archives") (ne .Layout "search") (.Param "ShowCodeCopyButtons")) }}
+
+{{- end }}
+
+
+
+{{/* ToC Scroll */}}
+
+
+{{- if (.Param "EnableImageZoom") }}
+
+{{- end }}
+
+{{- if not (.Param "noComments") }}
+{{ partial "comments_js.html" . }}
+{{ end }}