Adding snuffmoji

This commit is contained in:
Jarkko Toivanen 2024-09-28 23:01:23 +03:00
parent 390b6b1de9
commit 49b9e60e43
Signed by: jt
GPG key ID: 9151B109B73ECAD5
78 changed files with 20 additions and 5 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('./snuffmoji/*.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="<?php echo $randomicon; ?>">
<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="snuffmoji/thumbs_up.png" />
<img class="reactionaction" src="snuffmoji/thumbs_down.png" />
<img class="reactionaction" src="snuffmoji/joy.png" />
<img class="reactionaction" src="snuffmoji/sob.png" />
<img class="reactionaction" src="snuffmoji/heart_eyes.png" />
</span>';
echo "</div>"; echo "</div>";
} }

BIN
snuffmoji/angel.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

BIN
snuffmoji/angry.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

BIN
snuffmoji/cat_face.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
snuffmoji/clown.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
snuffmoji/cold.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

BIN
snuffmoji/cold_sweat.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
snuffmoji/cowboy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

BIN
snuffmoji/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
snuffmoji/drool.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

BIN
snuffmoji/fearful.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
snuffmoji/flush.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
snuffmoji/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
snuffmoji/happy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

BIN
snuffmoji/head_bandage.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

BIN
snuffmoji/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
snuffmoji/hot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
snuffmoji/hug.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
snuffmoji/joy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

BIN
snuffmoji/kissing.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
snuffmoji/kissing_heart.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9 KiB

BIN
snuffmoji/laughing.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

BIN
snuffmoji/lying.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

BIN
snuffmoji/mask.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

BIN
snuffmoji/melting.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
snuffmoji/money_face.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

BIN
snuffmoji/mouthless.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

BIN
snuffmoji/nerd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

BIN
snuffmoji/partying.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
snuffmoji/peeking_eye.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
snuffmoji/pleading_face.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

BIN
snuffmoji/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
snuffmoji/rolling_eyes.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

BIN
snuffmoji/sad.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

BIN
snuffmoji/saluting.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

BIN
snuffmoji/scream.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
snuffmoji/see_no_evil.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

BIN
snuffmoji/shrug.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
snuffmoji/shush.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

BIN
snuffmoji/sick.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
snuffmoji/sleeping.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9 KiB

BIN
snuffmoji/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
snuffmoji/smirk.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

BIN
snuffmoji/sneeze.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

BIN
snuffmoji/sob.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
snuffmoji/spiral_eyes.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
snuffmoji/star_struck.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

BIN
snuffmoji/sunglasses.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

BIN
snuffmoji/swearing.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
snuffmoji/sweat.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

BIN
snuffmoji/sweat_smile.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
snuffmoji/thermometer.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
snuffmoji/thinking.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
snuffmoji/thumbs_down.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
snuffmoji/thumbs_up.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
snuffmoji/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
snuffmoji/triumph.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
snuffmoji/upside_down.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

BIN
snuffmoji/vomiting.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
snuffmoji/wink.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

BIN
snuffmoji/woozy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
snuffmoji/yawning.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

BIN
snuffmoji/zany.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
snuffmoji/zipper_mouth.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

View file

@ -71,3 +71,7 @@ hr {
.postactions { .postactions {
float: right; float: right;
} }
.reactionaction {
height: 2rem;
vertical-align: bottom;
}