diff --git a/system/backend/MIME.md b/system/backend/MIME.md index a150ee6dd7..1384bbc0d2 100644 --- a/system/backend/MIME.md +++ b/system/backend/MIME.md @@ -1,9 +1,11 @@ # Mime Discussion on AC media. The frontend is `/mime/`; the API is `/api/mime`. -The main feed uses square media frames without cropping, loads 12 posts at a -time while scrolling, and preserves loaded posts and position across thread -visits. A load-more button also supports manual loading and retries. +The main feed snaps to one viewport per media item without cropping, following +the tape viewer (`disks/tv.mjs`). It loads 12 posts at a time and preserves the +current item across thread visits and orientation changes. Videos play muted +inline and pause offscreen. A load-more button supports manual loading and +retries. The feed has no category bar, file composer, or footer. `/mimechan/` preserves old hash links through a redirect, and `/api/mimechan` remains an alias. Existing uploaded files and replies stay in `mimechan`. @@ -48,7 +50,7 @@ Painting and tape metadata endpoints expose `discussion` URLs for other clients. Direct entry: `/mime/#/media/painting/abc` (also `tape`, `piece`, or `kidlisp`). The painting viewer includes a Comment button. Other media can be discussed from -their MIME board or direct entry URL. +the main feed or a direct entry URL. The prompt curtain includes a MIME link; entering `mime` opens the same page. The corner word returns to `/prompt`. diff --git a/system/public/mime/index.html b/system/public/mime/index.html index 4d099b561f..7376a51537 100644 --- a/system/public/mime/index.html +++ b/system/public/mime/index.html @@ -50,20 +50,6 @@ header { text-align: left; padding: 1em 1em 0.4em; } header h1 { margin: 0; color: var(--ink); font: 22px/1.5 "YWFTProcessing-Regular", "Berkeley Mono Variable", monospace; } header h1 a { color: inherit; text-decoration: none; } - nav#boards { - display: flex; flex-wrap: wrap; gap: 0.4em 0.8em; - text-align: left; - padding: 0.6em 1em; - border-top: 1px solid var(--card-edge); - border-bottom: 1px solid var(--card-edge); - margin: 0.8em 0 1em; - font-size: 0.9em; - } - nav#boards a { overflow-wrap: anywhere; } - nav#boards a[aria-current="page"] { color: var(--ink); font-weight: bold; } - nav#boards:empty { display: none; } - details { margin-bottom: 1em; } - summary { cursor: pointer; color: var(--link); margin-bottom: 0.5em; } .pages { display: flex; justify-content: space-between; margin-top: 1em; } main { width: 100%; max-width: 80rem; margin: 0; padding: 0 1em; } h2 { color: var(--ink); font-size: 1.2em; } @@ -87,8 +73,6 @@ } form#post textarea { min-height: 4.5em; resize: vertical; } form#post input[readonly] { color: var(--ink); border-color: transparent; background: transparent; } - form#post input[type="file"] { max-width: 100%; min-width: 0; } - form#post .filerow { display: flex; align-items: center; gap: 0.6em; flex-wrap: wrap; } form#post button, .feed-more button { background: var(--ink); color: var(--paper); border: 0; border-radius: 4px; min-height: 44px; @@ -105,8 +89,6 @@ a.discussion:hover, a.discussion:active { background: var(--ink); color: var(--paper); } - #dest { color: var(--green); font-weight: bold; } - #formhint { color: var(--dim); font-size: 0.85em; margin: 0; } #status { color: var(--accent); } .post { @@ -136,68 +118,65 @@ display: inline-block; background: var(--paper); border: 1px dashed var(--card-edge); padding: 0.8em 1.2em; } - .feed-list { display: grid; gap: 1em; max-width: 40rem; } - .feed-post { margin: 0; padding: 0; overflow: hidden; } - .feed-post > .meta { margin: 0.7em 0.85em 0.3em; } - .feed-post > .filemeta { margin: 0.3em 0.85em 0.6em; } - .feed-media { aspect-ratio: 1; width: 100%; overflow: hidden; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; background: var(--paper); } + body.feed { padding: 0; overflow: hidden; } + body.feed header { position: fixed; top: 0; left: 0; z-index: 2; padding-top: max(0.6em, env(safe-area-inset-top)); } + body.feed header a { background: var(--paper); } + body.feed main { + max-width: none; padding: 0; height: 100vh; height: 100dvh; + overflow-y: auto; overscroll-behavior-y: contain; scroll-snap-type: y mandatory; + } + .feed-list { width: 100%; } + .post.feed-post { + position: relative; height: 100vh; height: 100dvh; margin: 0; border: 0; + padding: max(3.5rem, calc(env(safe-area-inset-top) + 2.5rem)) 0 max(0.75rem, env(safe-area-inset-bottom)); + display: flex; flex-direction: column; gap: 0.5em; overflow: hidden; + background: var(--paper); scroll-snap-align: start; scroll-snap-stop: always; + } + .feed-media { + order: -1; flex: 1; min-height: 0; width: 100%; overflow: hidden; + display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; + } .feed-media > * { min-width: 0; min-height: 0; } .feed-media > img, .feed-media > video, .feed-media > iframe.doc { - width: 100%; height: 100%; max-height: none; min-height: 0; object-fit: contain; border: 0; + width: 100%; height: 100%; max-height: none; object-fit: contain; border: 0; } - .feed-media > pre.textfile { width: 100%; height: 100%; max-height: none; min-height: 0; margin: 0; border: 0; } + .feed-media > pre.textfile { width: 100%; height: 100%; max-height: none; margin: 0; border: 0; overscroll-behavior: contain; } .feed-media > audio { width: calc(100% - 2em); } .feed-media > .blob { max-width: calc(100% - 2em); } - .feed-post > .body { padding: 0 0.85em; } - .feed-post > .discussion { margin: 0.7em 0.85em; } - .feed-more { max-width: 40rem; padding: 1em 0; display: flex; align-items: center; gap: 1em; } - .feed-more [role="status"] { color: var(--dim); } - main > details, main > .dir { max-width: 40rem; } - main > .dir { margin-bottom: 1em; } + .feed-post > .meta { margin: 0 0.75rem; } + .feed-post > .body { margin: 0 0.75rem; max-height: 15vh; overflow: auto; } + .feed-post > .discussion { align-self: center; flex-shrink: 0; margin: 0; } + .feed-more { position: absolute; top: max(0.6em, env(safe-area-inset-top)); right: 0.75rem; display: flex; align-items: center; gap: 0.5em; max-width: calc(100% - 6rem); } + .feed-more button { padding: 0.3em 0.6em; } + .feed-more [role="status"] { color: var(--dim); font-size: 0.85em; } + body.feed main > p { margin: 4rem 0.75rem; } .omitted { color: var(--dim); font-size: 0.85em; margin: 0.3em 0; } .replies { margin-left: 1.5em; } @media (max-width: 40em) { .replies { margin-left: 0; } - header, nav#boards { padding-left: 0.75rem; padding-right: 0.75rem; } + header { padding-left: 0.75rem; padding-right: 0.75rem; } main { padding: 0 0.75rem; } .post { padding: 0.6em; } - .feed-post { padding: 0; } - } + } - .dir { display: flex; flex-wrap: wrap; gap: 0.5em; } - .dir a.b { - background: var(--card); border: 1px solid var(--card-edge); - padding: 0.35em 0.6em; text-decoration: none; color: var(--body); overflow-wrap: anywhere; - } - .dir a.b .t { color: var(--ink); font-weight: bold; } - .dir a.b .n { color: var(--dim); font-size: 0.8em; margin-left: 0.5em; } - body.dragging::after { - content: "drop file"; - position: fixed; inset: 0; display: grid; place-items: center; - background: color-mix(in srgb, var(--paper) 80%, transparent); - color: var(--ink); font-size: 1.4em; pointer-events: none; - } - footer { text-align: left; color: var(--dim); font-size: 0.8em; margin-top: 3em; padding: 0 1rem; }