fix: moar sizing fixes

This commit is contained in:
Alejandro Gomez
2023-06-27 17:59:24 +02:00
parent f780f5212c
commit 59f4fa1b81
5 changed files with 59 additions and 28 deletions

View File

@ -4,6 +4,22 @@
flex-direction: column; flex-direction: column;
padding: 8px 16px; padding: 8px 16px;
border: none; border: none;
height: calc(100vh - 56px - 64px - 56px - 230px);
}
@media (min-width: 768px) {
.profile-info {
width: calc(100vw - 600px);
}
.live-chat {
width: calc(100vw - 600px);
height: calc(100vh - 56px - 64px - 16px);
}
.video-content video {
width: 100%;
}
} }
@media (min-width: 1020px) { @media (min-width: 1020px) {
@ -14,8 +30,11 @@
border-radius: 24px; border-radius: 24px;
gap: 16px; gap: 16px;
} }
}
.live-chat {
width: 320px;
}
}
.live-chat>.header { .live-chat>.header {
font-weight: 600; font-weight: 600;

View File

@ -9,17 +9,12 @@
grid-template-rows: 64px 230px 56px 1fr; grid-template-rows: 64px 230px 56px 1fr;
grid-template-columns: 1fr; grid-template-columns: 1fr;
height: 100vh; height: 100vh;
width: 100vw;
} }
.live-chat {
height: calc(100vh - 16px - 64px - 56px - 230px);
}
.page.home { .page.home {
display: grid; display: grid;
height: 100vh; height: 100vh;
width: 100vw;
grid-template-areas: grid-template-areas:
"header" "header"
"main-content"; "main-content";
@ -30,30 +25,25 @@
@media (min-width: 768px) { @media (min-width: 768px) {
.page { .page {
display: grid; display: grid;
width: 100vw;
height: 100vh; height: 100vh;
grid-template-areas: grid-template-areas:
"header header" "header header"
"main-content profile" "main-content profile"
"main-content chat"; "main-content chat";
grid-template-rows: 64px min-content; grid-template-rows: 64px min-content;
grid-template-columns: minmax(600px, 3fr) 1fr; grid-template-columns: 600px 1fr;
gap: 0; gap: 0;
} }
.video-content video { .video-content video {
height: calc(100vh - 64px); height: 100%;
} }
.live-chat {
height: calc(100vh - 56px - 64px - 16px);
}
} }
@media (min-width: 1020px) { @media (min-width: 1020px) {
.page { .page {
display: grid; display: grid;
width: unset;
height: calc(100vh - 72px); height: calc(100vh - 72px);
padding: 0 40px; padding: 0 40px;
grid-template-columns: auto 376px; grid-template-columns: auto 376px;
@ -64,6 +54,7 @@
"profile chat"; "profile chat";
gap: 0; gap: 0;
} }
} }
@media (min-width: 2000px) { @media (min-width: 2000px) {
@ -146,6 +137,16 @@ header .profile img {
} }
} }
button span.hide-on-mobile {
display: none;
}
@media (min-width: 1020px) {
button span.hide-on-mobile {
display: block;
}
}
.popout-chat { .popout-chat {
display: grid; display: grid;
grid-template-areas: grid-template-areas:
@ -159,4 +160,3 @@ header .profile img {
.popout-chat .live-chat { .popout-chat .live-chat {
max-height: unset; max-height: unset;
} }

View File

@ -38,7 +38,7 @@ export function LayoutPage() {
className="btn btn-primary" className="btn btn-primary"
onClick={() => setNewStream(true)} onClick={() => setNewStream(true)}
> >
<span className="new-stream-button-text">New Stream</span> <span className="hide-on-mobile">New Stream</span>
<Icon name="signal" /> <Icon name="signal" />
</button> </button>
<Profile <Profile

View File

@ -4,19 +4,34 @@
.video-content video { .video-content video {
width: 100%;
aspect-ratio: 16/9;
max-height: 230px; max-height: 230px;
width: 100vw;
max-width: 100vw;
}
.live-chat {
max-width: calc(100vw - 32px);
}
.profile-info {
display: flex;
justify-content: space-between;
padding: 0 16px;
width: 100%;
} }
@media (min-width: 768px){ @media (min-width: 768px){
.profile-info { .video-content {
max-height: 42px; height: calc(100vh - 64px);
} }
.video-content video { .video-content video {
max-height: unset; max-height: unset;
} }
.profile-info {
max-height: 42px;
}
} }
.pill { .pill {
@ -30,13 +45,6 @@
color: inherit; color: inherit;
} }
.profile-info {
display: flex;
justify-content: space-between;
padding: 0 16px;
width: 100%;
}
@media (min-width: 1020px) { @media (min-width: 1020px) {
.info { .info {
display: flex; display: flex;
@ -44,6 +52,10 @@
justify-content: space-between; justify-content: space-between;
} }
.video-content video {
width: unset;
}
.profile-info { .profile-info {
width: unset; width: unset;
} }
@ -66,7 +78,7 @@
display: block; display: block;
} }
.video-content video { .video-content {
height: 100%; height: 100%;
} }

View File

@ -87,7 +87,7 @@ function ProfileInfo({ link }: { link: NostrLink }) {
<div className="profile-info flex g24"> <div className="profile-info flex g24">
<Profile pubkey={thisEvent.data?.pubkey ?? ""} /> <Profile pubkey={thisEvent.data?.pubkey ?? ""} />
<button onClick={() => setZap(true)} className="btn btn-primary zap"> <button onClick={() => setZap(true)} className="btn btn-primary zap">
Zap <span className="hide-on-mobile">Zap</span>
<Icon name="zap" size={16} /> <Icon name="zap" size={16} />
</button> </button>
</div> </div>