mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-10 13:54:47 -04:00
Remove JS and CSS that prevents FOUC with client side math rendering
This commit is contained in:
parent
63d9dd876d
commit
18d09235ef
@ -106,9 +106,7 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body
|
<body
|
||||||
class="ma0 sans-serif bg-primary-color-light{{ with getenv "HUGO_ENV" }}
|
class="ma0 sans-serif bg-primary-color-light{{ with getenv "HUGO_ENV" }}{{ . }}{{ end }}">
|
||||||
{{ . }}
|
|
||||||
{{ end }} {{ if $hasMath }}{{ print " dn" }}{{ end }}">
|
|
||||||
{{ partial "hooks/after-body-start.html" . }}
|
{{ partial "hooks/after-body-start.html" . }}
|
||||||
{{ block "nav" . }}{{ partial "site-nav.html" . }}{{ end }}
|
{{ block "nav" . }}{{ partial "site-nav.html" . }}{{ end }}
|
||||||
{{ block "header" . }}{{ end }}
|
{{ block "header" . }}{{ end }}
|
||||||
|
@ -2,15 +2,8 @@
|
|||||||
<script>
|
<script>
|
||||||
MathJax = {
|
MathJax = {
|
||||||
tex: {
|
tex: {
|
||||||
inlineMath: [['$', '$'], ['\\(', '\\)']], // inline
|
displayMath: [['\\[', '\\]'], ['$$', '$$']], // block
|
||||||
displayMath: [['$$', '$$'], ['\\[', '\\]']] // block
|
inlineMath: [['\\(', '\\)']] // inline
|
||||||
},
|
|
||||||
startup: {
|
|
||||||
pageReady: () => {
|
|
||||||
return MathJax.startup.defaultPageReady().then(() => {
|
|
||||||
document.body.classList.remove("dn");
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user