* [PATCH htdocs] move css to sep file for CSP
@ 2023-12-24 9:58 Mike Frysinger
0 siblings, 0 replies; only message in thread
From: Mike Frysinger @ 2023-12-24 9:58 UTC (permalink / raw)
To: cgen
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-12-24 9:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-24 9:58 [PATCH htdocs] move css to sep file for CSP Mike Frysinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).