298 lines
6.3 KiB
SCSS
298 lines
6.3 KiB
SCSS
// Rôle : stylise la visionneuse d'image, sa galerie et son panneau d'annotation.
|
|
.image-viewer-root {
|
|
position: fixed;
|
|
inset: 0;
|
|
z-index: 110;
|
|
display: grid;
|
|
place-items: center;
|
|
padding: var(--space-5);
|
|
overscroll-behavior: contain;
|
|
}
|
|
|
|
.image-viewer-backdrop {
|
|
position: absolute;
|
|
inset: 0;
|
|
background: rgba(2, 3, 9, 0.64);
|
|
backdrop-filter: blur(4px);
|
|
}
|
|
|
|
.image-viewer {
|
|
--viewer-content-max-height: min(80vh, calc(100vh - 140px));
|
|
--viewer-image-height: 400px;
|
|
position: relative;
|
|
display: grid;
|
|
width: min(1500px, calc(100vw - 32px));
|
|
max-height: calc(100vh - 48px);
|
|
gap: var(--space-4);
|
|
padding: var(--space-4);
|
|
border: 1px solid var(--color-border);
|
|
border-radius: var(--radius-xl);
|
|
background: rgba(16, 20, 38, 0.96);
|
|
box-shadow: var(--shadow-lg);
|
|
}
|
|
|
|
.image-viewer header {
|
|
display: grid;
|
|
grid-template-columns: minmax(0, 1fr) auto;
|
|
align-items: center;
|
|
gap: var(--space-2);
|
|
}
|
|
|
|
.image-viewer-heading {
|
|
display: flex;
|
|
min-width: 0;
|
|
align-items: center;
|
|
gap: var(--space-3);
|
|
}
|
|
|
|
.image-viewer-title {
|
|
overflow: hidden;
|
|
color: var(--color-text);
|
|
font-size: var(--font-size-md);
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.image-viewer-position {
|
|
flex: 0 0 auto;
|
|
padding: 3px 9px;
|
|
border: 1px solid rgba(246, 196, 83, 0.22);
|
|
border-radius: var(--radius-pill);
|
|
background: rgba(246, 196, 83, 0.08);
|
|
color: var(--color-text-secondary);
|
|
font-size: var(--font-size-xs);
|
|
font-weight: 800;
|
|
}
|
|
|
|
.image-viewer-actions {
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
gap: var(--space-2);
|
|
}
|
|
|
|
.image-viewer-gallery-zoom {
|
|
display: inline-flex;
|
|
gap: 4px;
|
|
}
|
|
|
|
.image-viewer-gallery-zoom-button > span {
|
|
font-size: 20px;
|
|
font-weight: 800;
|
|
line-height: 1;
|
|
}
|
|
|
|
.image-viewer-button {
|
|
flex: 0 0 40px;
|
|
}
|
|
|
|
.image-viewer-body {
|
|
display: grid;
|
|
min-width: 0;
|
|
justify-items: center;
|
|
}
|
|
|
|
.image-viewer-body.has-annotation-side {
|
|
grid-template-columns: minmax(0, 1fr) minmax(240px, 340px);
|
|
gap: var(--space-4);
|
|
align-items: start;
|
|
justify-items: stretch;
|
|
}
|
|
|
|
.image-viewer-body.has-navigation {
|
|
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
align-items: center;
|
|
gap: var(--space-3);
|
|
}
|
|
|
|
.image-viewer-nav {
|
|
align-self: center;
|
|
}
|
|
|
|
.image-viewer-nav .ui-icon {
|
|
transform: rotate(90deg);
|
|
}
|
|
|
|
.image-viewer-nav-next .ui-icon {
|
|
transform: rotate(-90deg);
|
|
}
|
|
|
|
.image-viewer-media {
|
|
display: flex;
|
|
min-width: 0;
|
|
max-width: 100%;
|
|
justify-self: center;
|
|
justify-content: center;
|
|
align-items: start;
|
|
}
|
|
|
|
.image-viewer-media.can-annotate {
|
|
cursor: crosshair;
|
|
}
|
|
|
|
.image-viewer-image-frame {
|
|
position: relative;
|
|
display: block;
|
|
width: fit-content;
|
|
max-width: 100%;
|
|
overflow: hidden;
|
|
border-radius: var(--radius-md);
|
|
line-height: 0;
|
|
}
|
|
|
|
.image-viewer-image-frame img {
|
|
display: block;
|
|
width: auto;
|
|
height: auto;
|
|
max-width: 100%;
|
|
max-height: var(--viewer-content-max-height);
|
|
object-fit: contain;
|
|
}
|
|
|
|
.image-viewer-marker {
|
|
z-index: 3;
|
|
display: inline-grid;
|
|
width: 30px;
|
|
min-width: 30px;
|
|
height: 30px;
|
|
min-height: 30px;
|
|
place-items: center;
|
|
padding: 0;
|
|
border: 1px solid rgba(246, 196, 83, 0.72);
|
|
border-radius: var(--radius-pill);
|
|
background:
|
|
linear-gradient(135deg, rgba(72, 43, 160, 0.96), rgba(45, 52, 146, 0.94)) padding-box,
|
|
linear-gradient(135deg, rgba(246, 196, 83, 0.9), rgba(196, 181, 253, 0.5)) border-box;
|
|
color: #fff;
|
|
font-size: var(--font-size-xs);
|
|
font-weight: 900;
|
|
line-height: 1;
|
|
box-shadow:
|
|
0 0 0 2px rgba(5, 7, 17, 0.72),
|
|
0 0 16px rgba(246, 196, 83, 0.22);
|
|
pointer-events: none;
|
|
}
|
|
|
|
.image-viewer-side {
|
|
display: grid;
|
|
align-content: start;
|
|
grid-template-rows: auto auto;
|
|
gap: var(--space-3);
|
|
min-width: 0;
|
|
width: 100%;
|
|
max-width: 340px;
|
|
height: min(var(--viewer-image-height), var(--viewer-content-max-height));
|
|
max-height: min(var(--viewer-image-height), var(--viewer-content-max-height));
|
|
overflow: hidden;
|
|
padding: 12px;
|
|
border: 1px solid rgba(165, 180, 252, 0.12);
|
|
border-radius: var(--radius-md);
|
|
background:
|
|
linear-gradient(135deg, rgba(139, 92, 246, 0.045), transparent 62%),
|
|
rgba(7, 10, 24, 0.38);
|
|
}
|
|
|
|
.image-viewer-side strong {
|
|
color: var(--color-text-secondary);
|
|
font-size: var(--font-size-sm);
|
|
}
|
|
|
|
.image-viewer-side .annotation-marker-list {
|
|
min-width: 0;
|
|
max-height: 100%;
|
|
align-content: start;
|
|
grid-auto-rows: max-content;
|
|
overflow-y: auto;
|
|
overscroll-behavior: contain;
|
|
padding: 4px 4px 4px 0;
|
|
}
|
|
|
|
.image-viewer.is-gallery {
|
|
min-width: 0;
|
|
overflow: hidden;
|
|
height: min(860px, calc(100vh - 48px));
|
|
grid-template-rows: auto minmax(0, 1fr);
|
|
}
|
|
|
|
.image-viewer-gallery {
|
|
--image-gallery-thumbnail-width: 260px;
|
|
--image-gallery-card-ratio: 4 / 3;
|
|
display: flex;
|
|
width: 100%;
|
|
max-width: 100%;
|
|
min-height: 0;
|
|
min-width: 0;
|
|
flex-wrap: wrap;
|
|
align-content: start;
|
|
justify-content: center;
|
|
gap: 12px;
|
|
overflow-x: hidden;
|
|
overflow-y: auto;
|
|
overscroll-behavior: contain;
|
|
padding: 20px 28px 28px;
|
|
}
|
|
|
|
.image-viewer-gallery[data-card-ratio="1:1"] {
|
|
--image-gallery-card-ratio: 1 / 1;
|
|
}
|
|
|
|
.image-viewer-gallery-item {
|
|
display: grid;
|
|
width: min(100%, var(--image-gallery-thumbnail-width));
|
|
max-width: 100%;
|
|
min-width: 0;
|
|
aspect-ratio: var(--image-gallery-card-ratio);
|
|
flex: 0 1 var(--image-gallery-thumbnail-width);
|
|
grid-template-rows: minmax(0, 1fr) auto;
|
|
align-self: flex-start;
|
|
gap: 8px;
|
|
padding: 10px;
|
|
color: var(--color-text);
|
|
text-align: left;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.image-viewer-gallery-item.is-active {
|
|
border-color: rgba(246, 196, 83, 0.52);
|
|
box-shadow: inset 0 0 0 1px rgba(246, 196, 83, 0.16);
|
|
}
|
|
|
|
.image-viewer-gallery-frame {
|
|
display: grid;
|
|
width: 100%;
|
|
height: 100%;
|
|
min-height: 0;
|
|
place-items: center;
|
|
overflow: hidden;
|
|
border-radius: var(--radius-md);
|
|
background: rgba(5, 7, 17, 0.72);
|
|
}
|
|
|
|
.image-viewer-gallery-frame img {
|
|
display: block;
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: contain;
|
|
}
|
|
|
|
.image-viewer-gallery-caption {
|
|
display: grid;
|
|
width: 100%;
|
|
min-width: 0;
|
|
grid-template-columns: minmax(0, 1fr) auto;
|
|
align-items: center;
|
|
gap: var(--space-2);
|
|
}
|
|
|
|
.image-viewer-gallery-caption strong {
|
|
overflow: hidden;
|
|
color: var(--color-text-secondary);
|
|
font-size: var(--font-size-sm);
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.image-viewer-gallery-caption small {
|
|
color: var(--color-text-muted);
|
|
font-size: var(--font-size-xs);
|
|
font-weight: 800;
|
|
}
|