mirror of
https://github.com/ruisaraiva19/favycon.git
synced 2026-09-12 11:40:34 +05:00
fix: remove initial background flash
This commit is contained in:
parent
37a1af5f35
commit
a2d70d783f
@ -4,13 +4,13 @@ import Document, { Html, Head, Main, NextScript } from 'next/document'
|
||||
class MyDocument extends Document {
|
||||
render() {
|
||||
return (
|
||||
<Html lang="en">
|
||||
<Html lang="en" className="preload">
|
||||
<Head />
|
||||
<body className="preload">
|
||||
<script src="/js/noflash.js" />
|
||||
<body>
|
||||
<script src="/js/noflash.js?v1" />
|
||||
<Main />
|
||||
<NextScript />
|
||||
<script src="/js/onload.js" />
|
||||
<script src="/js/onload.js?v1" />
|
||||
</body>
|
||||
</Html>
|
||||
)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
;(function () {
|
||||
window.addEventListener('load', function () {
|
||||
document.body.classList.remove('preload')
|
||||
document.documentElement.classList.remove('preload')
|
||||
})
|
||||
})()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user