xrdwb17xu: Add the full-screen snap feed with media and quote slides on phones
This commit is contained in:
@@ -120,10 +120,14 @@
|
||||
.feed .composer { margin: 0 14px 4px; }
|
||||
.feed .feed-list { display: flex; flex-direction: column; gap: 16px; padding: 16px 14px 32px; }
|
||||
|
||||
/* Single-column fallback (760px and below, until the Mobile milestone): lists get a usable height. */
|
||||
/* 760px and below: the full-screen feed (spec "Mobile layout"). The feed
|
||||
column fills the app frame and the reel inside it is the only scroller.
|
||||
The side panels are hidden; the phone dock and sheets reach them later. */
|
||||
@container app (max-width: 760px) {
|
||||
.bento-col .panel { flex: 0 0 auto; }
|
||||
.bento-col .panel-scroll { flex: 0 0 auto; max-height: 70vh; }
|
||||
.bento { display: block; padding: 0; overflow: hidden; }
|
||||
.bento-left,
|
||||
.bento-right { display: none; }
|
||||
.bento-center { height: 100%; }
|
||||
}
|
||||
|
||||
/* Account panel ---------------------------------------------------------- */
|
||||
|
||||
@@ -0,0 +1,231 @@
|
||||
/*
|
||||
* Phone feed: full-screen snapping slides (spec "Mobile layout" > "Full-screen
|
||||
* feed", ADR 0001). Ported from the mockup's .reel / .slide / .sl-* rules with
|
||||
* the `slide-` and `reel-` prefixes, tokens only. White, the dark fades and the
|
||||
* dark glass over photos and video come from the --on-media / --media-* tokens.
|
||||
* Only rendered at 760px and below (AppShell measures .app).
|
||||
*/
|
||||
@keyframes slide-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
|
||||
@keyframes slide-shimmer { from { background-position: 120% 0; } to { background-position: -100% 0; } }
|
||||
|
||||
.reel-feed {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
background: var(--bg);
|
||||
}
|
||||
|
||||
.reel {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
overflow-y: auto;
|
||||
scroll-snap-type: y mandatory;
|
||||
overscroll-behavior: contain;
|
||||
scrollbar-width: none;
|
||||
}
|
||||
.reel::-webkit-scrollbar { display: none; }
|
||||
|
||||
.slide {
|
||||
--slide-text-bg: radial-gradient(120% 70% at 0% 0%, var(--accent-soft), transparent 62%), var(--bg);
|
||||
position: relative;
|
||||
height: 100%;
|
||||
scroll-snap-align: start;
|
||||
scroll-snap-stop: always;
|
||||
overflow: hidden;
|
||||
background: var(--slide-text-bg);
|
||||
color: var(--ink);
|
||||
}
|
||||
|
||||
/* Media: edge to edge. Scaled to 104% until the slide is on screen, then eases to 100%. */
|
||||
.slide-media { position: absolute; inset: 0; background: var(--tile-3); }
|
||||
.slide-art {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
transform: scale(1.04);
|
||||
transition: transform 6s ease-out;
|
||||
}
|
||||
.is-cur .slide-art { transform: scale(1); }
|
||||
.slide-video .slide-art video,
|
||||
.slide-video .slide-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
|
||||
.slide-video .slide-art > div { height: 100%; }
|
||||
.slide-pending { display: grid; place-items: center; color: var(--ink-2); font-size: 14px; }
|
||||
.slide-play { z-index: 4; }
|
||||
.slide-dur { top: 128px; right: 16px; z-index: 4; }
|
||||
|
||||
.slide-scrim,
|
||||
.slide-scrim-top { position: absolute; left: 0; right: 0; z-index: 1; pointer-events: none; }
|
||||
.slide-scrim { bottom: 0; height: 58%; background: linear-gradient(180deg, var(--media-fade-0), var(--media-fade)); }
|
||||
.slide-scrim-top { top: 0; height: 150px; background: linear-gradient(180deg, var(--media-fade-top), var(--media-fade-0)); }
|
||||
|
||||
/* Author and text over the bottom fade. */
|
||||
.slide-meta {
|
||||
position: absolute;
|
||||
left: 20px;
|
||||
right: 24px;
|
||||
bottom: 108px;
|
||||
z-index: 3;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
pointer-events: none;
|
||||
}
|
||||
.slide-meta > * { pointer-events: auto; }
|
||||
.slide-on-media .slide-meta { color: var(--on-media); }
|
||||
.slide-who { display: flex; align-items: center; gap: 12px; }
|
||||
.slide-who > div { display: flex; flex-direction: column; min-width: 0; }
|
||||
.slide-who strong { display: flex; align-items: center; font-size: 15px; font-weight: 700; }
|
||||
.slide-who time { font-size: 12.5px; opacity: .72; }
|
||||
.slide-on-media .slide-you { color: var(--on-media); box-shadow: inset 0 0 0 1px var(--on-media-badge); }
|
||||
.slide-text {
|
||||
margin: 0;
|
||||
font-size: 15px;
|
||||
line-height: 1.6;
|
||||
white-space: pre-wrap;
|
||||
overflow-wrap: anywhere;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 3;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
text-shadow: 0 1px 12px var(--media-shadow);
|
||||
}
|
||||
.slide-error { margin: 0; color: var(--danger); font-size: 13px; font-weight: 600; }
|
||||
.slide-on-media .slide-error { color: var(--on-media); }
|
||||
|
||||
/* Text-only post: the text is the hero, a serif quote with a crimson opening mark. */
|
||||
.slide-quote-w { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
|
||||
.slide-quote {
|
||||
position: absolute;
|
||||
left: 24px;
|
||||
right: 28px;
|
||||
top: 46%;
|
||||
transform: translateY(-50%);
|
||||
margin: 0;
|
||||
font-family: var(--font-serif), Georgia, serif;
|
||||
font-size: 31px;
|
||||
font-weight: 600;
|
||||
line-height: 1.2;
|
||||
white-space: pre-wrap;
|
||||
overflow-wrap: anywhere;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 8;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
}
|
||||
.slide-quote::before {
|
||||
content: "\201C";
|
||||
display: block;
|
||||
margin-bottom: 6px;
|
||||
color: var(--accent);
|
||||
font-size: 84px;
|
||||
line-height: .62;
|
||||
}
|
||||
|
||||
/* The slide on screen: its content rises in when it snaps into place. */
|
||||
.is-cur .slide-meta,
|
||||
.is-cur .slide-quote-w { animation: slide-rise .7s var(--ease) both; }
|
||||
|
||||
/* Own-post menu: frosted "..." at the top right, the card's delete confirm under it. */
|
||||
.slide-menu { position: absolute; top: 70px; right: 12px; z-index: 6; }
|
||||
.slide-menu-btn {
|
||||
appearance: none;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
border-radius: 14px;
|
||||
color: var(--ink);
|
||||
background: var(--glass);
|
||||
-webkit-backdrop-filter: blur(16px) saturate(1.6);
|
||||
backdrop-filter: blur(16px) saturate(1.6);
|
||||
box-shadow: inset 0 0 0 1px var(--line);
|
||||
cursor: pointer;
|
||||
transition: transform .15s, background-color .2s;
|
||||
}
|
||||
.slide-menu-btn svg { width: 20px; height: 20px; }
|
||||
.slide-menu-btn:active { transform: scale(.92); }
|
||||
.slide-menu-btn:disabled { cursor: default; }
|
||||
.slide-on-media .slide-menu-btn {
|
||||
color: var(--on-media);
|
||||
background: var(--media-glass);
|
||||
box-shadow: inset 0 0 0 1px var(--on-media-line);
|
||||
}
|
||||
.slide-menu .post-pop { min-width: 230px; }
|
||||
|
||||
/* Loading slide: a skeleton card in the middle while the next page loads. */
|
||||
.slide-load { background: var(--bg); }
|
||||
.slide-load .sentinel { position: absolute; top: 0; left: 0; right: 0; }
|
||||
.slide-load-body {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
gap: 14px;
|
||||
padding: 0 22px 110px;
|
||||
}
|
||||
.slide-skel {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
padding: 16px;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: var(--r-card);
|
||||
}
|
||||
.slide-skel-head { display: flex; align-items: center; gap: 12px; }
|
||||
.slide-skel-lines { flex: 1; display: flex; flex-direction: column; gap: 8px; }
|
||||
.slide-skel i {
|
||||
display: block;
|
||||
height: 12px;
|
||||
border-radius: 6px;
|
||||
background: linear-gradient(90deg, var(--tile-2) 0%, var(--tile-3) 40%, var(--tile-2) 80%);
|
||||
background-size: 220% 100%;
|
||||
animation: slide-shimmer 1.4s linear infinite;
|
||||
}
|
||||
.slide-skel .slide-skel-hex {
|
||||
flex: none;
|
||||
width: 46px;
|
||||
height: 53px;
|
||||
border-radius: 0;
|
||||
clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
|
||||
}
|
||||
|
||||
/* Empty feed or a failed page, as a slide. */
|
||||
.slide-message {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 4px;
|
||||
padding: 0 24px 110px;
|
||||
text-align: center;
|
||||
color: var(--ink-3);
|
||||
}
|
||||
|
||||
/* New-posts pill floats over the top of the reel. */
|
||||
.reel-pill {
|
||||
position: absolute;
|
||||
top: 76px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 8;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
pointer-events: none;
|
||||
animation: feed-pill-in .45s var(--ease) backwards;
|
||||
}
|
||||
.reel-pill > * { pointer-events: auto; }
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.is-cur .slide-meta,
|
||||
.is-cur .slide-quote-w,
|
||||
.slide-skel i,
|
||||
.reel-pill { animation: none !important; }
|
||||
.slide-art { transition: none !important; }
|
||||
}
|
||||
Reference in New Issue
Block a user