Replace /post's managed filepond field with a controlled 'photos' field
(theme forms/fields/photos) + picker logic in post-form.js: magic-byte
sniff (ISO-BMFF ftyp brands, not filename/MIME), lazy import('heic-to')
only for real HEIC (deferred 3MB chunk via ESM splitting), per-thumbnail
converting/uploading/done/error states, in-flight counter gating Submit,
and fail-closed skip on conversion failure. Converted JPEGs POST to Grav's
AJAX file-upload route into the form flash (the only path copyFiles reads),
so add-page-by-form attaches them on submit. Web-format photos pass through.
Refs R8, R9, R16, R17, AE1, AE4, KTD4.
68 lines
2.0 KiB
CSS
68 lines
2.0 KiB
CSS
/*
|
|
* /post form bundle CSS. U3 scope: make the EasyMDE editor usable without the
|
|
* FontAwesome dependency (toolbar glyphs supplied here). Field Notes theming,
|
|
* mobile layout, and the "More options" disclosure land in U5.
|
|
*/
|
|
|
|
/* EasyMDE toolbar glyphs — replace the FontAwesome icons EasyMDE expects. */
|
|
.editor-toolbar .mde-btn::before {
|
|
font-style: normal;
|
|
font-weight: 400;
|
|
font-family: inherit;
|
|
}
|
|
.editor-toolbar .mde-bold::before { content: 'B'; font-weight: 700; }
|
|
.editor-toolbar .mde-italic::before { content: 'I'; font-style: italic; }
|
|
.editor-toolbar .mde-ul::before { content: '\2022\2002\2014'; } /* • — */
|
|
.editor-toolbar .mde-link::before { content: '\1F517'; } /* 🔗 */
|
|
.editor-toolbar .mde-preview::before { content: '\1F441'; } /* 👁 */
|
|
|
|
.EasyMDEContainer .CodeMirror {
|
|
min-height: 180px;
|
|
}
|
|
|
|
/* ── Photo picker (U4) — functional states; Field Notes polish in U5 ── */
|
|
.photo-picker__list {
|
|
list-style: none;
|
|
margin: 0.5rem 0 0;
|
|
padding: 0;
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 0.5rem;
|
|
}
|
|
.photo-card {
|
|
position: relative;
|
|
width: 84px;
|
|
height: 84px;
|
|
border-radius: 6px;
|
|
overflow: hidden;
|
|
background: rgba(0, 0, 0, 0.06);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
.photo-card__thumb {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
display: block;
|
|
}
|
|
.photo-card__state {
|
|
position: absolute;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
padding: 2px 4px;
|
|
font-size: 0.7rem;
|
|
line-height: 1.2;
|
|
text-align: center;
|
|
color: #fff;
|
|
background: rgba(0, 0, 0, 0.55);
|
|
}
|
|
.photo-card.is-done .photo-card__state { background: rgba(31, 107, 90, 0.85); }
|
|
.photo-card.is-error {
|
|
background: rgba(176, 0, 32, 0.12);
|
|
outline: 2px solid rgba(176, 0, 32, 0.5);
|
|
}
|
|
.photo-card.is-error .photo-card__state { background: rgba(176, 0, 32, 0.85); }
|
|
.photo-card.is-converting .photo-card__thumb { opacity: 0.4; }
|