Compare commits

...

2 Commits

Author SHA1 Message Date
649b8a0da4 fix: Prevent React app flash by hiding static content with display: none
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
2026-01-02 20:52:07 +00:00
407c995d9f fix: Prevent content and dark mode background flashes on load
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
2026-01-02 20:44:10 +00:00

View File

@@ -30,7 +30,11 @@
--> -->
<title>{{ title }}</title> <title>{{ title }}</title>
<script>document.documentElement.className = 'js-enabled';</script>
<style> <style>
.js-enabled .static-content {
display: none;
}
html { html {
overflow-y: scroll; overflow-y: scroll;
} }
@@ -41,7 +45,20 @@
</head> </head>
<body> <body>
<script>
(function() {
try {
var theme = localStorage.getItem('theme');
if (theme === 'dark') {
document.body.style.backgroundColor = '#1a1a1a';
} else if (theme === 'black' || theme === 'red') {
document.body.style.backgroundColor = '#000';
}
} catch (e) {}
})();
</script>
<div id="root"> <div id="root">
<div class="static-content">
<div class="container menu"> <div class="container menu">
<p> <p>
<a href="/">QotNews</a> <a href="/">QotNews</a>
@@ -134,6 +151,7 @@
</div> </div>
{% endif %} {% endif %}
</div> </div>
</div>
<!-- <!--
This HTML file is a template. This HTML file is a template.
If you open it directly in the browser, you will see an empty page. If you open it directly in the browser, you will see an empty page.