index template: make it easier to use the auto theme per default

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

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by:  Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Stefan Sterz 2023-03-14 15:02:02 +01:00 committed by Thomas Lamprecht
parent cf70fa9638
commit a4ec8f2cf5

View File

@ -13,11 +13,11 @@
<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 -%]
[% IF langfile %]