Remove theme.lua, source everything there is to know through Lua instead (pihole.webtheme() now returns a full table)

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2023-09-26 09:55:31 +02:00
parent ab0fa4ef7c
commit b5feb9e031
3 changed files with 4 additions and 61 deletions

View File

@@ -64,7 +64,7 @@ is_authenticated = mg.request_info.is_authenticated
<link rel="icon" href="<?=pihole.webhome()?>img/favicons/favicon-32x32.png" sizes="32x32" type="image/png">
<link rel="icon" href="<?=pihole.webhome()?>img/favicons/favicon-16x16.png" sizes="16x16" type="image/png">
<link rel="manifest" href="<?=pihole.webhome()?>img/favicons/manifest.json">
<? pihole.include('scripts/pi-hole/lua/theme.lua') ?>
<? theme = pihole.webtheme() ?>
<link rel="mask-icon" href="<?=pihole.webhome()?>img/favicons/safari-pinned-tab.svg" color="<?=theme.color?>">
<link rel="shortcut icon" href="<?=pihole.webhome()?>img/favicons/favicon.ico">
<meta name="msapplication-TileColor" content="<?=theme.color?>">
@@ -80,7 +80,7 @@ is_authenticated = mg.request_info.is_authenticated
<? end ?>
<!-- Theme fonts -->
<? if pihole.webtheme() == 'lcars' then ?>
<? if theme.name == 'lcars' then ?>
<link rel="stylesheet" href="<?=pihole.fileversion('style/vendor/fonts/ubuntu-mono/ubuntu-mono.css')?>">
<link rel="stylesheet" href="<?=pihole.fileversion('style/vendor/fonts/antonio/antonio.css')?>">
<? else ?>
@@ -107,7 +107,7 @@ if startsWith(scriptname, 'groups') then
<!-- Theme styles -->
<link rel="stylesheet" href="<?=pihole.fileversion('style/pi-hole.css')?>">
<link rel="stylesheet" href="<?=pihole.fileversion('style/themes/'..pihole.webtheme()..'.css')?>">
<link rel="stylesheet" href="<?=pihole.fileversion('style/themes/'..theme.name..'.css')?>">
<noscript><link rel="stylesheet" href="<?=pihole.fileversion('style/vendor/js-warn.css')?>"></noscript>