[pmg-devel] [PATCH pmg-gui 2/2] index template: make it easier to use the auto theme per default

Stefan Sterz s.sterz at proxmox.com
Tue Mar 14 15:02:02 CET 2023


adapt the main template so the proxy can use the "auto" theme per
default more easily.

Signed-off-by: Stefan Sterz <s.sterz at proxmox.com>
---
 pmg-index.html.tt | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/pmg-index.html.tt b/pmg-index.html.tt
index 12c18d3..9ffd3bb 100644
--- a/pmg-index.html.tt
+++ b/pmg-index.html.tt
@@ -13,13 +13,13 @@
     <link rel="stylesheet" type="text/css" href="/fontawesome/css/font-awesome.css" />
     <link rel="stylesheet" type="text/css" href="/pve2/css/ext6-pmg.css?ver=[% version %]" />
     <link rel="stylesheet" type="text/css" href="/pwt/css/ext6-pmx.css?ver=[% wtversion %]" />
-    [%- IF theme %]
-      [%- IF theme == 'auto' %]
-    <link rel="stylesheet" type="text/css" media="(prefers-color-scheme: dark)" href="/pwt/themes/theme-proxmox-dark.css?ver=[% wtversion %]" />
-      [%- ELSE %]
+    [%- IF theme != 'crisp' %]
+      [%- IF theme != 'auto' %]
     <link rel="stylesheet" type="text/css" href="/pwt/themes/theme-[% theme %].css?ver=[% wtversion %]" />
+      [%- ELSE %]
+    <link rel="stylesheet" type="text/css" media="(prefers-color-scheme: dark)" href="/pwt/themes/theme-proxmox-dark.css?ver=[% wtversion %]" />
       [%- END -%]
-    [%- END -%]  
+    [%- END -%]
     [% IF langfile %]
     <script type='text/javascript' src='/pve2/locale/pmg-lang-[% lang %].js'></script>
     [% ELSE %]
-- 
2.30.2





More information about the pmg-devel mailing list