Add favicon and subtle footer author link

This commit is contained in:
Alex Assistant 2026-02-19 17:46:46 +03:00
parent 9635859c2e
commit 8d93605093
5 changed files with 37 additions and 1 deletions

View File

@ -147,5 +147,6 @@ https://<домен>/deploy.php?token=<твой_секрет>
- Превью генерируются в формате JPEG с качеством ~82.
- При первом заходе на большую папку возможно небольшое ожидание (генерация превью).
- CSS/JS подключаются с cache-busting параметром `?v=<filemtime>`, чтобы после деплоя пользователю не приходилось чистить кеш вручную.
- CSS/JS и favicon подключаются с cache-busting параметром `?v=<filemtime>`, чтобы после деплоя пользователю не приходилось чистить кеш вручную.
- В футере публичной страницы есть ненавязчивое авторство со ссылкой: `https://t.me/andr33vru`.
- Для production обычно лучше вынести индексацию в cron/очередь, но для текущей задачи это intentionally on-request.

View File

@ -185,6 +185,7 @@ $photos = $selectedCategory !== '' ? listPhotos($photosDir, $thumbsDir, $selecte
<html lang="ru"><head>
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
<title>Админка галереи</title>
<link rel="icon" type="image/svg+xml" href="<?= h(assetUrl('favicon.svg')) ?>">
<link rel="stylesheet" href="<?= h(assetUrl('style.css')) ?>">
<style>
.admin-wrap{max-width:1150px;margin:0 auto;padding:24px}.card{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:14px;margin-bottom:14px}

12
favicon.svg Normal file
View File

@ -0,0 +1,12 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" role="img" aria-label="Gallery">
<defs>
<linearGradient id="g" x1="0" y1="0" x2="1" y2="1">
<stop offset="0%" stop-color="#1f6feb"/>
<stop offset="100%" stop-color="#0ea5e9"/>
</linearGradient>
</defs>
<rect x="4" y="4" width="56" height="56" rx="12" fill="url(#g)"/>
<rect x="14" y="18" width="36" height="28" rx="4" fill="#ffffff" opacity="0.95"/>
<circle cx="23" cy="26" r="4" fill="#93c5fd"/>
<path d="M18 42l8-8 6 6 8-10 8 12H18z" fill="#1e3a8a"/>
</svg>

After

Width:  |  Height:  |  Size: 552 B

View File

@ -82,6 +82,7 @@ if ($selectedCategory !== null && $selectedCategory !== '' && !isset($categories
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Фотогалерея</title>
<link rel="icon" type="image/svg+xml" href="<?= htmlspecialchars(assetUrl('favicon.svg'), ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8') ?>">
<link rel="stylesheet" href="<?= htmlspecialchars(assetUrl('style.css'), ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8') ?>">
</head>
<body>
@ -150,6 +151,7 @@ if ($selectedCategory !== null && $selectedCategory !== '' && !isset($categories
<footer class="footer">
<small>Последняя индексация: <?= file_exists($lastIndexedFile) ? date('Y-m-d H:i:s', (int)trim((string)file_get_contents($lastIndexedFile))) : '—' ?></small>
<small class="footer-author">by <a href="https://t.me/andr33vru" target="_blank" rel="noopener noreferrer">andr33vru</a></small>
</footer>
</div>

View File

@ -167,6 +167,26 @@ h2 {
.footer {
margin-top: 14px;
color: var(--muted);
display: flex;
justify-content: space-between;
align-items: center;
gap: 10px;
flex-wrap: wrap;
}
.footer-author {
opacity: .72;
font-size: 12px;
}
.footer-author a {
color: inherit;
text-decoration: none;
border-bottom: 1px dotted rgba(107, 114, 128, .5);
}
.footer-author a:hover {
opacity: 1;
}
.lightbox {