Adding snuffmoji
|
@ -1,4 +1,2 @@
|
|||
- Requires `SQLite3` (`sudo apt install php-sqlite3` on Debian)
|
||||
- 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
|
||||
|
|
BIN
favicon.ico
Before Width: | Height: | Size: 1 MiB |
BIN
icon.png
Before Width: | Height: | Size: 29 KiB |
19
index.php
|
@ -1,5 +1,11 @@
|
|||
<?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();
|
||||
if(!$database) {
|
||||
die($database->lastErrorMsg());
|
||||
|
@ -10,7 +16,7 @@ if(!$database) {
|
|||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<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" />
|
||||
<title>Snuffler</title>
|
||||
</head>
|
||||
|
@ -33,7 +39,7 @@ if(!$database) {
|
|||
</div>
|
||||
|
||||
<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
|
||||
if (!$database->getAuthedUserId()) {
|
||||
|
@ -77,7 +83,14 @@ foreach($posts as $post) {
|
|||
echo '<br><small>@' . $post["user.handle"] . '</small>';
|
||||
echo '<p>' . $post["post.text"] . '</p>';
|
||||
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>";
|
||||
|
||||
}
|
||||
|
|
BIN
snuffmoji/angel.png
Normal file
After Width: | Height: | Size: 9.1 KiB |
BIN
snuffmoji/angry.png
Normal file
After Width: | Height: | Size: 8.6 KiB |
BIN
snuffmoji/cat_face.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
snuffmoji/clown.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
snuffmoji/cold.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
snuffmoji/cold_sweat.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
snuffmoji/cowboy.png
Normal file
After Width: | Height: | Size: 8.2 KiB |
BIN
snuffmoji/cross_eyes.png
Normal file
After Width: | Height: | Size: 8.3 KiB |
BIN
snuffmoji/disappointed_relieved.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
snuffmoji/drool.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
snuffmoji/exploding_head.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
snuffmoji/expressionless.png
Normal file
After Width: | Height: | Size: 7.9 KiB |
BIN
snuffmoji/fearful.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
snuffmoji/flush.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
snuffmoji/giggle.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
snuffmoji/hand_over_mouth.png
Normal file
After Width: | Height: | Size: 9.3 KiB |
BIN
snuffmoji/happy.png
Normal file
After Width: | Height: | Size: 8.8 KiB |
BIN
snuffmoji/head_bandage.png
Normal file
After Width: | Height: | Size: 9.4 KiB |
BIN
snuffmoji/heart_eyes.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
snuffmoji/holding_back_tears.png
Normal file
After Width: | Height: | Size: 9.8 KiB |
BIN
snuffmoji/hot.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
snuffmoji/hug.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
snuffmoji/joy.png
Normal file
After Width: | Height: | Size: 9.6 KiB |
BIN
snuffmoji/kissing.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
snuffmoji/kissing_heart.png
Normal file
After Width: | Height: | Size: 9 KiB |
BIN
snuffmoji/laughing.png
Normal file
After Width: | Height: | Size: 8.2 KiB |
BIN
snuffmoji/lying.png
Normal file
After Width: | Height: | Size: 8.2 KiB |
BIN
snuffmoji/mask.png
Normal file
After Width: | Height: | Size: 7.9 KiB |
BIN
snuffmoji/melting.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
snuffmoji/money_face.png
Normal file
After Width: | Height: | Size: 9.9 KiB |
BIN
snuffmoji/mouthless.png
Normal file
After Width: | Height: | Size: 7.6 KiB |
BIN
snuffmoji/nerd.png
Normal file
After Width: | Height: | Size: 9.7 KiB |
BIN
snuffmoji/partying.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
snuffmoji/peeking_eye.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
snuffmoji/pleading_face.png
Normal file
After Width: | Height: | Size: 9.7 KiB |
BIN
snuffmoji/raging.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
snuffmoji/raised_eyebrow.png
Normal file
After Width: | Height: | Size: 8.7 KiB |
BIN
snuffmoji/rolling_eyes.png
Normal file
After Width: | Height: | Size: 8.8 KiB |
BIN
snuffmoji/sad.png
Normal file
After Width: | Height: | Size: 7.9 KiB |
BIN
snuffmoji/saluting.png
Normal file
After Width: | Height: | Size: 8.5 KiB |
BIN
snuffmoji/scream.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
snuffmoji/see_no_evil.png
Normal file
After Width: | Height: | Size: 9.8 KiB |
BIN
snuffmoji/shrug.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
snuffmoji/shush.png
Normal file
After Width: | Height: | Size: 9.9 KiB |
BIN
snuffmoji/sick.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
snuffmoji/sleeping.png
Normal file
After Width: | Height: | Size: 9 KiB |
BIN
snuffmoji/smiling.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
snuffmoji/smiling_with_hearts.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
snuffmoji/smiling_with_stars.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
snuffmoji/smirk.png
Normal file
After Width: | Height: | Size: 8.6 KiB |
BIN
snuffmoji/sneeze.png
Normal file
After Width: | Height: | Size: 9.5 KiB |
BIN
snuffmoji/sob.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
snuffmoji/spiral_eyes.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
snuffmoji/star_struck.png
Normal file
After Width: | Height: | Size: 9.4 KiB |
BIN
snuffmoji/sunglasses.png
Normal file
After Width: | Height: | Size: 8.6 KiB |
BIN
snuffmoji/swearing.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
snuffmoji/sweat.png
Normal file
After Width: | Height: | Size: 8.7 KiB |
BIN
snuffmoji/sweat_smile.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
snuffmoji/thermometer.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
snuffmoji/thinking.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
snuffmoji/thumbs_down.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
snuffmoji/thumbs_up.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
snuffmoji/tongue_out.png
Normal file
After Width: | Height: | Size: 9.3 KiB |
BIN
snuffmoji/tongue_out_closed_eyes.png
Normal file
After Width: | Height: | Size: 8.8 KiB |
BIN
snuffmoji/tongue_out_winking.png
Normal file
After Width: | Height: | Size: 8.6 KiB |
BIN
snuffmoji/triumph.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
snuffmoji/upside_down.png
Normal file
After Width: | Height: | Size: 8.2 KiB |
BIN
snuffmoji/vomiting.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
snuffmoji/wink.png
Normal file
After Width: | Height: | Size: 8.6 KiB |
BIN
snuffmoji/woozy.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
snuffmoji/yawning.png
Normal file
After Width: | Height: | Size: 9.3 KiB |
BIN
snuffmoji/zany.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
snuffmoji/zipper_mouth.png
Normal file
After Width: | Height: | Size: 8.6 KiB |
|
@ -71,3 +71,7 @@ hr {
|
|||
.postactions {
|
||||
float: right;
|
||||
}
|
||||
.reactionaction {
|
||||
height: 2rem;
|
||||
vertical-align: bottom;
|
||||
}
|