From 60004e16cda0599e5789dc79e95d006f0c0a95b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20D=C3=ADaz=20Gonz=C3=A1lez?= Date: Mon, 28 Apr 2025 20:42:49 +0530 Subject: [PATCH] Load custom CSS In order to override Cockpit's default styling, another CSS file is loaded in every HTML page. It works, but as a workaround already discussed with upstream [1]. We will revert this patch when Cockpit provides better technique [2]. For now, it fulfills the requirements of [3]. [1] https://github.com/cockpit-project/cockpit/pull/17437 [2] https://github.com/cockpit-project/cockpit/issues/16359 [3] https://en.opensuse.org/openSUSE:ALP/Workgroups/SysMngmnt --- pkg/apps/index.html | 1 + pkg/kdump/index.html | 1 + pkg/metrics/index.html | 1 + pkg/networkmanager/firewall.html | 1 + pkg/networkmanager/index.html | 1 + pkg/packagekit/index.html | 1 + pkg/playground/index.html | 1 + pkg/playground/journal.html | 1 + pkg/playground/metrics.html | 1 + pkg/playground/plot.html | 1 + pkg/playground/react-patterns.html | 1 + pkg/playground/speed.html | 1 + pkg/playground/test.html | 1 + pkg/shell/index.html | 1 + pkg/shell/shell.html | 1 + pkg/sosreport/index.html | 1 + pkg/static/css-overrides.css | 12 ++++++++++++ pkg/systemd/hwinfo.html | 1 + pkg/systemd/index.html | 1 + pkg/systemd/logs.html | 1 + pkg/systemd/services.html | 1 + pkg/systemd/terminal.html | 1 + pkg/users/index.html | 1 + 23 files changed, 34 insertions(+) create mode 100644 pkg/static/css-overrides.css diff --git a/pkg/apps/index.html b/pkg/apps/index.html index fd17d5131..9aac50800 100644 --- a/pkg/apps/index.html +++ b/pkg/apps/index.html @@ -23,6 +23,7 @@ along with Cockpit; If not, see . Applications + diff --git a/pkg/kdump/index.html b/pkg/kdump/index.html index 8138f050f..619416dd4 100644 --- a/pkg/kdump/index.html +++ b/pkg/kdump/index.html @@ -25,6 +25,7 @@ along with Cockpit; If not, see . + diff --git a/pkg/metrics/index.html b/pkg/metrics/index.html index cbb82dccc..b17bd1a76 100644 --- a/pkg/metrics/index.html +++ b/pkg/metrics/index.html @@ -23,6 +23,7 @@ along with this package; If not, see . + diff --git a/pkg/networkmanager/firewall.html b/pkg/networkmanager/firewall.html index e5ea58276..6bc5327f5 100644 --- a/pkg/networkmanager/firewall.html +++ b/pkg/networkmanager/firewall.html @@ -23,6 +23,7 @@ along with Cockpit; If not, see . + diff --git a/pkg/networkmanager/index.html b/pkg/networkmanager/index.html index fc9cb5aff..3aceef1b2 100644 --- a/pkg/networkmanager/index.html +++ b/pkg/networkmanager/index.html @@ -24,6 +24,7 @@ + diff --git a/pkg/packagekit/index.html b/pkg/packagekit/index.html index c95dfd263..f4f3baab6 100644 --- a/pkg/packagekit/index.html +++ b/pkg/packagekit/index.html @@ -24,6 +24,7 @@ along with Cockpit; If not, see . + diff --git a/pkg/playground/index.html b/pkg/playground/index.html index 4f2bce82d..6f87bc642 100644 --- a/pkg/playground/index.html +++ b/pkg/playground/index.html @@ -5,6 +5,7 @@ Cockpit Development Playground + diff --git a/pkg/playground/journal.html b/pkg/playground/journal.html index 473537cb8..c1f10201f 100644 --- a/pkg/playground/journal.html +++ b/pkg/playground/journal.html @@ -5,6 +5,7 @@ Cockpit Journal Box + diff --git a/pkg/playground/metrics.html b/pkg/playground/metrics.html index d3485c344..bab3b4eb1 100644 --- a/pkg/playground/metrics.html +++ b/pkg/playground/metrics.html @@ -5,6 +5,7 @@ Cockpit Monitoring + diff --git a/pkg/playground/plot.html b/pkg/playground/plot.html index dae84c4b7..e1e8fa7dc 100644 --- a/pkg/playground/plot.html +++ b/pkg/playground/plot.html @@ -5,6 +5,7 @@ Cockpit Plots + diff --git a/pkg/playground/react-patterns.html b/pkg/playground/react-patterns.html index a220e0a51..437bd2e39 100644 --- a/pkg/playground/react-patterns.html +++ b/pkg/playground/react-patterns.html @@ -5,6 +5,7 @@ Cockpit React Patterns Usage + diff --git a/pkg/playground/speed.html b/pkg/playground/speed.html index 603c7341a..e89d111de 100644 --- a/pkg/playground/speed.html +++ b/pkg/playground/speed.html @@ -5,6 +5,7 @@ Cockpit Speed Tests + diff --git a/pkg/playground/test.html b/pkg/playground/test.html index 97a74791f..a2519cfd2 100644 --- a/pkg/playground/test.html +++ b/pkg/playground/test.html @@ -5,6 +5,7 @@ Cockpit playground + diff --git a/pkg/shell/index.html b/pkg/shell/index.html index 6dd5ad1ac..1c6f3512c 100644 --- a/pkg/shell/index.html +++ b/pkg/shell/index.html @@ -7,6 +7,7 @@ + diff --git a/pkg/shell/shell.html b/pkg/shell/shell.html index c9adf7ae2..97f088f7c 100644 --- a/pkg/shell/shell.html +++ b/pkg/shell/shell.html @@ -5,6 +5,7 @@ +
diff --git a/pkg/sosreport/index.html b/pkg/sosreport/index.html index e673383ad..224b42463 100644 --- a/pkg/sosreport/index.html +++ b/pkg/sosreport/index.html @@ -22,6 +22,7 @@ along with Cockpit; If not, see . Diagnostic reports + diff --git a/pkg/static/css-overrides.css b/pkg/static/css-overrides.css new file mode 100644 index 000000000..7481f7ecf --- /dev/null +++ b/pkg/static/css-overrides.css @@ -0,0 +1,12 @@ +/** + * PLEASE, DO NOT CHANGE THIS FILE. + * + * It is here to avoid 404 errors on openSUSE Cockpit patched version when no + * package for overriding the default style is installed. If a better + * alternative becomes available, it will be removed. + * + * To know more, please follow below links + * + * - https://github.com/cockpit-project/cockpit/pull/17437 + * - https://github.com/cockpit-project/cockpit/issues/16359 + */ diff --git a/pkg/systemd/hwinfo.html b/pkg/systemd/hwinfo.html index a3413faca..549b80298 100644 --- a/pkg/systemd/hwinfo.html +++ b/pkg/systemd/hwinfo.html @@ -4,6 +4,7 @@ Hardware information + diff --git a/pkg/systemd/index.html b/pkg/systemd/index.html index 91a268a4a..ee125fe65 100644 --- a/pkg/systemd/index.html +++ b/pkg/systemd/index.html @@ -6,6 +6,7 @@ + diff --git a/pkg/systemd/logs.html b/pkg/systemd/logs.html index f89f1fa47..5086ce1f6 100644 --- a/pkg/systemd/logs.html +++ b/pkg/systemd/logs.html @@ -23,6 +23,7 @@ along with Cockpit; If not, see . Journal + diff --git a/pkg/systemd/services.html b/pkg/systemd/services.html index 74fa456d4..e9c7047ee 100644 --- a/pkg/systemd/services.html +++ b/pkg/systemd/services.html @@ -5,6 +5,7 @@ + diff --git a/pkg/systemd/terminal.html b/pkg/systemd/terminal.html index ce7216e4e..63547f9d3 100644 --- a/pkg/systemd/terminal.html +++ b/pkg/systemd/terminal.html @@ -5,6 +5,7 @@ + diff --git a/pkg/users/index.html b/pkg/users/index.html index d26cf4781..b0c6ebf87 100644 --- a/pkg/users/index.html +++ b/pkg/users/index.html @@ -24,6 +24,7 @@ + -- 2.49.0