Remove JS and CSS that prevents FOUC with client side math rendering

This commit is contained in:
Joe Mooring 2024-11-04 19:59:05 -08:00 committed by GitHub
parent 63d9dd876d
commit 18d09235ef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 12 deletions

View File

@ -106,9 +106,7 @@
</head>
<body
class="ma0 sans-serif bg-primary-color-light{{ with getenv "HUGO_ENV" }}
{{ . }}
{{ end }} {{ if $hasMath }}{{ print " dn" }}{{ end }}">
class="ma0 sans-serif bg-primary-color-light{{ with getenv "HUGO_ENV" }}{{ . }}{{ end }}">
{{ partial "hooks/after-body-start.html" . }}
{{ block "nav" . }}{{ partial "site-nav.html" . }}{{ end }}
{{ block "header" . }}{{ end }}

View File

@ -2,15 +2,8 @@
<script>
MathJax = {
tex: {
inlineMath: [['$', '$'], ['\\(', '\\)']], // inline
displayMath: [['$$', '$$'], ['\\[', '\\]']] // block
},
startup: {
pageReady: () => {
return MathJax.startup.defaultPageReady().then(() => {
document.body.classList.remove("dn");
});
}
displayMath: [['\\[', '\\]'], ['$$', '$$']], // block
inlineMath: [['\\(', '\\)']] // inline
}
};
</script>