server_photo_s85js/public/css/gallery.css
2026-08-11 08:45:04 +02:00

253 lines
4.6 KiB
CSS

.gallery {
display: block;
padding: 6px;
}
.gallery-section-title {
font-size: 18px;
font-weight: 600;
margin: 18px 6px 6px;
color: #444;
}
.gallery-section {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
gap: 4px;
padding: 0 4px;
}
/* ===============================
FOTO / VIDEO THUMBS
=============================== */
.thumb {
width: 100%;
aspect-ratio: 1 / 1;
border-radius: 6px;
overflow: hidden;
background: white;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
position: relative;
cursor: pointer;
}
.thumb img {
width: 100%;
height: 100%;
object-fit: cover;
}
.play-icon {
position: absolute;
bottom: 4px;
right: 4px;
background: rgba(0, 0, 0, 0.55);
color: white;
padding: 2px 4px;
border-radius: 4px;
font-size: 11px;
}
/* ===============================
SOFT DELETE — FOTO + ATTIVITÀ
=============================== */
.soft-deleted {
position: relative;
opacity: 0.55;
}
.soft-deleted::after {
content: "";
position: absolute;
top: 50%;
left: 50%;
width: 70%;
height: 3px;
background: rgba(255, 0, 0, 0.85);
transform: translate(-50%, -50%) rotate(45deg);
pointer-events: none;
z-index: 20;
}
.soft-deleted::before {
content: "";
position: absolute;
top: 50%;
left: 50%;
width: 70%;
height: 3px;
background: rgba(255, 0, 0, 0.85);
transform: translate(-50%, -50%) rotate(-45deg);
pointer-events: none;
z-index: 20;
}
/* ===============================
MODALITÀ ACTIVITIES
=============================== */
body.activities .gallery-section-title {
color: #0033aa;
}
/* Tile attività */
.activity-tile {
width: 100%;
aspect-ratio: 1 / 1;
border-radius: 8px;
overflow: hidden;
background: #111827;
position: relative;
cursor: pointer;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
display: flex;
flex-direction: column;
}
/* Area percorso */
.activity-route-thumb {
width: 100%;
flex: 1 1 auto;
min-height: 0;
background: #0f172a;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
}
.activity-route-thumb.loading {
background: linear-gradient(135deg, #111827, #1f2937);
}
.activity-route-thumb.empty {
background: linear-gradient(135deg, #111827, #1f2937);
}
/* Placeholder caricamento / fallback */
.activity-route-placeholder {
color: rgba(255, 255, 255, 0.72);
font-size: 11px;
line-height: 1.2;
text-align: center;
padding: 8px;
}
/* SVG percorso */
.activity-route-svg {
width: 100%;
height: 100%;
display: block;
}
.activity-route-bg {
fill: #0f172a;
}
.activity-route-line-shadow {
fill: none;
stroke: rgba(0, 0, 0, 0.5);
stroke-width: 7;
stroke-linecap: round;
stroke-linejoin: round;
}
.activity-route-line {
fill: none;
stroke: #38bdf8;
stroke-width: 4;
stroke-linecap: round;
stroke-linejoin: round;
}
.activity-route-start {
fill: #22c55e;
stroke: white;
stroke-width: 1.6;
}
.activity-route-end {
fill: #ef4444;
stroke: white;
stroke-width: 1.6;
}
/* Label attività */
.activity-label {
flex: 0 0 auto;
padding: 6px 7px 1px;
font-size: 12px;
line-height: 1.15;
color: white;
background: rgba(0, 0, 0, 0.52);
backdrop-filter: blur(6px);
-webkit-backdrop-filter: blur(6px);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* Metadati attività */
.activity-meta {
flex: 0 0 auto;
padding: 0 7px 6px;
font-size: 10.5px;
line-height: 1.15;
color: rgba(255, 255, 255, 0.78);
background: rgba(0, 0, 0, 0.52);
backdrop-filter: blur(6px);
-webkit-backdrop-filter: blur(6px);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* Icona fallback, se usata */
.activity-icon {
width: 48px;
height: 48px;
object-fit: contain;
opacity: 0.9;
}
/* Niente play-icon per attività */
body.activities .play-icon {
display: none;
}
/* ===============================
RESPONSIVE / THUMB ATTIVITÀ PIÙ LEGGIBILI
=============================== */
body.activities .gallery-section {
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
gap: 6px;
}
/* Su schermi più larghi, attività un po' più grandi */
@media (min-width: 700px) {
body.activities .gallery-section {
grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
}
/* Su schermi molto piccoli, resta compatto */
@media (max-width: 420px) {
.gallery-section {
grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
}
body.activities .gallery-section {
grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
}
.activity-label {
font-size: 11.5px;
}
.activity-meta {
font-size: 10px;
}
}