public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: cgen@sourceware.org
Subject: [PATCH htdocs] move css to sep file for CSP
Date: Sun, 24 Dec 2023 04:58:43 -0500	[thread overview]
Message-ID: <20231224095843.6543-1-vapier@gentoo.org> (raw)

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


                 reply	other threads:[~2023-12-24  9:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231224095843.6543-1-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=cgen@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).