diff options
Diffstat (limited to 'public')
| -rw-r--r-- | public/index.php | 39 | ||||
| -rw-r--r-- | public/static/style.css | 9 |
2 files changed, 23 insertions, 25 deletions
diff --git a/public/index.php b/public/index.php index d09aeab..d6ad180 100644 --- a/public/index.php +++ b/public/index.php @@ -128,7 +128,8 @@ if (FILE_CATALOG_FANCY_VIEW && $file_id) { } if (isset($file['duration'])) { - array_push($file['resolution'], format_timestamp(new DateTime()->setTimestamp(time() + $file['duration']))); + $dur = format_timestamp(new DateTime()->setTimestamp(time() + $file['duration'])); + array_push($file['resolution'], empty($file['resolution']) ? $dur : "($dur)"); } if (isset($file['line_count'])) { @@ -171,26 +172,7 @@ $privacy_exists = is_file($_SERVER['DOCUMENT_ROOT'] . '/static/PRIVACY.txt'); </noscript> <?php if ($file): ?> - <div class="row"> - <?php html_mini_navbar() ?> - <div class="font-small column grow justify-end align-bottom"> - <div class="row gap-8 grow align-bottom"> - <p title="<?= $file['size'] ?>B"><?= $file['size_formatted'] ?></p> - <p><?= $file['mime'] ?> (<?= $file['extension'] ?>)</p> - <?php if (isset($file['resolution'])): ?> - <p><?= $file['resolution'] ?></p> - <?php endif; ?> - </div> - <div class="row gap-8 grow align-bottom"> - <p>Uploaded <?= format_timestamp($file['uploaded_at']) ?> ago</p> - </div> - <div class="row gap-8 grow align-bottom"> - <?php if (FILE_COUNT_VIEWS && isset($file['views'])): ?> - <p><?= $file['views'] ?> views</p> - <?php endif; ?> - </div> - </div> - </div> + <?php html_mini_navbar() ?> <?php display_alert() ?> @@ -208,7 +190,7 @@ $privacy_exists = is_file($_SERVER['DOCUMENT_ROOT'] . '/static/PRIVACY.txt'); <?php if ($file_exists): ?> <section class="file-preview-wrapper"> <section class="box"> - <div class="tab row gap-8"> + <div class="tab row wrap gap-8"> <div class="grow"> <?php if (isset($file['title'])): ?> <p><i><?= $file['title'] ?></i></p> @@ -260,7 +242,20 @@ $privacy_exists = is_file($_SERVER['DOCUMENT_ROOT'] . '/static/PRIVACY.txt'); <p><i>This file cannot be displayed.</i></p> <?php endif; ?> </div> + </section> + + <div class="font-small row wrap justify-end gap-16 align-bottom"> + <p title="<?= $file['size'] ?>B"><?= $file['size_formatted'] ?></p> + <p><?= $file['mime'] ?> (<?= $file['extension'] ?>)</p> + <?php if (isset($file['resolution'])): ?> + <p><?= $file['resolution'] ?></p> + <?php endif; ?> + <p title="<?= $file['uploaded_at'] ?>">Uploaded <?= format_timestamp($file['uploaded_at']) ?> ago</p> + <?php if (FILE_COUNT_VIEWS && isset($file['views'])): ?> + <p><?= $file['views'] ?> views</p> + <?php endif; ?> + </div> </section> <?php endif; ?> <?php else: ?> diff --git a/public/static/style.css b/public/static/style.css index 1d640a3..d11ca82 100644 --- a/public/static/style.css +++ b/public/static/style.css @@ -245,9 +245,8 @@ button[type=submit].fancy:hover { /** FILES */ .file-preview-wrapper { display: flex; - flex-direction: row; - justify-content: center; - align-items: center; + flex-direction: column; + gap: 16px; } .file-preview-wrapper>.box { @@ -314,6 +313,10 @@ button[type=submit].fancy:hover { flex-grow: 1; } +.wrap { + flex-wrap: wrap; +} + .grid { display: grid; } |
