gallery_server_client_s190js/public/css/gallery.css
2026-10-26 11:00:14 +01:00

340 lines
6.3 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;
}
.thumb-filename {
position: absolute;
left: 0;
right: 0;
bottom: 0;
z-index: 25;
box-sizing: border-box;
padding: 4px 5px;
background: rgba(0, 0, 0, 0.78);
color: #fff;
font-size: 10px;
line-height: 1.3;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
pointer-events: none;
}
.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;
}
}
/* ===============================
TIMELINE VIRTUALIZZATA
=============================== */
.gallery-section.gallery-virtualized {
display: block;
position: relative;
box-sizing: border-box;
width: 100%;
padding: 0;
}
.gallery-virtual-window {
position: absolute;
top: 0;
left: 4px;
right: 4px;
display: grid;
align-content: start;
box-sizing: border-box;
}
.gallery-virtual-window > .thumb,
.gallery-virtual-window > .activity-tile {
min-width: 0;
width: 100%;
box-sizing: border-box;
}
/* Evidenzia le miniature selezionate, anche quando ricreate dal renderer */
.thumb.selection-selected,
.activity-tile.selection-selected {
outline: 3px solid #1687ff;
outline-offset: -3px;
}
.thumb.selection-selected::after,
.activity-tile.selection-selected::after {
content: "✓";
position: absolute;
top: 5px;
right: 5px;
z-index: 30;
width: 23px;
height: 23px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
background: #1687ff;
color: #fff;
font-size: 15px;
font-weight: 700;
box-shadow: 0 1px 4px rgba(0,0,0,.35);
pointer-events: none;
}
/* Evita il menu contestuale e la selezione nativa sulle miniature */
.thumb,
.activity-tile,
.thumb img {
-webkit-touch-callout: none;
-webkit-user-select: none;
user-select: none;
-webkit-user-drag: none;
touch-action: pan-y;
}