diff options
| author | ilotterytea <iltsu@alright.party> | 2025-06-25 00:16:32 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-06-25 00:16:32 +0500 |
| commit | a60c9f70d3a493d63c288a671f32db409c2da929 (patch) | |
| tree | d83f4a8667573b34ff33187b8a1a36286dd1f65b /public/index.php | |
| parent | 17cdae613d339d31aacabfd232fdd9f67bea6c3a (diff) | |
upd: pixel thumbnails
Diffstat (limited to 'public/index.php')
| -rw-r--r-- | public/index.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/public/index.php b/public/index.php index 4d912c3..2e37828 100644 --- a/public/index.php +++ b/public/index.php @@ -655,6 +655,7 @@ $privacy_exists = is_file($_SERVER['DOCUMENT_ROOT'] . '/static/PRIVACY.txt'); <?php if (FILE_THUMBNAILS): ?> let thumbnailPath = `<?= FILE_THUMBNAIL_DIRECTORY_PREFIX ?>/${file.id}.webp`; let thumbnailSize = "width: 64px; height: 64px;"; + let thumbnailClass = "thumbnail stock"; if (file.mime.startsWith('audio/')) { thumbnailPath = '/static/img/icons/file_audio.png'; } else if (file.mime.startsWith('text/')) { @@ -665,6 +666,7 @@ $privacy_exists = is_file($_SERVER['DOCUMENT_ROOT'] . '/static/PRIVACY.txt'); thumbnailPath = '/static/img/icons/file.png'; } else { thumbnailSize = 'max-width:100%; max-height: 100%;'; + thumbnailClass = "thumbnail"; } <?php endif; ?> @@ -673,7 +675,7 @@ $privacy_exists = is_file($_SERVER['DOCUMENT_ROOT'] . '/static/PRIVACY.txt'); <?php if (FILE_THUMBNAILS): ?> <div class="column align-center justify-center grow"> <div class="column justify-center align-center" style="width: 128px; height:128px;"> - <p><i><img src="${thumbnailPath}" alt="No thumbnail." style="${thumbnailSize}" loading="lazy"></i></p> + <p><i><img src="${thumbnailPath}" alt="No thumbnail." style="${thumbnailSize}" loading="lazy" class="${thumbnailClass}"></i></p> </div> </div> <?php endif; ?> |
