Public: align detail counter with before label on desktop

This commit is contained in:
Alexander Andreev 2026-02-21 14:55:38 +03:00
parent 1a011766bd
commit 5d2662f810

View File

@ -451,11 +451,12 @@ function outputWatermarked(string $path, string $mime): never
.card img{width:100%;height:130px;object-fit:contain;object-position:center;background:#f8fafc} .card img{width:100%;height:130px;object-fit:contain;object-position:center;background:#f8fafc}
.cap{padding:8px;font-size:13px} .cap{padding:8px;font-size:13px}
.detail{padding:18px} .detail{padding:18px}
.detail-head{display:flex;justify-content:flex-end;margin:0 0 10px}
.detail img{max-width:100%;border-radius:10px;border:1px solid #e5e7eb} .detail img{max-width:100%;border-radius:10px;border:1px solid #e5e7eb}
.detail .stack{display:grid;gap:14px;grid-template-columns:1fr;margin:0 0 18px} .detail .stack{display:grid;gap:14px;grid-template-columns:1fr;margin:0 0 18px}
.detail-frame{display:grid;gap:6px} .detail-frame{display:grid;gap:6px}
.detail-frame-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.detail-label{font-size:12px;font-weight:600;color:#4b5563;line-height:1.35} .detail-label{font-size:12px;font-weight:600;color:#4b5563;line-height:1.35}
.detail-position-label{margin-left:auto}
.detail-title{margin:0 0 6px;font-size:24px;line-height:1.2} .detail-title{margin:0 0 6px;font-size:24px;line-height:1.2}
.detail-meta{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px} .detail-meta{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px}
.detail-meta-link{display:inline-flex;align-items:center;padding:6px 10px;border-radius:999px;border:1px solid #dbe3ef;background:#f8fbff;color:#1f3b7a;text-decoration:none;font-size:12px;line-height:1.25} .detail-meta-link{display:inline-flex;align-items:center;padding:6px 10px;border-radius:999px;border:1px solid #dbe3ef;background:#f8fbff;color:#1f3b7a;text-decoration:none;font-size:12px;line-height:1.25}
@ -496,7 +497,7 @@ function outputWatermarked(string $path, string $mime): never
.page{grid-template-columns:1fr} .page{grid-template-columns:1fr}
.sidebar{position:static;max-height:none} .sidebar{position:static;max-height:none}
.pager{display:none} .pager{display:none}
.detail-head{display:none} .detail-position-label{display:none}
.has-mobile-nav .app{padding-bottom:84px} .has-mobile-nav .app{padding-bottom:84px}
.mobile-photo-nav,.mobile-catalog-nav{position:fixed;left:0;right:0;bottom:0;z-index:50;display:grid;align-items:center;gap:8px;padding:10px 12px calc(10px + env(safe-area-inset-bottom));background:rgba(255,255,255,.97);backdrop-filter:blur(6px);border-top:1px solid #e5e7eb} .mobile-photo-nav,.mobile-catalog-nav{position:fixed;left:0;right:0;bottom:0;z-index:50;display:grid;align-items:center;gap:8px;padding:10px 12px calc(10px + env(safe-area-inset-bottom));background:rgba(255,255,255,.97);backdrop-filter:blur(6px);border-top:1px solid #e5e7eb}
@ -574,14 +575,16 @@ function outputWatermarked(string $path, string $mime): never
<main> <main>
<?php if ($activePhotoId > 0 && $photo): ?> <?php if ($activePhotoId > 0 && $photo): ?>
<section class="panel detail"> <section class="panel detail">
<?php if ($detailTotal > 0): ?>
<div class="detail-head"><div class="detail-label">Фото <?= (int)$detailIndex ?> из <?= (int)$detailTotal ?><?= $detailLocationLabel !== '' ? ' ' . h($detailLocationLabel) : '' ?></div></div>
<?php endif; ?>
<?php $hasAfterVersion = !empty($photo['after_file_id']); ?> <?php $hasAfterVersion = !empty($photo['after_file_id']); ?>
<div class="stack"> <div class="stack">
<?php if (!empty($photo['before_file_id'])): ?> <?php if (!empty($photo['before_file_id'])): ?>
<div class="detail-frame"> <div class="detail-frame">
<?php if ($hasAfterVersion): ?><div class="detail-label">До обработки</div><?php endif; ?> <?php if ($hasAfterVersion): ?>
<div class="detail-frame-head">
<div class="detail-label">До обработки</div>
<?php if ($detailTotal > 0): ?><div class="detail-label detail-position-label">Фото <?= (int)$detailIndex ?> из <?= (int)$detailTotal ?><?= $detailLocationLabel !== '' ? ' ' . h($detailLocationLabel) : '' ?></div><?php endif; ?>
</div>
<?php endif; ?>
<div class="img-box"><img src="?action=image&file_id=<?= (int)$photo['before_file_id'] ?>" alt="" decoding="async" fetchpriority="high"></div> <div class="img-box"><img src="?action=image&file_id=<?= (int)$photo['before_file_id'] ?>" alt="" decoding="async" fetchpriority="high"></div>
</div> </div>
<?php endif; ?> <?php endif; ?>