add more logos, compress most things to webp, refactor header.php

This commit is contained in:
oxeo0 2025-05-10 15:51:09 +02:00
parent 3202658b78
commit 1010fac9ed
50 changed files with 96 additions and 147 deletions

View file

@ -11,24 +11,11 @@ if (($handle = fopen($csvfile, "r")) !== FALSE) {
$oldcatname="";
while (($data = fgetcsv($handle, 1000, ",",'"','\\')) !== FALSE) {
$data[0]=preg_replace("/[^a-zA-Z0-9:\/.\ -✔️❌]/", "", $data[0]);
// PREVENT ALL MALICIOUS PHP PAYLOADS FROM BEING EXECUTED FROM CSV FILES!
$data[0] = htmlspecialchars($data[0]);
$data[1] = htmlspecialchars($data[1]);
$data[2] = htmlspecialchars($data[2]);
$data[3] = htmlspecialchars($data[3]);
$data[4] = htmlspecialchars($data[4]);
$data[5] = htmlspecialchars($data[5]);
$data[6] = htmlspecialchars($data[6]);
$data[7] = htmlspecialchars($data[7]);
$data[1]=preg_replace("/[^a-zA-Z0-9:\/.\ -✔️❌]/", "", $data[1]);
$data[2]=preg_replace("/[^a-zA-Z0-9:\/.\ -✔️❌]/", "", $data[2]);
$data[3]=preg_replace("/[^a-zA-Z0-9:\/.\ -✔️❌]/", "", $data[3]);
$data[4]=preg_replace("/[^a-zA-Z0-9:\/.\ -✔️❌]/", "", $data[4]);
$data[5]=preg_replace("/[^a-zA-Z0-9:\/.\ -✔️❌]/", "", $data[5]);
$data[6]=preg_replace("/[^a-zA-Z0-9:\/.\ -✔️❌]/", "", $data[6]);
$data[7]=preg_replace("/[^a-zA-Z0-9:\/.\ -✔️❌]/", "", $data[7]);
for ($i = 0; $i < count($data); $i++) {
$data[$i] = htmlspecialchars($data[$i]);
$data[$i] = preg_replace("/[^a-zA-Z0-9:\/.\ -✔️❌]/", "", $data[$i]);
}
$num = count($data);
//echo "<p>" . $data[1] . "</p>";

View file

@ -11,23 +11,11 @@ if (($handle = fopen($csvfile, "r")) !== FALSE) {
while (($data = fgetcsv($handle, 1000, ",",'"','\\')) !== FALSE) {
//PREVENT ALL MALICIOUS PHP PAYLOADS FROM BEING EXECUTED FROM CSV FILES!
$data[0] = htmlspecialchars($data[0]);
$data[1] = htmlspecialchars($data[1]);
$data[2] = htmlspecialchars($data[2]);
$data[3] = htmlspecialchars($data[3]);
$data[4] = htmlspecialchars($data[4]);
$data[5] = htmlspecialchars($data[5]);
$data[6] = htmlspecialchars($data[6]);
$data[7] = htmlspecialchars($data[7]);
for ($i = 0; $i < count($data); $i++) {
$data[$i] = htmlspecialchars($data[$i]);
$data[$i] = preg_replace("/[^a-zA-Z0-9:\/.\ -✔️❌]/", "", $data[$i]);
}
$data[0]=preg_replace("/[^a-zA-Z0-9:\/.\ -✔️❌]/", "", $data[0]);
$data[1]=preg_replace("/[^a-zA-Z0-9:\/.\ -✔️❌]/", "", $data[1]);
$data[2]=preg_replace("/[^a-zA-Z0-9:\/.\ -✔️❌]/", "", $data[2]);
$data[3]=preg_replace("/[^a-zA-Z0-9:\/.\ -✔️❌]/", "", $data[3]);
$data[4]=preg_replace("/[^a-zA-Z0-9:\/.\ -✔️❌]/", "", $data[4]);
$data[5]=preg_replace("/[^a-zA-Z0-9:\/.\ -✔️❌]/", "", $data[5]);
$data[6]=preg_replace("/[^a-zA-Z0-9:\/.\ -✔️❌]/", "", $data[6]);
$data[7]=preg_replace("/[^a-zA-Z0-9:\/.\ -✔️❌]/", "", $data[7]);
$row++;
$num = count($data);
//echo "<p>" . $data[1] . "</p>";
@ -117,11 +105,47 @@ echo "<center><p>" . $rowcount . " Result(s) found.</p></center>";
// strtolower({key}) -> logo = /img/{value}
$logomap = array(
"archive" => "archive.webp",
"collaboration" => "collaboration.webp",
"communities" => "community.webp",
"community" => "community.webp",
"exchanges" => "haveno.webp",
"fediverse" => "fediverse.webp",
"forum" => "dread.webp",
"forums" => "dread.webp",
"indexes" => "index.webp",
"infos and indexes" => "info.webp",
"libraries" => "library.webp",
"mail" => "clawsmail.webp",
"markets" => "market.webp",
"monero node" => "monero.webp",
"news" => "news.webp",
"password generator" => "passwordgen.webp",
"pastebins" => "pastebins.webp",
"privacy front-ends" => "opensource.webp",
"radios" => "radio.webp",
"sms" => "sms.webp",
"search engine" => "searxng.svg",
"simplex chatrooms" => "simplex.webp",
"social" => "social.webp",
"tools" => "tools.webp",
"torrents" => "torrents.webp",
"translation" => "translation.webp",
"vpns" => "openvpn.webp",
"vps" => "linux.webp",
);
$classmap = array(
"monero node" => "xmr",
"simplex chatrooms" => "sxc",
);
function DisplayCategories($instancename, $path) {
global $logomap, $classmap;
$resultcount = 0;
$row = 1;
//echo $instancename;
@ -137,102 +161,34 @@ $csvfile = $path . $csvfilename;
echo "<center><table>\n\n"; //begin html table formatting
if (($handle = fopen($csvfile, "r")) !== FALSE) {
$oldcatname = "";
while (($data = fgetcsv($handle, 1000, ",",'"','\\')) !== FALSE) {
$num = count($data);
$row++;
if ( $row == "2") {
echo "<p> | ";
}else{
echo '<p> ';
continue;
}
//PREVENT ALL MALICIOUS PHP PAYLOADS FROM BEING EXECUTED FROM CSV FILES!
$data[0] = htmlspecialchars($data[0]);
$data[1] = htmlspecialchars($data[1]);
$data[2] = htmlspecialchars($data[2]);
$data[3] = htmlspecialchars($data[3]);
$data[4] = htmlspecialchars($data[4]);
$data[5] = htmlspecialchars($data[5]);
$data[6] = htmlspecialchars($data[6]);
$data[7] = htmlspecialchars($data[7]);
$data[0]=preg_replace("/[^a-zA-Z0-9:\/.\ -]/", "", $data[0]);
$data[1]=preg_replace("/[^a-zA-Z0-9:\/.\ -]/", "", $data[1]);
$data[2]=preg_replace("/[^a-zA-Z0-9:\/.\ -]/", "", $data[2]);
$data[3]=preg_replace("/[^a-zA-Z0-9:\/.\ -]/", "", $data[3]);
$data[4]=preg_replace("/[^a-zA-Z0-9:\/.\ -]/", "", $data[4]);
$data[5]=preg_replace("/[^a-zA-Z0-9:\/.\ -]/", "", $data[5]);
$data[6]=preg_replace("/[^a-zA-Z0-9:\/.\ -]/", "", $data[6]);
$data[7]=preg_replace("/[^a-zA-Z0-9:\/.\ -]/", "", $data[7]);
for ($i = 0; $i < count($data); $i++) {
$data[$i] = htmlspecialchars($data[$i]);
$data[$i] = preg_replace("/[^a-zA-Z0-9:\/.\ -]/", "", $data[$i]);
}
$resultcount++;
for ($c=0; $c < $num; $c++) { // iterate over each row
if ( $c == "1" ){
if (strtolower($oldcatname) != strtolower($data[1])){
if( str_contains(strtolower($data[1]),'monero' )){
echo '<img class="caticon" src="img/monero.png">' . '<a class="xmr" href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | '; // display the category as its the first row with this new category
$oldcatname=$data[1];
}elseif( str_contains(strtolower($data[1]),'simplex' )){
echo '<img class="caticon" src="img/simplex.png">' . '<a class="sxc" href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | '; // display the category as its the first row with this new category
$oldcatname=$data[1];
}elseif (str_contains(strtolower($data[1]), 'sms')){
echo '<img class="caticon" src="img/sms.ico">' . '<a href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | '; // display the category as its the first row with this new category
$oldcatname=$data[1];
echo '<a class="cata ' . ($classmap[strtolower($data[1])] ?? '') . '" href="index.php?query=' . $data[1] . '">' . '<img class="caticon" src="img/' . ($logomap[strtolower($data[1])] ?? 'empty.svg') . '"></img>'. $data[1] . '</a> ';
$oldcatname = strtolower($data[1]);
}elseif (str_contains(strtolower($data[1]), 'games')){
echo '<img class="caticon" src="img/games.ico">' . '<a href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | '; // display the category as its the first row with this new category
$oldcatname=$data[1];
}elseif (str_contains(strtolower($data[1]), 'vps')){
echo '<img class="caticon" src="img/linux.ico" >' . '<a href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | '; // display the category as its the first row with this new category
$oldcatname=$data[1];
}elseif (str_contains(strtolower($data[1]), 'torproject')){
echo '<img class="caticon" src="img/tor_browser.ico">' . '<a href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | ';
$oldcatname=$data[1];
}elseif (str_contains(strtolower($data[1]), 'privacy front-ends')){
echo '<img class="caticon" src="img/opensource.ico">' . '<a href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | ';
$oldcatname=$data[1];
}elseif (str_contains(strtolower($data[1]), 'vpns')){
echo '<img class="caticon" src="img/openvpn.ico">' . '<a href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | ';
$oldcatname=$data[1];
}elseif (str_contains(strtolower($data[1]), 'fediverse')){
echo '<img class="caticon" src="img/xmpp.ico">' . '<a href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | ';
$oldcatname=$data[1];
}elseif (str_contains(strtolower($data[1]), 'torrents')){
echo '<img class="caticon" src="img/torrents.ico">' . '<a href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | ';
$oldcatname=$data[1];
}elseif (str_contains(strtolower($data[1]), 'forums')){
echo '<img class="caticon" src="img/dread.png">' . '<a href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | ';
$oldcatname=$data[1];
}elseif (str_contains(strtolower($data[1]), 'mail')){
echo '<img class="caticon" src="img/clawsmail.png">' . '<a href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | ';
$oldcatname=$data[1];
}elseif (str_contains(strtolower($data[1]), 'radio')){
echo '<img class="caticon" src="img/radio.ico">' . '<a href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | ';
$oldcatname=$data[1];
}elseif (str_contains(strtolower($data[1]), 'search engine')){
echo '<img class="caticon" src="img/searxng.svg">' . '<a href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | ';
$oldcatname=$data[1];
}elseif (str_contains(strtolower($data[1]), 'exchanges')){
echo '<img class="caticon" src="img/haveno.png">' . '<a href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | ';
$oldcatname=$data[1];
}else{
echo '<a href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | '; // display the category as its the first row with this new category
$oldcatname=$data[1];
}
}
}
}
}
}
echo '<a class="sensitivelink" href="index.php?query=.&sensitive=1">Display All Links</a> |</p>';
echo '<a class="cata sensitivelink" href="index.php?query=.&sensitive=1"><img class="caticon" src="img/showall.webp"></img>Display All Links</a></p>';
fclose($handle);
}
}
}
@ -253,4 +209,3 @@ if (($handle = fopen($csvfile, "r")) !== FALSE) {
<h1><a href="http://git.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/nihilist/darknet-lantern"><img src="img/lantern project large.png" class="projectbanner"></a></h1>
<p><u>Update Frequency:</u> every 3 hours</p> </br>

BIN
www/img/archive.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 480 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

BIN
www/img/clawsmail.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

BIN
www/img/collaboration.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 570 B

BIN
www/img/community.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

BIN
www/img/dread.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 486 B

1
www/img/empty.svg Normal file
View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36"><path fill="#436" d="M36 32c0 2.209-1.791 4-4 4H4c-2.209 0-4-1.791-4-4V4c0-2.209 1.791-4 4-4h28c2.209 0 4 1.791 4 4v28z"/></svg>

After

Width:  |  Height:  |  Size: 188 B

BIN
www/img/fediverse.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

BIN
www/img/games.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

BIN
www/img/haveno.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
www/img/index.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 962 B

BIN
www/img/info.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

After

Width:  |  Height:  |  Size: 62 KiB

Before After
Before After

BIN
www/img/library.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 570 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

BIN
www/img/linux.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
www/img/market.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 956 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

BIN
www/img/monero.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
www/img/news.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

BIN
www/img/opensource.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

BIN
www/img/openvpn.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 942 B

BIN
www/img/passwordgen.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 604 B

BIN
www/img/pastebins.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

BIN
www/img/radio.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
www/img/showall.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 826 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

BIN
www/img/simplex.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

BIN
www/img/sms.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1,018 B

BIN
www/img/social.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
www/img/tools.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

BIN
www/img/tor_browser.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

BIN
www/img/torrents.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
www/img/translation.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 498 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

BIN
www/img/xmpp.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

@ -9,17 +9,24 @@
font-family: 'Source Code Pro', monospace;
}
.caticon{
height: 13px;
height: 24px;
}
.cata {
display: inline-flex;
align-items: center;
text-align: center;
padding: 8px;
}
.width-class{
width: 100%;
object-fit: contain;
align: center;
display: flex;
flex-direction: column;
}
.input-class{
margin: 0 20% 0 20%;
}
@ -62,7 +69,6 @@
.imgRz{
width: 100%;
height: 50%;
align: center;
justify-content: center;
-webkit-filter: grayscale(0%); /* Safari 6.0 - 9.0 */
filter: grayscale(0%) brightness(100%) contrast(100%);