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> </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 }}

View File

@ -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>