Skip to content

Commit

Permalink
Simplify theme handling (#2718)
Browse files Browse the repository at this point in the history
  • Loading branch information
DL6ER authored Sep 29, 2023
2 parents 7121404 + b5feb9e commit 6bf3d09
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 6bf3d09

Please sign in to comment.