[PATCH htdocs] move css to sep file for CSP

Mike Frysinger via Cgen <[email protected]> Sun, 24 Dec 2023 04:58:43 -0500
Newsgroups gmane.comp.tools.cgen.devel
Message-ID <[email protected]>
Seems like sourceware.org has a CSP which disables inline stylesheets.
Switch to an external file like other sourceware projects.
---
 cgen.css   | 17 +++++++++++++++++
 index.html | 19 +------------------
 2 files changed, 18 insertions(+), 18 deletions(-)
 create mode 100644 cgen.css

diff --git a/cgen.css b/cgen.css
new file mode 100644
index 000000000000..96d564afa2c4
--- /dev/null
+++ b/cgen.css
@@ -0,0 +1,17 @@
+@charset "utf-8";
+
+body {
+  background-color: white;
+  color: black;
+}
+
+@media (prefers-color-scheme: dark) {
+  body {
+    background-color: #333;
+    color: #FFF;
+  }
+
+  a:link {
+    color: #8CB4FF;
+  }
+}
diff --git a/index.html b/index.html
index f743c05e19a4..9da7b4279af8 100644
--- a/index.html
+++ b/index.html
@@ -2,24 +2,7 @@
 <head>
 <title>CGEN</title>
 <meta name="viewport" content="width=device-width, initial-scale=1.0">
-
-<style type="text/css"><!--
-body {
-  background-color: white;
-  color: black;
-}
-
-@media (prefers-color-scheme: dark) {
-  body {
-    background-color: #333;
-    color: #FFF;
-  }
-
-  a:link {
-    color: #8CB4FF;
-  }
-}
---></style>
+<link rel="stylesheet" href="cgen.css" />
 </head>
 <body>
 
-- 
2.43.0