diff --git a/motorradig/public/css/custom.css b/motorradig/public/css/custom.css index 730b19e..ec7fb03 100644 --- a/motorradig/public/css/custom.css +++ b/motorradig/public/css/custom.css @@ -176,3 +176,470 @@ p { text-decoration: none; cursor: pointer; } + +/* ========================================================= + Bildergalerie (Tour-Galerie) + ========================================================= */ +.gallery-page { + --gallery-accent: #4ea1ff; + --gallery-radius: 16px; + max-width: 1240px; + margin: 1.25rem auto 3rem; + padding: clamp(1.1rem, 3vw, 2.75rem); + color: #e8edf5; + background: + radial-gradient(1200px 500px at 15% -10%, rgba(78, 161, 255, .16), transparent 60%), + linear-gradient(160deg, rgba(13, 17, 23, .94), rgba(13, 17, 23, .84)); + border: 1px solid rgba(255, 255, 255, .08); + border-radius: 24px; + box-shadow: 0 30px 80px rgba(0, 0, 0, .45); + -webkit-backdrop-filter: blur(6px); + backdrop-filter: blur(6px); +} + +.gallery-bitmap { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +.gallery-back { + display: inline-flex; + align-items: center; + gap: .45rem; + margin-bottom: .9rem; + color: #a9c0dd; + font-size: .9rem; + text-decoration: none; + transition: color .2s ease; +} +.gallery-back:hover, +.gallery-back:focus { + color: #fff; + text-decoration: none; +} +.gallery-back svg { flex: 0 0 auto; } + +.gallery-head { + display: flex; + flex-wrap: wrap; + align-items: flex-end; + justify-content: space-between; + gap: 1rem; + margin-bottom: 1.75rem; +} + +.gallery-eyebrow { + margin: 0 0 .35rem; + color: #8fb7e8; + font-size: .72rem; + font-weight: 700; + letter-spacing: .22em; + text-transform: uppercase; +} +.gallery-eyebrow--danger { color: #ff9d9d; } + +.gallery-title { + margin: 0; + color: #fff; + font-size: clamp(1.8rem, 4vw, 2.8rem); + font-weight: 800; + letter-spacing: -.02em; + line-height: 1.1; +} + +.gallery-head-meta { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: .6rem; +} + +.gallery-count { + display: inline-flex; + align-items: center; + gap: .45rem; + padding: .42rem .9rem; + color: #d7e3f4; + font-size: .85rem; + white-space: nowrap; + background: rgba(255, 255, 255, .08); + border: 1px solid rgba(255, 255, 255, .12); + border-radius: 999px; +} +.gallery-count svg { opacity: .75; } + +.gallery-manage-link { + display: inline-flex; + align-items: center; + padding: .42rem .9rem; + color: #ffb4b4; + font-size: .85rem; + text-decoration: none; + background: rgba(229, 72, 77, .12); + border: 1px solid rgba(229, 72, 77, .35); + border-radius: 999px; + transition: background .2s ease, color .2s ease; +} +.gallery-manage-link:hover, +.gallery-manage-link:focus { + color: #fff; + text-decoration: none; + background: rgba(229, 72, 77, .85); +} + +.gallery-grid { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); + gap: 16px; +} + +.gallery-item { + position: relative; + margin: 0; + aspect-ratio: 4 / 3; + overflow: hidden; + background: #0d1117; + border-radius: var(--gallery-radius); + box-shadow: 0 8px 24px rgba(0, 0, 0, .35); + animation: gallery-in .5s both; + animation-delay: calc(var(--i, 0) * 35ms); +} + +@keyframes gallery-in { + from { opacity: 0; transform: translateY(12px); } + to { opacity: 1; transform: none; } +} + +.gallery-item-link { + position: relative; + display: block; + width: 100%; + height: 100%; + color: inherit; +} + +.gallery-item-link:focus { + outline: 2px solid var(--gallery-accent); + outline-offset: -3px; +} + +.gallery-item img { + display: block; + width: 100%; + height: 100%; + object-fit: cover; + transform: scale(1.001); + transition: transform .6s cubic-bezier(.2, .7, .3, 1), filter .4s ease; +} + +.gallery-item:hover img, +.gallery-item:focus-within img { + transform: scale(1.06); + filter: brightness(.82); +} + +.gallery-overlay { + position: absolute; + inset: 0; + display: flex; + align-items: center; + justify-content: center; + padding: 14px; + background: linear-gradient(to top, rgba(0, 0, 0, .58), rgba(0, 0, 0, .04) 60%); + opacity: 0; + transition: opacity .35s ease; + pointer-events: none; +} + +.gallery-item:hover .gallery-overlay, +.gallery-item:focus-within .gallery-overlay { + opacity: 1; +} + +.gallery-zoom { + display: grid; + place-items: center; + width: 46px; + height: 46px; + color: #fff; + background: rgba(255, 255, 255, .14); + border: 1px solid rgba(255, 255, 255, .55); + border-radius: 50%; + transform: translateY(8px); + transition: transform .35s ease, background .2s ease; + -webkit-backdrop-filter: blur(2px); + backdrop-filter: blur(2px); +} + +.gallery-item:hover .gallery-zoom { + transform: none; + background: rgba(255, 255, 255, .24); +} + +.gallery-delete { + position: absolute; + top: 10px; + right: 10px; + z-index: 2; + margin: 0; +} + +.gallery-delete button { + display: grid; + place-items: center; + width: 32px; + height: 32px; + padding: 0; + color: #ffb4b4; + font-size: 19px; + line-height: 1; + cursor: pointer; + background: rgba(10, 12, 16, .68); + border: 1px solid rgba(255, 255, 255, .35); + border-radius: 50%; + transition: background .2s ease, color .2s ease, transform .2s ease; +} +.gallery-delete button:hover, +.gallery-delete button:focus { + color: #fff; + background: #e5484d; + transform: scale(1.06); +} + +.gallery-badge { + position: absolute; + top: 10px; + left: 10px; + z-index: 2; + padding: .2rem .55rem; + color: #ffd7d7; + font-size: .68rem; + font-weight: 700; + letter-spacing: .08em; + text-transform: uppercase; + background: rgba(229, 72, 77, .82); + border-radius: 6px; +} + +.gallery-restore { + position: absolute; + right: 10px; + bottom: 10px; + left: 10px; + z-index: 2; + margin: 0; +} + +.gallery-restore button { + width: 100%; + padding: .4rem .6rem; + color: #d8ffe4; + font-size: .82rem; + font-weight: 600; + cursor: pointer; + background: rgba(18, 120, 64, .82); + border: 1px solid rgba(255, 255, 255, .3); + border-radius: 9px; + transition: background .2s ease, color .2s ease; +} +.gallery-restore button:hover, +.gallery-restore button:focus { + color: #fff; + background: #15803d; +} + +.gallery-empty { + padding: clamp(2.5rem, 6vw, 4.5rem) 1.5rem; + color: #9fb0c7; + text-align: center; + background: rgba(255, 255, 255, .02); + border: 1px dashed rgba(255, 255, 255, .22); + border-radius: 20px; +} +.gallery-empty svg { margin-bottom: 1rem; opacity: .55; } +.gallery-empty-title { + margin: 0 0 .35rem; + color: #e8edf5; + font-size: 1.1rem; + font-weight: 700; +} +.gallery-empty-text { margin: 0; font-size: .92rem; } + +.gallery-upload { + margin-top: 2.5rem; + padding: clamp(1.25rem, 3vw, 2rem); + color: #1f2937; + background: rgba(255, 255, 255, .97); + border-radius: 20px; + box-shadow: 0 20px 50px rgba(0, 0, 0, .35); +} + +.gallery-upload h2 { + margin: 0; + color: #111827; + font-size: 1.25rem; + font-weight: 700; +} +.gallery-upload p { + margin: .3rem 0 0; + color: #6b7280; + font-size: .9rem; +} + +.gallery-drop { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + gap: .3rem; + margin: 1.25rem 0 0; + padding: 1.9rem 1rem; + color: #475569; + text-align: center; + cursor: pointer; + background: #f8fafc; + border: 2px dashed #cbd5e1; + border-radius: 16px; + transition: border-color .2s ease, background .2s ease, color .2s ease; +} +.gallery-drop:hover, +.gallery-drop:focus-within, +.gallery-drop.is-dragover { + color: #1d4ed8; + background: #eff6ff; + border-color: #3b82f6; +} +.gallery-drop svg { opacity: .8; } +.gallery-drop-title { font-weight: 600; color: #1e293b; } +.gallery-drop-hint { font-size: .85rem; color: #64748b; } + +.gallery-file-input { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +.gallery-preview { margin-top: 1rem; } +.gallery-preview-count { + margin: 0 0 .55rem; + color: #334155; + font-size: .85rem; + font-weight: 600; +} +.gallery-preview-grid { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); + gap: 8px; +} +.gallery-preview-item { + position: relative; + margin: 0; + aspect-ratio: 1 / 1; + overflow: hidden; + background: #e2e8f0; + border-radius: 10px; +} +.gallery-preview-item img { + display: block; + width: 100%; + height: 100%; + object-fit: cover; +} +.gallery-preview-more { + display: grid; + place-items: center; + color: #475569; + font-size: .8rem; + font-weight: 600; +} + +.gallery-upload-actions { + display: flex; + justify-content: flex-end; + margin-top: 1.1rem; +} + +.gallery-btn { + padding: .55rem 1.4rem; + font-weight: 600; + border-radius: 10px; +} + +@media (max-width: 575.98px) { + .gallery-page { + margin: .5rem .35rem 2rem; + padding: 1rem; + border-radius: 18px; + } + .gallery-grid { + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 10px; + } + .gallery-head { margin-bottom: 1.25rem; } + .gallery-head-meta { gap: .4rem; } + .gallery-upload { margin-top: 1.5rem; } +} + +@media (hover: none) { + .gallery-overlay { + opacity: .9; + background: linear-gradient(to top, rgba(0, 0, 0, .35), transparent 55%); + } + .gallery-zoom { + width: 36px; + height: 36px; + transform: none; + opacity: .9; + } +} + +@media (prefers-reduced-motion: reduce) { + .gallery-item, + .gallery-item img, + .gallery-overlay, + .gallery-zoom { + animation: none !important; + transition: none !important; + } +} + +/* Papierkorb-Variante der Galerie */ +.gallery-page--deleted { + background: + radial-gradient(1200px 500px at 15% -10%, rgba(229, 72, 77, .16), transparent 60%), + linear-gradient(160deg, rgba(13, 17, 23, .94), rgba(13, 17, 23, .84)); +} +.gallery-page--deleted .gallery-item img { + filter: grayscale(.35) brightness(.85); +} +.gallery-page--deleted .gallery-item:hover img, +.gallery-page--deleted .gallery-item:focus-within img { + filter: none; +} + +/* Upload-Button in der Galerie */ +.gallery-btn, +.gallery-btn:focus { + color: #fff; + background-color: #2f6fdb; + border-color: #2f6fdb; + box-shadow: 0 8px 20px rgba(47, 111, 219, .35); +} +.gallery-btn:hover { + color: #fff; + background-color: #1d5bc4; + border-color: #1d5bc4; +} diff --git a/motorradig/src/helpers.php b/motorradig/src/helpers.php index 7467e37..779be87 100644 --- a/motorradig/src/helpers.php +++ b/motorradig/src/helpers.php @@ -289,6 +289,15 @@ function asset(string $path): string return '/' . ltrim($path, '/'); } +/** Asset-Pfad mit Änderungszeit als Cache-Buster (z. B. /css/app.css?v=123). */ +function asset_versioned(string $path): string +{ + $file = public_path($path); + $version = is_file($file) ? filemtime($file) : false; + + return asset($path) . ($version !== false ? '?v=' . $version : ''); +} + /** Aktueller Anfrage-Pfad (ohne Query-String). */ function current_path(): string { diff --git a/motorradig/views/layout.php b/motorradig/views/layout.php index 1f4d0b1..69bc0e8 100644 --- a/motorradig/views/layout.php +++ b/motorradig/views/layout.php @@ -17,13 +17,13 @@ <?= e(config('app.name')) ?> - + - - - - + + + + diff --git a/motorradig/views/tour/gallery/show.php b/motorradig/views/tour/gallery/show.php index 95573b0..ff664c6 100644 --- a/motorradig/views/tour/gallery/show.php +++ b/motorradig/views/tour/gallery/show.php @@ -4,10 +4,40 @@ $flashError = flash_pull('error'); $uploadReady = $upload_ready ?? true; $uploadLimit = $upload_limit ?? ini_get('upload_max_filesize'); + $imageCount = count($imagelist); + $lightboxGroup = 'tour-galerie-' . $tour_id; ?> -
-

+ -
- -
+
+ -

Hochladen

-
- - - -

- JPG, PNG, GIF oder WebP – maximal pro Bild. +

+ + diff --git a/motorradig/views/tour/gallery/show_deleted.php b/motorradig/views/tour/gallery/show_deleted.php index e44a54f..3ea0370 100644 --- a/motorradig/views/tour/gallery/show_deleted.php +++ b/motorradig/views/tour/gallery/show_deleted.php @@ -1,25 +1,78 @@ -
-

-

Gelöschte Bilder

+ -
- -
- - Zurück +
+