summaryrefslogtreecommitdiff
path: root/public/emotes/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'public/emotes/index.php')
-rw-r--r--public/emotes/index.php33
1 files changed, 26 insertions, 7 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>