summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
Diffstat (limited to 'public')
-rw-r--r--public/emotes/index.php33
-rw-r--r--public/system/emotes/index.php33
2 files changed, 52 insertions, 14 deletions
diff --git a/public/emotes/index.php b/public/emotes/index.php
index 78828e1..8706319 100644
--- a/public/emotes/index.php
+++ b/public/emotes/index.php
@@ -245,13 +245,32 @@ if (CLIENT_REQUIRES_JSON) {
<?php
if ($emote != null) { ?>
<div class="box content">
- <div class="emote-showcase">
- <img src="/static/userdata/emotes/<?php echo $emote->get_id() ?>/1x.webp"
- alt="<?php echo $emote->get_code() ?>">
- <img src="/static/userdata/emotes/<?php echo $emote->get_id() ?>/2x.webp"
- alt="<?php echo $emote->get_code() ?>">
- <img src="/static/userdata/emotes/<?php echo $emote->get_id() ?>/3x.webp"
- alt="<?php echo $emote->get_code() ?>">
+ <div class="emote-showcase items-bottom">
+ <?php
+ for ($size = 1; $size < 4; $size++) {
+ echo '<div class="column items-center small-gap">';
+
+ echo '<img src="/static/userdata/emotes/';
+ echo $emote->get_id();
+ echo "/{$size}x.webp\"";
+ echo 'title="' . $emote->get_code() . '" />';
+
+ $path = $_SERVER["DOCUMENT_ROOT"] . '/static/userdata/emotes/' . $emote->get_id() . "/{$size}x.webp";
+
+ echo '<div class="column items-center">';
+
+ if ($file_size = filesize($path)) {
+ $kb = sprintf("%.2f", $file_size / 1024);
+ echo "<p class='font-small'>{$kb}KB</p>";
+ }
+
+ if ($image_size = getimagesize($path)) {
+ echo "<p class='font-small'>$image_size[0]x$image_size[1]</p>";
+ }
+
+ echo '</div></div>';
+ }
+ ?>
</div>
</div>
</section>
diff --git a/public/system/emotes/index.php b/public/system/emotes/index.php
index bcc1441..2a48408 100644
--- a/public/system/emotes/index.php
+++ b/public/system/emotes/index.php
@@ -121,13 +121,32 @@ if (isset($_GET["id"])) {
?>
</div>
<div class="box content">
- <div class="emote-showcase">
- <img src="/static/userdata/emotes/<?php echo $emote["id"] ?>/1x.webp"
- alt="<?php echo $emote["id"] ?>">
- <img src="/static/userdata/emotes/<?php echo $emote["id"] ?>/2x.webp"
- alt="<?php echo $emote["id"] ?>">
- <img src="/static/userdata/emotes/<?php echo $emote["id"] ?>/3x.webp"
- alt="<?php echo $emote["id"] ?>">
+ <div class="emote-showcase items-bottom">
+ <?php
+ for ($size = 1; $size < 4; $size++) {
+ echo '<div class="column items-center small-gap">';
+
+ echo '<img src="/static/userdata/emotes/';
+ echo $emote["id"];
+ echo "/{$size}x.webp\"";
+ echo 'title="' . $emote["code"] . '" />';
+
+ $path = $_SERVER["DOCUMENT_ROOT"] . '/static/userdata/emotes/' . $emote["id"] . "/{$size}x.webp";
+
+ echo '<div class="column items-center">';
+
+ if ($file_size = filesize($path)) {
+ $kb = sprintf("%.2f", $file_size / 1024);
+ echo "<p class='font-small'>{$kb}KB</p>";
+ }
+
+ if ($image_size = getimagesize($path)) {
+ echo "<p class='font-small'>$image_size[0]x$image_size[1]</p>";
+ }
+
+ echo '</div></div>';
+ }
+ ?>
</div>
</div>
</section>