This commit is contained in:
+245
@@ -749,6 +749,243 @@ input:focus, textarea:focus, .btn:focus-visible, .chip:focus-visible, .vote-btn:
|
||||
|
||||
.post-form-actions .btn { flex: 1 1 10rem; }
|
||||
|
||||
.image-picker {
|
||||
min-width: 0;
|
||||
margin: 10px 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.image-picker legend {
|
||||
margin-bottom: 6px;
|
||||
padding: 0;
|
||||
font-family: var(--mono);
|
||||
font-weight: 500;
|
||||
font-size: 0.68rem;
|
||||
letter-spacing: 0.12em;
|
||||
text-transform: uppercase;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.image-picker-hint {
|
||||
margin: 0 0 8px;
|
||||
color: var(--muted);
|
||||
font-family: var(--mono);
|
||||
font-size: 0.7rem;
|
||||
line-height: 1.5;
|
||||
text-wrap: pretty;
|
||||
}
|
||||
|
||||
.image-dropzone {
|
||||
position: relative;
|
||||
min-height: 108px;
|
||||
display: grid;
|
||||
place-content: center;
|
||||
gap: 8px;
|
||||
padding: 18px 72px 18px 18px;
|
||||
border: 1px dashed var(--zinc);
|
||||
border-radius: 3px;
|
||||
background: #181a1d;
|
||||
transition: border-color 140ms ease, background-color 140ms ease;
|
||||
}
|
||||
|
||||
.image-dropzone:hover,
|
||||
.image-dropzone.is-dragging {
|
||||
border-color: var(--signal);
|
||||
background: #202124;
|
||||
}
|
||||
|
||||
.image-dropzone:focus-within {
|
||||
outline: 2px solid var(--signal);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.image-input {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
z-index: 1;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
opacity: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.image-dropzone-label {
|
||||
display: grid;
|
||||
gap: 3px;
|
||||
pointer-events: none;
|
||||
text-align: center;
|
||||
color: var(--ink);
|
||||
}
|
||||
|
||||
.image-dropzone-label strong {
|
||||
font-family: var(--sans);
|
||||
font-size: 0.95rem;
|
||||
font-weight: 500;
|
||||
letter-spacing: 0;
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
.image-dropzone-label span {
|
||||
color: var(--muted);
|
||||
font-family: var(--mono);
|
||||
font-size: 0.68rem;
|
||||
letter-spacing: 0.05em;
|
||||
}
|
||||
|
||||
.image-picker-count {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
padding: 3px 6px;
|
||||
border: 1px solid var(--line);
|
||||
color: var(--muted);
|
||||
background: var(--panel);
|
||||
font-family: var(--mono);
|
||||
font-size: 0.65rem;
|
||||
letter-spacing: 0.06em;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.image-picker-error {
|
||||
margin: 8px 0 0;
|
||||
color: #ffd0d0;
|
||||
font-family: var(--mono);
|
||||
font-size: 0.72rem;
|
||||
}
|
||||
|
||||
.image-preview-list {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 10px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.image-preview {
|
||||
min-width: 0;
|
||||
display: grid;
|
||||
grid-template-rows: auto 1fr;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 3px;
|
||||
overflow: hidden;
|
||||
background: #141516;
|
||||
}
|
||||
|
||||
.image-preview[hidden] { display: none; }
|
||||
|
||||
.image-preview-media {
|
||||
position: relative;
|
||||
aspect-ratio: 4 / 3;
|
||||
background: var(--bg);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.image-preview-media img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.image-preview-tag {
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
left: 8px;
|
||||
padding: 3px 6px;
|
||||
background: rgba(20, 21, 22, 0.9);
|
||||
border: 1px solid var(--line);
|
||||
color: var(--ink);
|
||||
font-family: var(--mono);
|
||||
font-size: 0.6rem;
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.image-preview-fields {
|
||||
min-width: 0;
|
||||
display: grid;
|
||||
align-content: start;
|
||||
gap: 7px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.image-preview-fields label {
|
||||
display: grid;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.image-preview-name {
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
color: var(--muted);
|
||||
font-family: var(--mono);
|
||||
font-size: 0.68rem;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.image-remove {
|
||||
width: fit-content;
|
||||
min-height: 44px;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: var(--muted);
|
||||
font-family: var(--mono);
|
||||
font-size: 0.68rem;
|
||||
letter-spacing: 0.06em;
|
||||
text-decoration: underline;
|
||||
text-transform: uppercase;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.image-remove:hover { color: #ffd0d0; }
|
||||
.image-remove:focus-visible {
|
||||
outline: 2px solid var(--signal);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.post-image-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 8px;
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.post-image-grid-1 { grid-template-columns: minmax(0, 1fr); }
|
||||
|
||||
.post-image {
|
||||
min-width: 0;
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 3px;
|
||||
background: #141516;
|
||||
}
|
||||
|
||||
.post-image img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
max-height: 32rem;
|
||||
aspect-ratio: 4 / 3;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.post-image-grid-1 .post-image img {
|
||||
height: auto;
|
||||
aspect-ratio: auto;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.post-image figcaption {
|
||||
padding: 8px 10px;
|
||||
border-top: 1px solid var(--line);
|
||||
color: var(--muted);
|
||||
font-family: var(--mono);
|
||||
font-size: 0.7rem;
|
||||
line-height: 1.45;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.post-permalink {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
@@ -797,8 +1034,16 @@ input:focus, textarea:focus, .btn:focus-visible, .chip:focus-visible, .vote-btn:
|
||||
.panel-wrap { padding: 32px; }
|
||||
}
|
||||
|
||||
@media (max-width: 520px) {
|
||||
.image-preview-list,
|
||||
.post-image-grid {
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.btn-primary:hover { filter: none; }
|
||||
.image-dropzone { transition: none; }
|
||||
.submit-progress-bar {
|
||||
width: 100%;
|
||||
animation: none;
|
||||
|
||||
Reference in New Issue
Block a user