mirror of
https://github.com/pi-hole/web.git
synced 2025-12-20 02:38:28 +00:00
Store value of pihole.webhome() in a globally available variable instead of calling pihole.webhome() multiple times
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
3
login.lp
3
login.lp
@@ -14,7 +14,7 @@ mg.include('scripts/lua/header.lp','r')
|
||||
<section style="padding: 15px;">
|
||||
<div class="login-logo">
|
||||
<div class="text-center">
|
||||
<img src="<?=pihole.webhome()?>img/logo.svg" alt="Pi-hole logo" class="loginpage-logo">
|
||||
<img src="<?=webhome?>img/logo.svg" alt="Pi-hole logo" class="loginpage-logo">
|
||||
</div>
|
||||
<div class="panel-title text-center"><span class="logo-lg" style="font-size: 25px;">Pi-<b>hole</b></span></div>
|
||||
</div>
|
||||
@@ -117,6 +117,7 @@ mg.include('scripts/lua/header.lp','r')
|
||||
<strong><a href="https://pi-hole.net/donate/" rel="noopener" target="_blank"><i class="fa fa-heart text-red"></i> Donate</a></strong> if you found this useful.
|
||||
</div>
|
||||
</div>
|
||||
<div id="webhome" style="display: none;"><?=webhome?></div>
|
||||
<div id="api-url" style="display: none;"><?=pihole.api_url()?></div>
|
||||
<script src="<?=pihole.fileversion('scripts/js/footer.js')?>"></script>
|
||||
<script src="<?=pihole.fileversion('scripts/js/login.js')?>"></script>
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
starttime = mg.time(true)
|
||||
hostname = pihole.hostname()
|
||||
webhome = pihole.webhome()
|
||||
theme = pihole.webtheme()
|
||||
|
||||
-- Get name of script by matching whatever is after the last "/" in the URI
|
||||
scriptname = mg.request_info.request_uri:match(webhome.."(.*)$")
|
||||
@@ -59,15 +60,14 @@ is_authenticated = mg.request_info.is_authenticated
|
||||
|
||||
<meta name="csrf-token" content="<?=mg.request_info.csrf_token?>">
|
||||
|
||||
<link rel="apple-touch-icon" href="<?=pihole.webhome()?>img/favicons/apple-touch-icon.png" sizes="180x180">
|
||||
<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">
|
||||
<? 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">
|
||||
<link rel="apple-touch-icon" href="<?=webhome?>img/favicons/apple-touch-icon.png" sizes="180x180">
|
||||
<link rel="icon" href="<?=webhome?>img/favicons/favicon-32x32.png" sizes="32x32" type="image/png">
|
||||
<link rel="icon" href="<?=webhome?>img/favicons/favicon-16x16.png" sizes="16x16" type="image/png">
|
||||
<link rel="manifest" href="<?=webhome?>img/favicons/manifest.json">
|
||||
<link rel="mask-icon" href="<?=webhome?>img/favicons/safari-pinned-tab.svg" color="<?=theme.color?>">
|
||||
<link rel="shortcut icon" href="<?=webhome?>img/favicons/favicon.ico">
|
||||
<meta name="msapplication-TileColor" content="<?=theme.color?>">
|
||||
<meta name="msapplication-TileImage" content="<?=pihole.webhome()?>img/favicons/mstile-150x150.png">
|
||||
<meta name="msapplication-TileImage" content="<?=webhome?>img/favicons/mstile-150x150.png">
|
||||
|
||||
<!-- Theme styles -->
|
||||
<meta name="theme-color" content="<?=theme.color?>">
|
||||
|
||||
@@ -39,7 +39,7 @@ mg.include('header.lp','r')
|
||||
<div class="wrapper">
|
||||
<header class="main-header">
|
||||
<!-- Logo -->
|
||||
<a href="<?=pihole.webhome()?>" class="logo">
|
||||
<a href="<?=webhome?>" class="logo">
|
||||
<!-- mini logo for sidebar mini 50x50 pixels -->
|
||||
<span class="logo-mini">P<strong>h</strong></span>
|
||||
<!-- logo for regular state and mobile devices -->
|
||||
@@ -68,7 +68,7 @@ mg.include('header.lp','r')
|
||||
<ul class="dropdown-menu">
|
||||
<!-- User image -->
|
||||
<li class="user-header">
|
||||
<img class="logo-img" src="<?=pihole.webhome()?>img/logo.svg" alt="Pi-hole Logo" style="border: 0" width="90" height="90">
|
||||
<img class="logo-img" src="<?=webhome?>img/logo.svg" alt="Pi-hole Logo" style="border: 0" width="90" height="90">
|
||||
<p>
|
||||
Open Source Ad Blocker
|
||||
</p>
|
||||
@@ -78,7 +78,7 @@ mg.include('header.lp','r')
|
||||
<!-- Menu Footer -->
|
||||
<li class="user-footer">
|
||||
<a class="btn-link" href="https://pi-hole.net/" rel="noopener" target="_blank">
|
||||
<svg class="svg-inline--fa fa-fw menu-icon" style="height: 1.25em"><use xlink:href="<?=pihole.webhome()?>img/pihole_icon.svg#pihole-svg-logo"/></svg>
|
||||
<svg class="svg-inline--fa fa-fw menu-icon" style="height: 1.25em"><use xlink:href="<?=webhome?>img/pihole_icon.svg#pihole-svg-logo"/></svg>
|
||||
Pi-hole Website
|
||||
</a>
|
||||
<hr>
|
||||
|
||||
Reference in New Issue
Block a user