Skip to content

Commit

Permalink
Remove theme.lua, source everything there is to know through Lua inst…
Browse files Browse the repository at this point in the history
…ead (pihole.webtheme() now returns a full table)

Signed-off-by: DL6ER <[email protected]>
  • Loading branch information
DL6ER committed Sep 26, 2023
1 parent ab0fa4e commit b5feb9e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 61 deletions.
6 changes: 3 additions & 3 deletions scripts/pi-hole/lua/header.lp
Original file line number Diff line number Diff line change
Expand Up @@ -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?>">
Expand All @@ -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 ?>
Expand All @@ -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>

Expand Down
2 changes: 1 addition & 1 deletion scripts/pi-hole/lua/header_authenticated.lp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ mg.include('header.lp','r')
<script src="<?=pihole.fileversion('scripts/vendor/chart.min.js')?>"></script>
<script src="<?=pihole.fileversion('scripts/vendor/chartjs-adapter-moment.js')?>"></script>
</head>
<body class="<?=pihole.webtheme()?> hold-transition sidebar-mini <? if pihole.boxedlayout() then ?>layout-boxed<? end ?> logged-in">
<body class="<?=theme.name?> hold-transition sidebar-mini <? if pihole.boxedlayout() then ?>layout-boxed<? end ?> logged-in">
<noscript>
<!-- JS Warning -->
<div>
Expand Down
57 changes: 0 additions & 57 deletions scripts/pi-hole/lua/theme.lua

This file was deleted.

0 comments on commit b5feb9e

Please sign in to comment.