[htdocs] schedule: move css to sep file

Message ID 20231230175127.2037-1-vapier@gentoo.org
State New
Headers
Series [htdocs] schedule: move css to sep file |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-arm fail Patch failed to apply
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 fail Patch failed to apply

Commit Message

Mike Frysinger Dec. 30, 2023, 5:51 p.m. UTC
  The sourceware.org site is using CSP which blocks inline <style> tags.
Move it to a sep file so it loads & renders correctly.
---
 css/schedule.css    | 42 ++++++++++++++++++++++++++++++++++++++++++
 schedule/index.html | 43 ++-----------------------------------------
 2 files changed, 44 insertions(+), 41 deletions(-)
 create mode 100644 css/schedule.css
  

Patch

diff --git a/css/schedule.css b/css/schedule.css
new file mode 100644
index 000000000000..a5cc139bbe7e
--- /dev/null
+++ b/css/schedule.css
@@ -0,0 +1,42 @@ 
+@charset "utf-8";
+
+/**
+ * History columns (i.e. nth-child):
+ * 1 - Release
+ * 2 - Estimate
+ * 3 - Schedule
+ * 4 - Actual
+ * 5 - slip
+ * 6 - comment
+ */
+
+table#history {
+  /* Align the table in the center. */
+  margin-left: auto;
+  margin-right: auto;
+}
+
+table#history th {
+  padding-right: 0.5em;
+  vertical-align: middle;
+}
+
+/* For long comments that wrap, make sure the other columns are at the top.  */
+table#history tr {
+  vertical-align: top;
+}
+
+table#history td {
+  /* Make sure dates don't run together.  */
+  padding-right: 0.5em;
+  white-space: nowrap;
+}
+
+table#history tr > td:nth-child(5) {
+  text-align: center;
+}
+
+table#history tr > td:nth-child(6) {
+  text-align: left;
+  white-space: normal;
+}
diff --git a/schedule/index.html b/schedule/index.html
index 1c7f92bc2a2e..beb32cfa43e1 100644
--- a/schedule/index.html
+++ b/schedule/index.html
@@ -78,50 +78,11 @@  equivalent amount.
 
 <center><h3>Schedule History (approximate)</h3></center>
 
-<style>
-/**
- * History columns (i.e. nth-child):
- * 1 - Release
- * 2 - Estimate
- * 3 - Schedule
- * 4 - Actual
- * 5 - slip
- * 6 - comment
- */
-
-table#history {
-  /* Align the table in the center. */
-  margin-left: auto;
-  margin-right: auto;
-}
-
-table#history th {
-  padding-right: 0.5em;
-}
-
-/* For long comments that wrap, make sure the other columns are at the top.  */
-table#history tr {
-  vertical-align: top;
-}
-
-table#history td {
-  /* Make sure dates don't run together.  */
-  padding-right: 0.5em;
-  white-space: nowrap;
-}
-
-table#history tr > td:nth-child(5) {
-  text-align: center;
-}
-
-table#history tr > td:nth-child(6) {
-  text-align: left;
-  white-space: normal;
-}
-</style>
+<link rel="stylesheet" href="../css/schedule.css" />
 
 <table id=history>
 
+<!-- Keep columns in sync with the CSS -->
 <tr> <th>Release</th><th>Estimate</th><th>Schedule</th><th>Actual</th><th>Slip (months)</th><th align=left>Comment</th></tr>
 
 <tr>