From a5af15cfe9f1185c24d5d8ee3eb0e4b6bbacfeb5 Mon Sep 17 00:00:00 2001
From: Andrew Dolgov <noreply@fakecake.org>
Date: Fri, 9 Apr 2021 13:45:25 +0300
Subject: [PATCH] fix noscript notifications

---
 index.php | 16 ++++++++++++++--
 prefs.php | 14 +++++++++++++-
 2 files changed, 27 insertions(+), 3 deletions(-)

diff --git a/index.php b/index.php
index 5452fcb4e..b602042bd 100644
--- a/index.php
+++ b/index.php
@@ -110,19 +110,31 @@
 		}
 	</style>
 
+	<noscript>
+		<?= stylesheet_tag("themes/light.css") ?>
+
+		<style type="text/css">
+			body.css_loading noscript {
+				display : block;
+				margin : 16px;
+			}
+		</style>
+	</noscript>
+
 	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
 	<meta name="referrer" content="no-referrer"/>
 </head>
 
 <body class="flat ttrss_main ttrss_index css_loading">
 
-<div id="overlay" style="display : block">
+<noscript class="alert alert-error"><?= ('Javascript is disabled. Please enable it.') ?></noscript>
+
+<div id="overlay">
 	<div id="overlay_inner">
 		<?= __("Loading, please wait...") ?>
 		<div dojoType="dijit.ProgressBar" places="0" style="width : 300px" id="loading_bar"
 	     progress="0" maximum="100">
 		</div>
-		<noscript><br/><?php print_error('Javascript is disabled. Please enable it.') ?></noscript>
 	</div>
 </div>
 
diff --git a/prefs.php b/prefs.php
index 982726740..14820f707 100644
--- a/prefs.php
+++ b/prefs.php
@@ -93,11 +93,24 @@
 		}
 	</style>
 
+	<noscript>
+		<style type="text/css">
+			body.css_loading noscript {
+				display : block;
+				margin : 16px;
+			}
+		</style>
+
+		<?= stylesheet_tag("themes/light.css") ?>
+	</noscript>
+
 	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
 </head>
 
 <body class="flat ttrss_main ttrss_prefs css_loading">
 
+<noscript class="alert alert-error"><?= ('Javascript is disabled. Please enable it.') ?></noscript>
+
 <div id="notify" class="notify"></div>
 <div id="cmdline" style="display : none"></div>
 
@@ -107,7 +120,6 @@
 		<div dojoType="dijit.ProgressBar" places="0" style="width : 300px" id="loading_bar"
 	     progress="0" maximum="100">
 		</div>
-		<noscript><br/><?php print_error('Javascript is disabled. Please enable it.') ?></noscript>
 	</div>
 </div>
 
-- 
GitLab