Merge pull request 'issue 37: Icons are displayed next to a category name' (#57) from SovereigntyIsNotFreedom/darknet-lantern:main into main

Reviewed-on: http://git.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/nihilist/darknet-lantern/pulls/57
This commit is contained in:
nihilist 2025-05-09 14:38:59 +02:00
commit f06ae54ed5
15 changed files with 46 additions and 3 deletions

View file

@ -173,13 +173,55 @@ if (($handle = fopen($csvfile, "r")) !== FALSE) {
if (strtolower($oldcatname) != strtolower($data[1])){ if (strtolower($oldcatname) != strtolower($data[1])){
if( str_contains(strtolower($data[1]),'monero' )){ if( str_contains(strtolower($data[1]),'monero' )){
echo '<a class="xmr" href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | '; // display the category as its the first row with this new category 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]; $oldcatname=$data[1];
}elseif( str_contains(strtolower($data[1]),'simplex' )){ }elseif( str_contains(strtolower($data[1]),'simplex' )){
echo '<a class="sxc" href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | '; // display the category as its the first row with this new category 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];
}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]; $oldcatname=$data[1];
}else{ }else{
echo '<a href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | '; // display the category as its the first row with this new category echo '<img class="caticon" src="img/logo-large.png">' . '<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]; $oldcatname=$data[1];
} }
} }

BIN
www/img/clawsmail.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

BIN
www/img/dread.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
www/img/games.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
www/img/haveno.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
www/img/linux.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
www/img/monero.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
www/img/opensource.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
www/img/openvpn.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
www/img/radio.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

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

@ -0,0 +1 @@
<svg height="92mm" viewBox="0 0 92 92" width="92mm" xmlns="http://www.w3.org/2000/svg"><g transform="translate(-40.921303 -17.416526)"><g fill="none"><circle cx="75" cy="92" r="0" stroke="#000" stroke-width="12"/><circle cx="75.921" cy="53.903" r="30" stroke="#3050ff" stroke-width="10"/><path d="m67.514849 37.91524a18 18 0 0 1 21.051475 3.312407 18 18 0 0 1 3.137312 21.078282" stroke="#3050ff" stroke-width="5"/></g><path d="m3.706 122.09h18.846v39.963h-18.846z" fill="#3050ff" transform="matrix(.69170581 -.72217939 .72217939 .69170581 0 0)"/></g></svg>

After

Width:  |  Height:  |  Size: 557 B

BIN
www/img/sms.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
www/img/tor_browser.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
www/img/torrents.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
www/img/xmpp.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB