From 27a2120edc3a7eec153199b3fc753c8e64f03410 Mon Sep 17 00:00:00 2001 From: Alexander Andreev Date: Sat, 21 Feb 2026 15:02:13 +0300 Subject: [PATCH] Public: add overview labels for detail and catalog pages --- index.php | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index 117ff8d..01af69c 100644 --- a/index.php +++ b/index.php @@ -246,6 +246,12 @@ if ($isTopicMode && $activeTopicName !== '') { $catalogLocationLabel = 'Раздел: ' . $sectionNames[$activeSectionId]; } +$showCatalogOverview = !$photo && ($isTopicMode || $isSectionMode); +$catalogOverviewTitle = $isTopicMode + ? $activeTopicName + : ($isSectionMode && isset($sectionNames[$activeSectionId]) ? $sectionNames[$activeSectionId] : ''); +$catalogOverviewCountLabel = count($photos) . ' фото'; + function h(string $v): string { return htmlspecialchars($v, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8'); } function assetUrl(string $path): string { $f=__DIR__ . '/' . ltrim($path,'/'); $v=is_file($f)?(string)filemtime($f):(string)time(); return $path . '?v=' . rawurlencode($v); } function limitText(string $text, int $len): string { return function_exists('mb_substr') ? mb_substr($text, 0, $len) : substr($text, 0, $len); } @@ -458,6 +464,9 @@ function outputWatermarked(string $path, string $mime): never .detail .stack{display:grid;gap:14px;grid-template-columns:1fr;margin:0 0 18px} .detail-frame{display:grid;gap:6px} .detail-frame-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap} + .detail-frame-head-left{display:flex;align-items:center;gap:10px;flex-wrap:wrap} + .catalog-overview{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:0 0 10px} + .catalog-overview-count{margin-left:auto} .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} @@ -579,12 +588,16 @@ function outputWatermarked(string $path, string $mime): never 0 && $photo): ?>
+
- + 0): ?>
-
До обработки
+
+ 0): ?>
комментариев
+
Есть улучшенная версия
+
@@ -647,6 +660,12 @@ function outputWatermarked(string $path, string $mime): never
+ +
+
+
+
+