Profile: support wide page

This commit is contained in:
thislight 2024-11-23 16:10:48 +08:00
parent bb3ba32dc5
commit 66d0bc8d84
No known key found for this signature in database
GPG key ID: FCFE5192241CCD4E
3 changed files with 347 additions and 302 deletions

View file

@ -1,9 +1,10 @@
.StackedPage { .StackedPage {
contain: layout style; contain: strict;
container: StackedPage / size; container: StackedPage / inline-size;
display: contents; width: 100vw;
max-width: 100vw; width: 100dvw;
max-width: 100dvw; height: 100vh;
height: 100dvh;
} }
dialog.StackedPage { dialog.StackedPage {

View file

@ -115,6 +115,44 @@
} }
} }
@container StackedPage (inline-size >=960px) {
.Profile {
display: grid;
grid-template-columns: auto 560px;
grid-template-rows: min-content 1fr;
height: 100cqh;
>.topbar {
grid-column: 1 / 3;
grid-row: 1 /2;
.MuiToolbar-root {
padding-right: calc(560px + 24px);
}
}
> .details {
height: 100%;
display: flex;
flex-flow: column nowrap;
> .intro {
flex-grow: 1;
}
}
>.recent-toots {
overflow-y: auto;
margin-top: calc(-1 * var(--scaffold-topbar-height));
z-index: calc(var(--tutu-zidx-nav, 1) + 1);
>.toot-list-toolbar {
top: 0;
}
}
}
}
.Profile__page-title { .Profile__page-title {
flex-grow: 1; flex-grow: 1;
white-space: nowrap; white-space: nowrap;

View file

@ -237,6 +237,7 @@ const Profile: Component = () => {
} }
class="Profile" class="Profile"
> >
<div class="details">
<Menu <Menu
id={optMenuId} id={optMenuId}
open={menuOpen()} open={menuOpen()}
@ -424,7 +425,9 @@ const Profile: Component = () => {
aria-label="Display name" aria-label="Display name"
></Body2> ></Body2>
</div> </div>
<span aria-label="Complete username" class="username">{fullUsername()}</span> <span aria-label="Complete username" class="username">
{fullUsername()}
</span>
</div> </div>
<div role="presentation"> <div role="presentation">
<Switch> <Switch>
@ -493,7 +496,9 @@ const Profile: Component = () => {
</tbody> </tbody>
</table> </table>
</div> </div>
</div>
<div class="recent-toots">
<div class="toot-list-toolbar"> <div class="toot-list-toolbar">
<TootFilterButton <TootFilterButton
options={{ options={{
@ -546,6 +551,7 @@ const Profile: Component = () => {
</IconButton> </IconButton>
</div> </div>
</Show> </Show>
</div>
</Scaffold> </Scaffold>
); );
}; };