Fix/tweak blocking page

* fix favicon
* add meta charset
* add html lang
* add a page title
* remove unneeded html end tags
* fix viewport tag to allow zooming
* compress the "blocked by Pi-hole" SVG
* remove trailing spaces
* switch to double colon pseudo elements (works from IE9 and newer)
* add missing vendor prefixes
* other minor tweaks
* add `Access-Control-Allow-Origin` header to all font types

Signed-off-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
XhmikosR 2020-05-22 15:28:32 +03:00
parent c73001f392
commit d90313fe4d
4 changed files with 137 additions and 104 deletions

View file

@ -6,45 +6,46 @@
* Please see LICENSE file for your rights under this license. */ * Please see LICENSE file for your rights under this license. */
/* Text Customisation Options ======> */ /* Text Customisation Options ======> */
.title:before { content: "Website Blocked"; } .title::before { content: "Website Blocked"; }
.altBtn:before { content: "Why am I here?"; } .altBtn::before { content: "Why am I here?"; }
.linkPH:before { content: "About Pi-hole"; } .linkPH::before { content: "About Pi-hole"; }
.linkEmail:before { content: "Contact Admin"; } .linkEmail::before { content: "Contact Admin"; }
#bpOutput.add:before { content: "Info"; } #bpOutput.add::before { content: "Info"; }
#bpOutput.add:after { content: "The domain is being whitelisted..."; } #bpOutput.add::after { content: "The domain is being whitelisted..."; }
#bpOutput.error:before, .unhandled:before { content: "Error"; } #bpOutput.error::before, .unhandled::before { content: "Error"; }
#bpOutput.unhandled:after { content: "An unhandled exception occurred. This may happen when your browser is unable to load jQuery, or when the webserver is denying access to the Pi-hole API."; } #bpOutput.unhandled::after { content: "An unhandled exception occurred. This may happen when your browser is unable to load jQuery, or when the webserver is denying access to the Pi-hole API."; }
#bpOutput.success:before { content: "Success"; } #bpOutput.success::before { content: "Success"; }
#bpOutput.success:after { content: "Website has been whitelisted! You may need to flush your DNS cache"; } #bpOutput.success::after { content: "Website has been whitelisted! You may need to flush your DNS cache"; }
.recentwl:before { content: "This site has been whitelisted. Please flush your DNS cache and/or restart your browser."; } .recentwl::before { content: "This site has been whitelisted. Please flush your DNS cache and/or restart your browser."; }
.unknown:before { content: "This website is not found in any of Pi-hole's blacklists. The reason you have arrived here is unknown."; } .unknown::before { content: "This website is not found in any of Pi-hole's blacklists. The reason you have arrived here is unknown."; }
.cname:before { content: "This site is an alias for "; } /* <a href="http://cname.com">cname.com</a> */ .cname::before { content: "This site is an alias for "; } /* <a href="http://cname.com">cname.com</a> */
.cname:after { content: ", which may be blocked by Pi-hole."; } .cname::after { content: ", which may be blocked by Pi-hole."; }
.blacklist:before { content: "Manually Blacklisted"; } .blacklist::before { content: "Manually Blacklisted"; }
.wildcard:before { content: "Manually Blacklisted by Wildcard"; } .wildcard::before { content: "Manually Blacklisted by Wildcard"; }
.noblock:before { content: "Not found on any Blacklist"; } .noblock::before { content: "Not found on any Blacklist"; }
#bpBlock:before { content: "Access to the following website has been denied:"; } #bpBlock::before { content: "Access to the following website has been denied:"; }
#bpFlag:before { content: "This is primarily due to being flagged as:"; } #bpFlag::before { content: "This is primarily due to being flagged as:"; }
#bpHelpTxt:before { content: "If you have an ongoing use for this website, please "; } #bpHelpTxt::before { content: "If you have an ongoing use for this website, please "; }
#bpHelpTxt a:before, #bpHelpTxt span:before { content: "ask the administrator"; } #bpHelpTxt a::before, #bpHelpTxt span::before { content: "ask the administrator"; }
#bpHelpTxt:after{ content: " of the Pi-hole on this network to have it whitelisted"; } #bpHelpTxt::after{ content: " of the Pi-hole on this network to have it whitelisted"; }
#bpBack:before { content: "Back to safety"; } #bpBack::before { content: "Back to safety"; }
#bpInfo:before { content: "Technical Info"; } #bpInfo::before { content: "Technical Info"; }
#bpFoundIn:before { content: "This site is found in "; } #bpFoundIn::before { content: "This site is found in "; }
#bpFoundIn span:after { content: " of "; } #bpFoundIn span::after { content: " of "; }
#bpFoundIn:after { content: " lists:"; } #bpFoundIn::after { content: " lists:"; }
#bpWhitelist:before { content: "Whitelist"; } #bpWhitelist::before { content: "Whitelist"; }
footer span:before { content: "Page generated on "; } footer span::before { content: "Page generated on "; }
/* Hide whitelisting form entirely */ /* Hide whitelisting form entirely */
/* #bpWLButtons { display: none; } */ /* #bpWLButtons { display: none; } */
/* Text Customisation Options <=============================== */ /* Text Customisation Options <=============================== */
/* http://necolas.github.io/normalize.css ======> */ /* http://necolas.github.io/normalize.css ======> */
@ -98,7 +99,7 @@ html { font-size: 62.5%; }
a { color: #3c8dbc; text-decoration: none; } a { color: #3c8dbc; text-decoration: none; }
a:hover { color: #72afda; text-decoration: underline; } a:hover { color: #72afda; text-decoration: underline; }
b { color: rgb(68,68,68); } b { color: rgb(68, 68, 68); }
p { margin: 0; } p { margin: 0; }
label, .buttons a { label, .buttons a {
@ -120,14 +121,20 @@ textarea, input, button { outline: none; }
font-family: "Source Sans Pro"; font-family: "Source Sans Pro";
font-style: normal; font-style: normal;
font-weight: 400; font-weight: 400;
src: local("Source Sans Pro"), local("SourceSansPro-Regular"), url("/admin/style/vendor/SourceSansPro/SourceSansPro-Regular.ttf") format("truetype"); font-display: swap;
src: local("Source Sans Pro Regular"), local("SourceSansPro-Regular"),
url("/admin/style/vendor/SourceSansPro/source-sans-pro-v13-latin-regular.woff2") format("woff2"),
url("/admin/style/vendor/SourceSansPro/source-sans-pro-v13-latin-regular.woff") format("woff");
} }
@font-face { @font-face {
font-family: "Source Sans Pro"; font-family: "Source Sans Pro";
font-style: normal; font-style: normal;
font-weight: 700; font-weight: 700;
src: local("Source Sans Pro Bold"), local("SourceSansPro-Bold"), url("/admin/style/vendor/SourceSansPro/SourceSansPro-Bold.ttf") format("truetype"); font-display: swap;
src: local("Source Sans Pro Bold"), local("SourceSansPro-Bold"),
url("/admin/style/vendor/SourceSansPro/source-sans-pro-v13-latin-700.woff2") format("woff2"),
url("/admin/style/vendor/SourceSansPro/source-sans-pro-v13-latin-700.woff") format("woff");
} }
body { body {
@ -138,14 +145,14 @@ body {
} }
/* User is greeted with a splash page when browsing to Pi-hole IP address */ /* User is greeted with a splash page when browsing to Pi-hole IP address */
#splashpage { background: #222; color: rgba(255,255,255,0.7); text-align: center; } #splashpage { background: #222; color: rgba(255, 255, 255, 0.7); text-align: center; }
#splashpage img { margin: 5px; width: 256px; } #splashpage img { margin: 5px; width: 256px; }
#splashpage b { color: inherit; } #splashpage b { color: inherit; }
#bpWrapper { #bpWrapper {
margin: 0 auto; margin: 0 auto;
max-width: 1250px; max-width: 1250px;
box-shadow: 0 0 8px rgba(0,0,0,0.5); box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
} }
header { header {
@ -164,15 +171,15 @@ header h1, header h1 a, header .spc, header #bpAlt label {
} }
h1 a { h1 a {
background-color: rgba(0,0,0,0.1); background-color: rgba(0, 0, 0, 0.1);
font-family: "Helvetica Neue", Helvetica, Arial ,sans-serif; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 2rem; font-size: 2rem;
font-weight: normal; font-weight: 400;
min-width: 230px; min-width: 230px;
text-align: center; text-align: center;
} }
h1 a:hover, header #bpAlt:hover { background-color: rgba(0,0,0,0.12); color: inherit; text-decoration: none; } h1 a:hover, header #bpAlt:hover { background-color: rgba(0, 0, 0, 0.12); color: inherit; text-decoration: none; }
header .spc { width: 100%; } header .spc { width: 100%; }
@ -183,10 +190,11 @@ header #bpAlt label {
text-indent: 30px; text-indent: 30px;
} }
[type=checkbox][id$="Toggle"] { display: none; } [type="checkbox"][id$="Toggle"] { display: none; }
[type=checkbox][id$="Toggle"]:checked ~ #bpAbout, [type="checkbox"][id$="Toggle"]:checked ~ #bpAbout,
[type=checkbox][id$="Toggle"]:checked ~ #bpMoreInfo { [type="checkbox"][id$="Toggle"]:checked ~ #bpMoreInfo {
display: block; } display: block;
}
/* Click anywhere else on screen to hide #bpAbout */ /* Click anywhere else on screen to hide #bpAbout */
#bpAboutToggle:checked { #bpAboutToggle:checked {
@ -203,9 +211,9 @@ header #bpAlt label {
#bpAbout { #bpAbout {
background: #3c8dbc; background: #3c8dbc;
border-bottom-left-radius: 5px; border-bottom-left-radius: 5px;
border: 1px solid #FFF; border: 1px solid #fff;
border-right-width: 0; border-right-width: 0;
box-shadow: -1px 1px 1px rgba(0,0,0,0.12); box-shadow: -1px 1px 1px rgba(0, 0, 0, 0.12);
box-sizing: border-box; box-sizing: border-box;
display: none; display: none;
font-size: 1.7rem; font-size: 1.7rem;
@ -218,7 +226,7 @@ header #bpAlt label {
.aboutPH { .aboutPH {
box-sizing: border-box; box-sizing: border-box;
color: rgba(255,255,255,0.8); color: rgba(255, 255, 255, 0.8);
display: block; display: block;
padding: 10px; padding: 10px;
width: 100%; width: 100%;
@ -261,7 +269,7 @@ main {
#bpOutput { #bpOutput {
background: #00c0ef; background: #00c0ef;
border-radius: 3px; border-radius: 3px;
border: 1px solid rgba(0,0,0,0.1); border: 1px solid rgba(0, 0, 0, 0.1);
color: #fff; color: #fff;
font-size: 1.4rem; font-size: 1.4rem;
margin-bottom: 10px; margin-bottom: 10px;
@ -269,8 +277,8 @@ main {
padding: 15px; padding: 15px;
} }
#bpOutput:before { #bpOutput::before {
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='14' viewBox='0 0 7 14'%3E%3Cpath fill='%23fff' d='M6,11a1.371,1.371,0,0,1,1,1v1a1.371,1.371,0,0,1-1,1H1a1.371,1.371,0,0,1-1-1V12a1.371,1.371,0,0,1,1-1H2V8H1A1.371,1.371,0,0,1,0,7V6A1.371,1.371,0,0,1,1,5H4A1.371,1.371,0,0,1,5,6v5H6ZM3.5,0A1.5,1.5,0,1,1,2,1.5,1.5,1.5,0,0,1,3.5,0Z'/%3E%3C/svg%3E") no-repeat center left; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='14' viewBox='0 0 7 14'%3E%3Cpath fill='%23fff' d='M6 11a1.371 1.371 0 011 1v1a1.371 1.371 0 01-1 1H1a1.371 1.371 0 01-1-1v-1a1.371 1.371 0 011-1h1V8H1a1.371 1.371 0 01-1-1V6a1.371 1.371 0 011-1h3a1.371 1.371 0 011 1v5h1zM3.5 0A1.5 1.5 0 112 1.5 1.5 1.5 0 013.5 0z'/%3E%3C/svg%3E") no-repeat center left;
display: block; display: block;
font-size: 1.8rem; font-size: 1.8rem;
text-indent: 15px; text-indent: 15px;
@ -281,8 +289,8 @@ main {
#bpOutput.error { background: #dd4b39; } #bpOutput.error { background: #dd4b39; }
.blockMsg, .flagMsg { .blockMsg, .flagMsg {
font: bold 1.8rem Consolas, Courier, monospace; font: 700 1.8rem Consolas, Courier, monospace;
padding: 5px 10px 10px 10px; padding: 5px 10px 10px;
text-indent: 15px; text-indent: 15px;
} }
@ -298,7 +306,7 @@ main {
-moz-appearance: none; -moz-appearance: none;
-webkit-appearance: none; -webkit-appearance: none;
border-radius: 3px; border-radius: 3px;
border: 1px solid rgba(0,0,0,0.1); border: 1px solid rgba(0, 0, 0, 0.1);
box-sizing: content-box; box-sizing: content-box;
display: table-cell; display: table-cell;
font-size: 1.65rem; font-size: 1.65rem;
@ -316,39 +324,41 @@ main {
/* Button hover dark overlay */ /* Button hover dark overlay */
.buttons *:not(input):not([disabled]):hover { .buttons *:not(input):not([disabled]):hover {
background-image: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.1)); background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1));
color: #FFF; color: #fff;
} }
/* Button active shadow inset */ /* Button active shadow inset */
.buttons *:not([disabled]):not(input):active { .buttons *:not([disabled]):not(input):active {
box-shadow: inset 0 3px 5px rgba(0,0,0,0.125); box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
} }
/* Input border color */ /* Input border color */
.buttons *:not([disabled]):hover, .buttons input:focus { .buttons *:not([disabled]):hover, .buttons input:focus {
border-color: rgba(0,0,0,0.25); border-color: rgba(0, 0, 0, 0.25);
} }
#bpButtons * { width: 50%; color: #FFF; } #bpButtons * { width: 50%; color: #fff; }
#bpBack { background-color: #00a65a; } #bpBack { background-color: #00a65a; }
#bpInfo { background-color: #3c8dbc; } #bpInfo { background-color: #3c8dbc; }
#bpWhitelist { background-color: #dd4b39; } #bpWhitelist { background-color: #dd4b39; }
#blockpage .buttons [type=password][disabled] { color: rgba(0,0,0,1); } #blockpage .buttons [type="password"][disabled] { color: rgba(0, 0, 0, 1); }
#blockpage .buttons [disabled] { color: rgba(0,0,0,0.55); background-color: #e3e3e3; } #blockpage .buttons [disabled] { color: rgba(0, 0, 0, 0.55); background-color: #e3e3e3; }
#blockpage .buttons [type=password]:-ms-input-placeholder { color: rgba(51,51,51,0.8); } #blockpage .buttons [type="password"]:-ms-input-placeholder { color: rgba(51, 51, 51, 0.8); }
input[type=password] { font-size: 1.5rem; } input[type="password"] { font-size: 1.5rem; }
@-webkit-keyframes slidein { from { max-height: 0; opacity: 0; } to { max-height: 300px; opacity: 1; } }
@keyframes slidein { from { max-height: 0; opacity: 0; } to { max-height: 300px; opacity: 1; } } @keyframes slidein { from { max-height: 0; opacity: 0; } to { max-height: 300px; opacity: 1; } }
#bpMoreToggle:checked ~ #bpMoreInfo { display: block; margin-top: 8px; animation: slidein 0.05s linear; } #bpMoreToggle:checked ~ #bpMoreInfo { display: block; margin-top: 8px; -webkit-animation: slidein 0.05s linear; animation: slidein 0.05s linear; }
#bpMoreInfo { display: none; margin-top: 10px; } #bpMoreInfo { display: none; margin-top: 10px; }
#bpQueryOutput { #bpQueryOutput {
font-size: 1.2rem; font-size: 1.2rem;
line-height: 1.65rem; line-height: 1.65rem;
margin: 5px 0 0 0; margin: 5px 0 0;
overflow: auto; overflow: auto;
padding: 0 5px; padding: 0 5px;
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
@ -373,7 +383,7 @@ footer {
/* Responsive Content */ /* Responsive Content */
@media only screen and (max-width: 500px) { @media only screen and (max-width: 500px) {
h1 a { font-size: 1.8rem; min-width: 170px; } h1 a { font-size: 1.8rem; min-width: 170px; }
footer span:before { content: "Generated "; } footer span::before { content: "Generated "; }
footer span { display: block; } footer span { display: block; }
} }

View file

@ -41,7 +41,7 @@ $validExtTypes = array("asp", "htm", "html", "php", "rss", "xml", "");
$currentUrlExt = pathinfo($_SERVER["REQUEST_URI"], PATHINFO_EXTENSION); $currentUrlExt = pathinfo($_SERVER["REQUEST_URI"], PATHINFO_EXTENSION);
// Set mobile friendly viewport // Set mobile friendly viewport
$viewPort = '<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>'; $viewPort = '<meta name="viewport" content="width=device-width, initial-scale=1">';
// Set response header // Set response header
function setHeader($type = "x") { function setHeader($type = "x") {
@ -57,14 +57,19 @@ if ($serverName === "pi.hole"
} elseif (filter_var($serverName, FILTER_VALIDATE_IP) || in_array($serverName, $authorizedHosts)) { } elseif (filter_var($serverName, FILTER_VALIDATE_IP) || in_array($serverName, $authorizedHosts)) {
// Set Splash Page output // Set Splash Page output
$splashPage = " $splashPage = "
<html> <!doctype html>
<html lang='en'>
<head> <head>
<meta charset='utf-8'>
$viewPort $viewPort
<link rel='stylesheet' href='pihole/blockingpage.css' type='text/css'/> <title> $serverName</title>
<link rel='stylesheet' href='pihole/blockingpage.css'>
<link rel='shortcut icon' href='admin/img/favicons/favicon.ico' type='image/x-icon'>
</head> </head>
<body id='splashpage'> <body id='splashpage'>
<img src='admin/img/logo.svg'/><br/> <img src='admin/img/logo.svg' alt='Pi-hole logo' width='256' height='377'>
Pi-<b>hole</b>: Your black hole for Internet advertisements<br/> <br>
<p>Pi-<strong>hole</strong>: Your black hole for Internet advertisements</p>
<a href='/admin'>Did you mean to go to the admin panel?</a> <a href='/admin'>Did you mean to go to the admin panel?</a>
</body> </body>
</html> </html>
@ -79,22 +84,39 @@ if ($serverName === "pi.hole"
// Render splash/landing page when directly browsing via IP or authorized hostname // Render splash/landing page when directly browsing via IP or authorized hostname
exit($renderPage); exit($renderPage);
} elseif ($currentUrlExt === "js") { } elseif ($currentUrlExt === "js") {
// Serve Pi-hole Javascript for blocked domains requesting JS // Serve Pi-hole JavaScript for blocked domains requesting JS
exit(setHeader("js").'var x = "Pi-hole: A black hole for Internet advertisements."'); exit(setHeader("js").'var x = "Pi-hole: A black hole for Internet advertisements."');
} elseif (strpos($_SERVER["REQUEST_URI"], "?") !== FALSE && isset($_SERVER["HTTP_REFERER"])) { } elseif (strpos($_SERVER["REQUEST_URI"], "?") !== FALSE && isset($_SERVER["HTTP_REFERER"])) {
// Serve blank image upon receiving REQUEST_URI w/ query string & HTTP_REFERRER // Serve blank image upon receiving REQUEST_URI w/ query string & HTTP_REFERRER
// e.g: An iframe of a blocked domain // e.g: An iframe of a blocked domain
exit(setHeader().'<html> exit(setHeader().'<!doctype html>
<head><script>window.close();</script></head> <html lang="en">
<body><img src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs="></body> <head>
<meta charset="utf-8"><script>window.close();</script>
</head>
<body>
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=">
</body>
</html>'); </html>');
} elseif (!in_array($currentUrlExt, $validExtTypes) || substr_count($_SERVER["REQUEST_URI"], "?")) { } elseif (!in_array($currentUrlExt, $validExtTypes) || substr_count($_SERVER["REQUEST_URI"], "?")) {
// Serve SVG upon receiving non $validExtTypes URL extension or query string // Serve SVG upon receiving non $validExtTypes URL extension or query string
// e.g: Not an iframe of a blocked domain, such as when browsing to a file/query directly // e.g: Not an iframe of a blocked domain, such as when browsing to a file/query directly
// QoL addition: Allow the SVG to be clicked on in order to quickly show the full Block Page // QoL addition: Allow the SVG to be clicked on in order to quickly show the full Block Page
$blockImg = '<a href="/"><svg xmlns="http://www.w3.org/2000/svg" width="110" height="16"><defs><style>a {text-decoration: none;} circle {stroke: rgba(152,2,2,0.5); fill: none; stroke-width: 2;} rect {fill: rgba(152,2,2,0.5);} text {opacity: 0.3; font: 11px Arial;}</style></defs><circle cx="8" cy="8" r="7"/><rect x="10.3" y="-6" width="2" height="12" transform="rotate(45)"/><text x="19.3" y="12">Blocked by Pi-hole</text></svg></a>'; $blockImg = '<a href="/">
exit(setHeader()."<html> <svg xmlns="http://www.w3.org/2000/svg" width="110" height="16">
<head>$viewPort</head> <circle cx="8" cy="8" r="7" fill="none" stroke="rgba(152,2,2,.5)" stroke-width="2"/>
<path fill="rgba(152,2,2,.5)" d="M11.526 3.04l1.414 1.415-8.485 8.485-1.414-1.414z"/>
<text x="19.3" y="12" opacity=".3" style="font:11px Arial">
Blocked by Pi-hole
</text>
</svg>
</a>';
exit(setHeader()."<!doctype html>
<html lang='en'>
<head>
<meta charset='utf-8'>
$viewPort
</head>
<body>$blockImg</body> <body>$blockImg</body>
</html>"); </html>");
} }
@ -227,7 +249,7 @@ if (explode("-", $phVersion)[1] != "0")
setHeader(); setHeader();
?> ?>
<!DOCTYPE html> <!doctype html>
<!-- Pi-hole: A black hole for Internet advertisements <!-- Pi-hole: A black hole for Internet advertisements
* (c) 2017 Pi-hole, LLC (https://pi-hole.net) * (c) 2017 Pi-hole, LLC (https://pi-hole.net)
* Network-wide ad blocking via your own hardware. * Network-wide ad blocking via your own hardware.
@ -235,12 +257,12 @@ setHeader();
* This file is copyright under the latest version of the EUPL. --> * This file is copyright under the latest version of the EUPL. -->
<html> <html>
<head> <head>
<meta charset="UTF-8"> <meta charset="utf-8">
<?=$viewPort ?> <?=$viewPort ?>
<meta name="robots" content="noindex,nofollow"/> <meta name="robots" content="noindex,nofollow">
<meta http-equiv="x-dns-prefetch-control" content="off"> <meta http-equiv="x-dns-prefetch-control" content="off">
<link rel="shortcut icon" href="admin/img/favicon.png" type="image/x-icon"/> <link rel="stylesheet" href="pihole/blockingpage.css">
<link rel="stylesheet" href="pihole/blockingpage.css" type="text/css"/> <link rel="shortcut icon" href="admin/img/favicons/favicon.ico" type="image/x-icon">
<title> <?=$serverName ?></title> <title> <?=$serverName ?></title>
<script src="admin/scripts/vendor/jquery.min.js"></script> <script src="admin/scripts/vendor/jquery.min.js"></script>
<script> <script>
@ -274,10 +296,10 @@ setHeader();
</h1> </h1>
<div class="spc"></div> <div class="spc"></div>
<input id="bpAboutToggle" type="checkbox"/> <input id="bpAboutToggle" type="checkbox">
<div id="bpAbout"> <div id="bpAbout">
<div class="aboutPH"> <div class="aboutPH">
<div class="aboutImg"/></div> <div class="aboutImg"></div>
<p>Open Source Ad Blocker <p>Open Source Ad Blocker
<small>Designed for Raspberry Pi</small> <small>Designed for Raspberry Pi</small>
</p> </p>
@ -314,8 +336,9 @@ setHeader();
<pre id='bpQueryOutput'><?php if ($featuredTotal > 0) foreach ($queryResults as $num => $value) { echo "<span>[$num]:</span>$adlistsUrls[$num]\n"; } ?></pre> <pre id='bpQueryOutput'><?php if ($featuredTotal > 0) foreach ($queryResults as $num => $value) { echo "<span>[$num]:</span>$adlistsUrls[$num]\n"; } ?></pre>
<form id="bpWLButtons" class="buttons"> <form id="bpWLButtons" class="buttons">
<input id="bpWLDomain" type="text" value="<?=$serverName ?>" disabled/> <input id="bpWLDomain" type="text" value="<?=$serverName ?>" disabled>
<input id="bpWLPassword" type="password" placeholder="Javascript disabled" disabled/><button id="bpWhitelist" type="button" disabled></button> <input id="bpWLPassword" type="password" placeholder="JavaScript disabled" disabled>
<button id="bpWhitelist" type="button" disabled></button>
</form> </form>
</div> </div>
</main> </main>

View file

@ -69,7 +69,7 @@ $HTTP["url"] =~ "^/admin/" {
"X-Frame-Options" => "DENY" "X-Frame-Options" => "DENY"
) )
$HTTP["url"] =~ ".ttf$" { $HTTP["url"] =~ "\.(eot|otf|tt[cf]|woff2?)$" {
# Allow Block Page access to local fonts # Allow Block Page access to local fonts
setenv.add-response-header = ( "Access-Control-Allow-Origin" => "*" ) setenv.add-response-header = ( "Access-Control-Allow-Origin" => "*" )
} }

View file

@ -2,7 +2,7 @@
# (c) 2017 Pi-hole, LLC (https://pi-hole.net) # (c) 2017 Pi-hole, LLC (https://pi-hole.net)
# Network-wide ad blocking via your own hardware. # Network-wide ad blocking via your own hardware.
# #
# lighttpd config for Pi-hole # Lighttpd config for Pi-hole
# #
# This file is copyright under the latest version of the EUPL. # This file is copyright under the latest version of the EUPL.
# Please see LICENSE file for your rights under this license. # Please see LICENSE file for your rights under this license.
@ -78,7 +78,7 @@ $HTTP["url"] =~ "^/admin/" {
"X-Frame-Options" => "DENY" "X-Frame-Options" => "DENY"
) )
$HTTP["url"] =~ ".ttf$" { $HTTP["url"] =~ "\.(eot|otf|tt[cf]|woff2?)$" {
# Allow Block Page access to local fonts # Allow Block Page access to local fonts
setenv.add-response-header = ( "Access-Control-Allow-Origin" => "*" ) setenv.add-response-header = ( "Access-Control-Allow-Origin" => "*" )
} }