mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2023-12-21 10:22:58 +01:00
footer: mv hljs initialiser with resource
* hinders linter
This commit is contained in:
parent
05035121ff
commit
2cb5c9dad5
@ -14,6 +14,7 @@
|
|||||||
{{if in site.Params.mainSections .Type }}
|
{{if in site.Params.mainSections .Type }}
|
||||||
{{ $highlight := resources.Get "js/highlight.min.js" | minify | fingerprint}}
|
{{ $highlight := resources.Get "js/highlight.min.js" | minify | fingerprint}}
|
||||||
<script src="{{ $highlight.Permalink }}" integrity="{{ $highlight.Data.Integrity }}"></script>
|
<script src="{{ $highlight.Permalink }}" integrity="{{ $highlight.Data.Integrity }}"></script>
|
||||||
|
<script>hljs.initHighlightingOnLoad();</script>
|
||||||
{{end }}
|
{{end }}
|
||||||
<script>
|
<script>
|
||||||
window.onload = function () {
|
window.onload = function () {
|
||||||
@ -21,9 +22,6 @@
|
|||||||
document.getElementById('menu').scrollLeft = localStorage.getItem("menu-scroll-position");
|
document.getElementById('menu').scrollLeft = localStorage.getItem("menu-scroll-position");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
{{if in site.Params.mainSections .Type }}
|
|
||||||
hljs.initHighlightingOnLoad();
|
|
||||||
{{end }}
|
|
||||||
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
|
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
|
||||||
anchor.addEventListener("click", function (e) {
|
anchor.addEventListener("click", function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
Loading…
Reference in New Issue
Block a user