Files
immich-magic-proxy/app/public/style.css
T

570 lines
12 KiB
CSS

/* Theme tokens, the Inter font, the page base and the page header come from @ipp/core's theme.css */
/* ===== Justified-rows / square-grid gallery (tiles are absolute-positioned by JS) ===== */
#gallery {
/* Container is a positioned box; tiles are absolute-positioned by JS.
Container height is set explicitly so the scrollbar reflects the full
virtualized layout. */
position: relative;
margin: 0 var(--gutter) var(--gutter);
}
@media (max-width: 640px) {
/* Tiles go edge-to-edge on mobile, so the gallery doesn't use --gutter */
#gallery {
margin: 0;
}
}
#gallery a {
position: absolute;
display: block;
overflow: hidden;
text-decoration: none;
cursor: pointer;
background-color: var(--color-gray);
background-size: cover;
background-position: center;
background-repeat: no-repeat;
/* left / top / width / height set per-tile by the client layout module;
background-image is the decoded thumbhash placeholder, set by `tiles.ts`. */
}
#gallery img {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
opacity: 0;
transition: opacity 0.25s ease-out;
}
/* Fade the thumbnail in once its bytes are decoded (web.js adds .loaded on
the img's load event). While opacity is 0 the <a>'s thumbhash / gray
background shows through, so the blurred thumbhash appears to resolve into
the sharp image rather than snap. Also masks the brief white flash Chrome /
Edge paint between `img.src` being set and the bytes actually rendering. */
#gallery img.loaded {
opacity: 1;
}
#gallery a.thumb-error img {
display: none;
}
/* ===== Group headers (visible when ipp.groupGalleryByDate is enabled) ===== */
.group-header {
position: absolute;
left: 0;
right: 0;
margin: 0;
padding: 16px 0 8px;
font-size: 18px;
font-weight: 500;
line-height: 1.2;
letter-spacing: -0.01em;
color: var(--color-fg);
white-space: nowrap;
}
@media (max-width: 640px) {
/* On mobile the gallery itself goes edge-to-edge, so the headers need
their own left padding to keep the text away from the screen edge. */
.group-header {
padding-left: var(--gutter);
}
}
/* ===== Selection mode (checkmark + selected state) ===== */
.tile-check {
position: absolute;
top: 10px;
left: 10px;
width: 24px;
height: 24px;
border-radius: 50%;
border: 2px solid rgba(255, 255, 255, 0.9);
background-color: rgba(0, 0, 0, 0.25);
opacity: 0;
transition: opacity 0.15s, background-color 0.15s, border-color 0.15s;
z-index: 2;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
}
#gallery.select-mode .tile-check {
opacity: 1;
}
/* Hover reveal only where hover is real: iOS spends a first tap on it #294 */
@media (hover: hover) {
#gallery a:hover .tile-check {
opacity: 1;
}
}
/* Long-press selects these tiles, so iOS mustn't open its link preview and menu */
#gallery a:has(.tile-check),
#gallery a:has(.tile-check) img {
-webkit-touch-callout: none;
-webkit-user-select: none;
user-select: none;
}
/* Touch outside select mode: no invisible tap target. Long-press selects */
@media (hover: none) {
#gallery:not(.select-mode) .tile-check {
pointer-events: none;
}
}
.tile-check svg {
width: 16px;
height: 16px;
color: #fff;
display: none;
}
#gallery a.selected .tile-check {
background-color: var(--color-primary);
border-color: var(--color-primary);
opacity: 1;
}
#gallery a.selected .tile-check svg {
display: block;
}
#gallery a.selected {
outline: 3px solid var(--color-primary);
outline-offset: -3px;
}
.play-icon {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 50px;
height: 50px;
background-image: url('/share/static/images/play.png');
background-size: contain;
background-repeat: no-repeat;
opacity: 0.5;
}
#gallery a:has(.play-icon):hover .play-icon {
opacity: 1;
}
/* Motion photo (Live Photo) indicator, top-right to match Immich's grid */
.motion-icon {
position: absolute;
top: 4px;
right: 4px;
width: 24px;
height: 24px;
color: #fff;
opacity: 0.85;
filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
pointer-events: none;
}
.motion-icon svg {
width: 100%;
height: 100%;
}
#album-description {
margin: 0;
padding: 0 var(--gutter) 16px;
color: var(--color-fg);
opacity: 0.7;
font-size: 15px;
line-height: 1.5;
white-space: pre-wrap;
}
@media (max-width: 640px) {
#album-description {
padding-bottom: 12px;
font-size: 14px;
}
}
/* ===== Selection toolbar (fixed at top while select-mode is active) ===== */
#select-toolbar {
position: fixed;
top: 0;
left: 0;
right: 0;
height: 56px;
background: var(--color-bg);
border-bottom: 1px solid color-mix(in srgb, var(--color-fg) 10%, transparent);
display: flex;
align-items: center;
gap: 4px;
padding: 0 8px;
z-index: 100;
box-shadow: 0 1px 6px color-mix(in srgb, var(--color-fg) 6%, transparent);
}
/* The display rule above is more specific than the browser's default
[hidden] { display: none } - explicitly override so the toolbar honors
the hidden attribute. */
#select-toolbar[hidden] {
display: none;
}
.toolbar-btn {
display: inline-flex;
align-items: center;
justify-content: center;
width: 44px;
height: 44px;
padding: 0;
border-radius: 50%;
background: transparent;
border: none;
color: var(--color-fg);
cursor: pointer;
transition: background-color 0.15s;
}
.toolbar-btn:hover,
.toolbar-btn:focus-visible {
background-color: color-mix(in srgb, var(--color-fg) 10%, transparent);
outline: none;
}
.toolbar-btn svg {
width: 22px;
height: 22px;
}
#select-count {
flex: 1 1 auto;
min-width: 0;
padding: 0 12px;
font-size: 16px;
font-weight: 500;
color: var(--color-fg);
}
.toolbar-btn-text {
flex: 0 0 auto;
padding: 8px 16px;
background: transparent;
border: none;
color: var(--color-fg);
cursor: pointer;
border-radius: 20px;
font-size: 14px;
font-weight: 500;
transition: background-color 0.15s;
}
.toolbar-btn-text:hover,
.toolbar-btn-text:focus-visible {
background-color: color-mix(in srgb, var(--color-fg) 10%, transparent);
outline: none;
}
@media (max-width: 640px) {
#select-toolbar {
height: 48px;
}
#select-count {
font-size: 15px;
padding: 0 8px;
}
.toolbar-btn-text {
padding: 6px 12px;
font-size: 13px;
}
}
/* ============================================================================
Info sidebar. Docks to the right of the lightbox on desktop; becomes a
bottom sheet on narrow viewports.
============================================================================ */
.ipp-sidebar {
position: fixed;
top: 0;
right: 0;
bottom: 0;
width: 360px;
background: var(--color-bg);
color: var(--color-fg);
border-left: 1px solid var(--color-gray);
z-index: 1700;
transform: translateX(100%);
transition: transform 200ms ease;
overflow-y: auto;
font-family: var(--font-sans);
font-size: 14px;
line-height: 1.5;
display: flex;
flex-direction: column;
padding: 0 8px 24px;
}
html.ipp-sidebar-open .ipp-sidebar {
transform: translateX(0);
}
/* On narrow viewports the sidebar becomes a bottom sheet so the photo isn't
crowded out. PhotoSwipe paddingFn skips the right-padding in this mode. */
@media (max-width: 640px) {
.ipp-sidebar {
top: auto;
width: 100%;
height: 60vh;
border-left: none;
border-top: 1px solid var(--color-gray);
transform: translateY(100%);
}
html.ipp-sidebar-open .ipp-sidebar {
transform: translateY(0);
}
}
.ipp-sidebar-header {
display: flex;
align-items: center;
gap: 8px;
padding: 12px 4px 8px;
position: sticky;
top: 0;
background: var(--color-bg);
z-index: 1;
}
.ipp-sidebar-close {
display: inline-flex;
align-items: center;
justify-content: center;
width: 40px;
height: 40px;
border: none;
border-radius: 50%;
background: transparent;
color: var(--color-fg);
cursor: pointer;
padding: 0;
}
.ipp-sidebar-close:hover {
background: rgba(127, 127, 127, 0.15);
}
.ipp-sidebar-close svg {
width: 22px;
height: 22px;
}
.ipp-sidebar-title {
font-size: 18px;
}
.ipp-sidebar-section {
padding: 8px 16px;
}
.ipp-sidebar-heading {
font-size: 13px;
opacity: 0.7;
margin: 8px 0 4px;
font-weight: 500;
}
.ipp-sidebar-description {
margin: 0;
padding: 8px 0 16px;
white-space: pre-wrap;
word-break: break-word;
}
.ipp-sidebar-row {
display: flex;
gap: 16px;
padding: 12px 0;
}
.ipp-sidebar-row-icon {
flex: 0 0 auto;
width: 24px;
color: var(--color-fg);
opacity: 0.8;
}
.ipp-sidebar-row-icon svg {
width: 24px;
height: 24px;
display: block;
}
.ipp-sidebar-row-body {
flex: 1 1 auto;
min-width: 0;
}
.ipp-sidebar-row-body p {
margin: 0 0 4px;
word-break: break-word;
}
.ipp-sidebar-filename {
font-weight: 500;
}
.ipp-sidebar-lens {
font-weight: 500;
}
.ipp-sidebar-stats {
display: flex;
flex-wrap: wrap;
gap: 8px 12px;
font-size: 13px;
opacity: 0.8;
}
.ipp-sidebar-date-primary {
font-weight: 500;
}
.ipp-sidebar-row-body .ipp-sidebar-date-secondary {
margin-bottom: 0;
}
.ipp-sidebar-coords {
font-size: 13px;
opacity: 0.7;
margin: 4px 0 4px;
}
.ipp-sidebar-osm {
color: var(--color-primary);
text-decoration: underline;
font-size: 13px;
}
.ipp-sidebar-empty {
padding: 16px;
opacity: 0.6;
text-align: center;
}
/* ============================================================================
Comments, the last section of the sidebar
============================================================================ */
.ipp-sidebar-comments {
border-top: 1px solid var(--color-gray);
margin-top: 8px;
}
.ipp-sidebar-comments-only {
border-top: none;
margin-top: 0;
}
.ipp-comments-list .ipp-sidebar-empty {
padding: 8px 0;
text-align: left;
}
.ipp-comment {
padding: 10px 0;
border-bottom: 1px solid rgba(127, 127, 127, 0.2);
}
.ipp-comment header {
display: flex;
align-items: baseline;
gap: 8px;
flex-wrap: wrap;
}
.ipp-comment time {
font-size: 12px;
opacity: 0.6;
}
.ipp-comment p {
margin: 4px 0 0;
white-space: pre-wrap;
word-break: break-word;
}
.ipp-comment-delete {
border: none;
background: none;
color: var(--color-fg);
opacity: 0.6;
font-size: 12px;
padding: 4px 0 0;
cursor: pointer;
}
.ipp-comment-delete:hover {
opacity: 1;
text-decoration: underline;
}
.ipp-comment-form {
display: flex;
flex-direction: column;
gap: 8px;
padding-top: 12px;
}
.ipp-comment-input {
width: 100%;
box-sizing: border-box;
resize: vertical;
min-height: 64px;
font: inherit;
color: var(--color-fg);
background: var(--color-bg);
border: 1px solid var(--color-gray);
border-radius: 8px;
padding: 8px 10px;
}
.ipp-comment-input:focus {
outline: 2px solid var(--color-primary);
outline-offset: -1px;
}
.ipp-comment-submit {
align-self: flex-end;
border: none;
border-radius: 999px;
padding: 6px 18px;
background: var(--color-primary);
color: var(--color-bg);
font: inherit;
font-weight: 500;
cursor: pointer;
}
.ipp-comment-submit:disabled {
opacity: 0.5;
cursor: default;
}
.ipp-comment-error {
margin: 0;
color: var(--color-danger);
font-size: 13px;
}
/* Count badge on the lightbox's comments and heart buttons */
.pswp__button--comments-toggle,
.pswp__button--heart {
position: relative;
}
/* Outline heart until hearted, then a filled red one */
.pswp__top-bar .pswp__button--heart .ipp-heart-on { display: none; }
.pswp__top-bar .pswp__button--heart.ipp-hearted .ipp-heart-off { display: none; }
.pswp__top-bar .pswp__button--heart.ipp-hearted .ipp-heart-on { display: block; color: #ff4d6d; }
.ipp-heart-badge,
.ipp-comment-badge {
position: absolute;
top: 8px;
right: 6px;
min-width: 16px;
height: 16px;
padding: 0 4px;
box-sizing: border-box;
border-radius: 8px;
background: var(--color-primary);
color: #fff;
font: 600 10px/16px var(--font-sans);
text-align: center;
pointer-events: none;
}