Adding snufficon

This commit is contained in:
Jarkko Toivanen 2024-09-28 23:01:23 +03:00
parent 390b6b1de9
commit 4a89a35984
Signed by: jt
GPG key ID: 9151B109B73ECAD5
79 changed files with 22 additions and 7 deletions

View file

@ -1,4 +1,2 @@
- Requires `SQLite3` (`sudo apt install php-sqlite3` on Debian) - Requires `SQLite3` (`sudo apt install php-sqlite3` on Debian)
- API requires mod_rewrite (`sudo a2enmod rewrite`) and configuring `AllowOverride all` for .htaccess - API requires mod_rewrite (`sudo a2enmod rewrite`) and configuring `AllowOverride all` for .htaccess
The icon is from https://www.flaticon.com/free-icon/hedgehog_10807489

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 MiB

BIN
icon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

View file

@ -1,5 +1,11 @@
<?php <?php
require_once "inc/database.php"; require_once "inc/database.php";
function getRandomIcon() {
$files = glob('./snufficon/*.png');
$random_file_num = array_rand($files);
return $files[$random_file_num];;
}
$randomicon = getRandomIcon();
$database = new DataBase(); $database = new DataBase();
if(!$database) { if(!$database) {
die($database->lastErrorMsg()); die($database->lastErrorMsg());
@ -10,7 +16,7 @@ if(!$database) {
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<link rel="stylesheet" href="style.css" /> <link rel="stylesheet" href="style.css" />
<link rel="icon" type="image/x-icon" href="icon.png"> <link rel="icon" type="image/x-icon" href="snufficon/mouthless.png">
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Snuffler</title> <title>Snuffler</title>
</head> </head>
@ -33,7 +39,7 @@ if(!$database) {
</div> </div>
<div id="centerbox"> <div id="centerbox">
<div id="titlebox"><img src="icon.png" alt="" />Snuffler</div> <div id="titlebox"><img src="<?php echo $randomicon; ?>" alt="" />Snuffler</div>
<?php <?php
if (!$database->getAuthedUserId()) { if (!$database->getAuthedUserId()) {
@ -77,7 +83,14 @@ foreach($posts as $post) {
echo '<br><small>@' . $post["user.handle"] . '</small>'; echo '<br><small>@' . $post["user.handle"] . '</small>';
echo '<p>' . $post["post.text"] . '</p>'; echo '<p>' . $post["post.text"] . '</p>';
echo '<hr><small>' . date("D j.n.Y \@ G:i", $post["post.time"]) . '</small>'; echo '<hr><small>' . date("D j.n.Y \@ G:i", $post["post.time"]) . '</small>';
echo '<span class="postactions">👍5 👎0 💬2</span>'; echo '
<span class="postactions">
<img class="reactionaction" src="snufficon/thumbs_up.png" />
<img class="reactionaction" src="snufficon/thumbs_down.png" />
<img class="reactionaction" src="snufficon/joy.png" />
<img class="reactionaction" src="snufficon/sob.png" />
<img class="reactionaction" src="snufficon/heart_eyes.png" />
</span>';
echo "</div>"; echo "</div>";
} }

BIN
snufficon/angel.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

BIN
snufficon/angry.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

BIN
snufficon/cat_face.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
snufficon/clown.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
snufficon/cold.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

BIN
snufficon/cold_sweat.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
snufficon/cowboy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

BIN
snufficon/cross_eyes.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
snufficon/drool.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
snufficon/excited.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

BIN
snufficon/fearful.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
snufficon/flush.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
snufficon/giggle.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

BIN
snufficon/happy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
snufficon/head_bandage.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

BIN
snufficon/heart_eyes.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

BIN
snufficon/hot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
snufficon/hug.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
snufficon/joy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

BIN
snufficon/kissing.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
snufficon/kissing_heart.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9 KiB

BIN
snufficon/laughing.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

BIN
snufficon/lying.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

BIN
snufficon/mask.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

BIN
snufficon/melting.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
snufficon/money_face.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

BIN
snufficon/mouthless.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

BIN
snufficon/nerd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

BIN
snufficon/partying.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
snufficon/peeking_eye.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
snufficon/pleading_face.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

BIN
snufficon/raging.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

BIN
snufficon/rolling_eyes.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

BIN
snufficon/sad.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

BIN
snufficon/saluting.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

BIN
snufficon/scream.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
snufficon/see_no_evil.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

BIN
snufficon/shrug.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
snufficon/shush.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

BIN
snufficon/sick.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
snufficon/sleeping.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9 KiB

BIN
snufficon/smiling.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
snufficon/smirk.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

BIN
snufficon/sneeze.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

BIN
snufficon/sob.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
snufficon/spiral_eyes.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
snufficon/star_struck.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

BIN
snufficon/sunglasses.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

BIN
snufficon/swearing.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
snufficon/sweat.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

BIN
snufficon/sweat_smile.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
snufficon/thermometer.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
snufficon/thinking.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
snufficon/thumbs_down.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
snufficon/thumbs_up.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
snufficon/tongue_out.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

BIN
snufficon/triumph.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
snufficon/upside_down.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

BIN
snufficon/vomiting.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
snufficon/wink.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

BIN
snufficon/woozy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
snufficon/yawning.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

BIN
snufficon/zany.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
snufficon/zipper_mouth.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

View file

@ -36,8 +36,8 @@ hr {
text-align: center; text-align: center;
} }
#titlebox > img { #titlebox > img {
display: inline-block; height: 1.25em;
height: 1em; vertical-align: sub;
} }
#centerbox { #centerbox {
margin-left: 1rem; margin-left: 1rem;
@ -70,4 +70,8 @@ hr {
} }
.postactions { .postactions {
float: right; float: right;
}
.reactionaction {
height: 2rem;
vertical-align: bottom;
} }