Adding snufficon
|
@ -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
|
|
||||||
|
|
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
|
<?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
After Width: | Height: | Size: 9.1 KiB |
BIN
snufficon/angry.png
Normal file
After Width: | Height: | Size: 8.6 KiB |
BIN
snufficon/cat_face.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
snufficon/clown.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
snufficon/cold.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
snufficon/cold_sweat.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
snufficon/cowboy.png
Normal file
After Width: | Height: | Size: 8.2 KiB |
BIN
snufficon/cross_eyes.png
Normal file
After Width: | Height: | Size: 8.3 KiB |
BIN
snufficon/disappointed_relieved.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
snufficon/drool.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
snufficon/excited.png
Normal file
After Width: | Height: | Size: 8.8 KiB |
BIN
snufficon/exploding_head.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
snufficon/expressionless.png
Normal file
After Width: | Height: | Size: 7.9 KiB |
BIN
snufficon/fearful.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
snufficon/flush.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
snufficon/giggle.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
snufficon/hand_over_mouth.png
Normal file
After Width: | Height: | Size: 9.3 KiB |
BIN
snufficon/happy.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
snufficon/head_bandage.png
Normal file
After Width: | Height: | Size: 9.4 KiB |
BIN
snufficon/heart_eyes.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
snufficon/holding_back_tears.png
Normal file
After Width: | Height: | Size: 9.8 KiB |
BIN
snufficon/hot.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
snufficon/hug.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
snufficon/joy.png
Normal file
After Width: | Height: | Size: 9.6 KiB |
BIN
snufficon/kissing.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
snufficon/kissing_heart.png
Normal file
After Width: | Height: | Size: 9 KiB |
BIN
snufficon/laughing.png
Normal file
After Width: | Height: | Size: 8.2 KiB |
BIN
snufficon/lying.png
Normal file
After Width: | Height: | Size: 8.2 KiB |
BIN
snufficon/mask.png
Normal file
After Width: | Height: | Size: 7.9 KiB |
BIN
snufficon/melting.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
snufficon/money_face.png
Normal file
After Width: | Height: | Size: 9.9 KiB |
BIN
snufficon/mouthless.png
Normal file
After Width: | Height: | Size: 7.6 KiB |
BIN
snufficon/nerd.png
Normal file
After Width: | Height: | Size: 9.7 KiB |
BIN
snufficon/partying.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
snufficon/peeking_eye.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
snufficon/pleading_face.png
Normal file
After Width: | Height: | Size: 9.7 KiB |
BIN
snufficon/raging.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
snufficon/raised_eyebrow.png
Normal file
After Width: | Height: | Size: 8.7 KiB |
BIN
snufficon/rolling_eyes.png
Normal file
After Width: | Height: | Size: 8.8 KiB |
BIN
snufficon/sad.png
Normal file
After Width: | Height: | Size: 7.9 KiB |
BIN
snufficon/saluting.png
Normal file
After Width: | Height: | Size: 8.5 KiB |
BIN
snufficon/scream.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
snufficon/see_no_evil.png
Normal file
After Width: | Height: | Size: 9.8 KiB |
BIN
snufficon/shrug.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
snufficon/shush.png
Normal file
After Width: | Height: | Size: 9.9 KiB |
BIN
snufficon/sick.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
snufficon/sleeping.png
Normal file
After Width: | Height: | Size: 9 KiB |
BIN
snufficon/smiling.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
snufficon/smiling_with_hearts.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
snufficon/smiling_with_stars.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
snufficon/smirk.png
Normal file
After Width: | Height: | Size: 8.6 KiB |
BIN
snufficon/sneeze.png
Normal file
After Width: | Height: | Size: 9.5 KiB |
BIN
snufficon/sob.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
snufficon/spiral_eyes.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
snufficon/star_struck.png
Normal file
After Width: | Height: | Size: 9.4 KiB |
BIN
snufficon/sunglasses.png
Normal file
After Width: | Height: | Size: 8.6 KiB |
BIN
snufficon/swearing.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
snufficon/sweat.png
Normal file
After Width: | Height: | Size: 8.7 KiB |
BIN
snufficon/sweat_smile.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
snufficon/thermometer.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
snufficon/thinking.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
snufficon/thumbs_down.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
snufficon/thumbs_up.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
snufficon/tongue_out.png
Normal file
After Width: | Height: | Size: 9.3 KiB |
BIN
snufficon/tongue_out_closed_eyes.png
Normal file
After Width: | Height: | Size: 8.8 KiB |
BIN
snufficon/tongue_out_winking.png
Normal file
After Width: | Height: | Size: 8.6 KiB |
BIN
snufficon/triumph.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
snufficon/upside_down.png
Normal file
After Width: | Height: | Size: 8.2 KiB |
BIN
snufficon/vomiting.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
snufficon/wink.png
Normal file
After Width: | Height: | Size: 8.6 KiB |
BIN
snufficon/woozy.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
snufficon/yawning.png
Normal file
After Width: | Height: | Size: 9.3 KiB |
BIN
snufficon/zany.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
snufficon/zipper_mouth.png
Normal file
After Width: | Height: | Size: 8.6 KiB |
|
@ -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;
|
||||||
}
|
}
|