krz/ifconfig.php

A private ifconfig service.

clone: git clone https://gitbay.org/krz/ifconfig.php.git

0ebb91b25e856e101f5729cbb5ffe4871cc984bb

unsigned

author: Christian Cleberg <hello@cleberg.net> · 2023-05-23T23:55:07Z

add dark mode
 ifconfig.php | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/ifconfig.php b/ifconfig.php
index 04e1c18..065d4db 100644
--- a/ifconfig.php
+++ b/ifconfig.php
@@ -72,10 +72,13 @@ elseif (isset($query) && (($query=="text") || ($query=="all"))) {
 			}
 			.small, .small > a {
 				font-size: 9pt;
-				color: #777;
 				text-align: center;
 				text-decoration: none;
 			}
+			@media (prefers-color-scheme: dark) {
+  				body { background-color: #000; color: #ccc; }
+  				a, a:visited { color: #0f0; }
+			}
 		</style>
 	</head>
 	<body>
@@ -106,8 +109,8 @@ elseif (isset($query) && (($query=="text") || ($query=="all"))) {
 	$date = date("Y");
 	echo <<<EOD
 	<br>
-	<p class="small">Copyright &copy; {$date} <a href="{$site_owner_url}">{$site_owner_name}</a>.<br/>
-	<a target="_blank" rel="noreferrer" href="{$source_repository}">Source Code</a></p>
+	<p><small>Copyright &copy; {$date} <a href="{$site_owner_url}">{$site_owner_name}</a>.
+	<br><a target="_blank" rel="noreferrer" href="{$source_repository}">Source Code</a></small></p>
 	</body>
 	</html>
 	EOD;