Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

fix(web): keep footer visible by moving it outside the scroll column

Gabe Kangas23e13a8b6725
diff --git a/web/components/ui/Content/Content.module.scss b/web/components/ui/Content/Content.module.scss
index 9b6f0aaf9c..7fb55cf4b4 100644
--- a/web/components/ui/Content/Content.module.scss
+++ b/web/components/ui/Content/Content.module.scss
@@ -11,11 +11,24 @@
display: flex;
flex-direction: column;
flex: 1 1 auto;
+ min-height: 0;
+ overflow: hidden;
+}
+
+// Holds the scrollable page content. Kept as a separate element from
+// .mainColumn so the Footer can sit outside the scroll region and stay
+// pinned to the bottom of the column instead of being clipped when the
+// content (video player, tabs, etc.) is taller than the viewport.
+.scrollableContent {
+ display: flex;
+ flex-direction: column;
+ flex: 1 1 auto;
+ min-height: 0;
overflow: auto;
}
-.mainColumn::-webkit-scrollbar,
-.mainColumn::-webkit-scrollbar-thumb {
+.scrollableContent::-webkit-scrollbar,
+.scrollableContent::-webkit-scrollbar-thumb {
display: none;
}
diff --git a/web/components/ui/Content/Content.tsx b/web/components/ui/Content/Content.tsx
index c90e61a2f0..136224a4cd 100644
--- a/web/components/ui/Content/Content.tsx
+++ b/web/components/ui/Content/Content.tsx
@@ -243,88 +243,78 @@ export const Content: FC = () => {
return (
<div className={styles.main}>
<div className={styles.mainColumn}>
- {appState.appLoading && (
- <div
- className={classnames([styles.topSectionElement, styles.centerSpinner])}
- style={{ height: '30vh' }}
- >
- <Spin delay={2} size="large" tip="One moment..." />
- </div>
- )}
- <Row>
- {online && (
- <OwncastPlayer
- source="/hls/stream.m3u8"
- online={online}
- title={streamTitle || name}
- className={styles.topSectionElement}
- />
- )}
- {!online && !appState.appLoading && (
- <div id="offline-message" style={{ width: '100%' }}>
- <OfflineBanner
- showsHeader={false}
- streamName={name}
- customText={offlineMessage}
- notificationsEnabled={supportsBrowserNotifications}
- fediverseAccount={fediverseAccount}
- lastLive={lastDisconnectTime}
- onNotifyClick={() => setShowNotifyModal(true)}
- onFollowClick={() => setShowFollowModal(true)}
- className={classnames([styles.topSectionElement, styles.offlineBanner])}
- />
+ <div className={styles.scrollableContent}>
+ {appState.appLoading && (
+ <div
+ className={classnames([styles.topSectionElement, styles.centerSpinner])}
+ style={{ height: '30vh' }}
+ >
+ <Spin delay={2} size="large" tip="One moment..." />
</div>
)}
- </Row>
- <Row>
- {isStreamLive && (
- <Statusbar
- online={online}
- lastConnectTime={lastConnectTime}
- lastDisconnectTime={lastDisconnectTime}
- viewerCount={viewerCount}
- className={classnames(styles.topSectionElement, styles.statusBar)}
- />
- )}
- </Row>
- <Row>
- <ActionButtons
- supportFediverseFeatures={supportFediverseFeatures}
- supportsBrowserNotifications={supportsBrowserNotifications}
- showNotifyReminder={showNotifyReminder}
- setShowNotifyModal={setShowNotifyModal}
- disableNotifyReminderPopup={disableNotifyReminderPopup}
- externalActions={externalActions || []}
- setShowFollowModal={setShowFollowModal}
- externalActionSelected={externalActionSelected}
- />
- </Row>
-
- <Modal
- title="Browser Notifications"
- open={showNotifyModal}
- afterClose={() => disableNotifyReminderPopup()}
- handleCancel={() => disableNotifyReminderPopup()}
- >
- <BrowserNotifyModal />
- </Modal>
- <Row>
- {!name && <Skeleton active loading style={{ marginLeft: '10vw', marginRight: '10vw' }} />}
- {isMobile ? (
- <MobileContent
- name={name}
- summary={summary}
- tags={tags}
- socialHandles={socialHandles}
- extraPageContent={extraPageContent}
- pluginTabs={pluginTabs}
- setShowFollowModal={setShowFollowModal}
+ <Row>
+ {online && (
+ <OwncastPlayer
+ source="/hls/stream.m3u8"
+ online={online}
+ title={streamTitle || name}
+ className={styles.topSectionElement}
+ />
+ )}
+ {!online && !appState.appLoading && (
+ <div id="offline-message" style={{ width: '100%' }}>
+ <OfflineBanner
+ showsHeader={false}
+ streamName={name}
+ customText={offlineMessage}
+ notificationsEnabled={supportsBrowserNotifications}
+ fediverseAccount={fediverseAccount}
+ lastLive={lastDisconnectTime}
+ onNotifyClick={() => setShowNotifyModal(true)}
+ onFollowClick={() => setShowFollowModal(true)}
+ className={classnames([styles.topSectionElement, styles.offlineBanner])}
+ />
+ </div>
+ )}
+ </Row>
+ <Row>
+ {isStreamLive && (
+ <Statusbar
+ online={online}
+ lastConnectTime={lastConnectTime}
+ lastDisconnectTime={lastDisconnectTime}
+ viewerCount={viewerCount}
+ className={classnames(styles.topSectionElement, styles.statusBar)}
+ />
+ )}
+ </Row>
+ <Row>
+ <ActionButtons
supportFediverseFeatures={supportFediverseFeatures}
- online={online}
+ supportsBrowserNotifications={supportsBrowserNotifications}
+ showNotifyReminder={showNotifyReminder}
+ setShowNotifyModal={setShowNotifyModal}
+ disableNotifyReminderPopup={disableNotifyReminderPopup}
+ externalActions={externalActions || []}
+ setShowFollowModal={setShowFollowModal}
+ externalActionSelected={externalActionSelected}
/>
- ) : (
- <div className={desktopStyles.bottomSectionContent}>
- <DesktopContent
+ </Row>
+
+ <Modal
+ title="Browser Notifications"
+ open={showNotifyModal}
+ afterClose={() => disableNotifyReminderPopup()}
+ handleCancel={() => disableNotifyReminderPopup()}
+ >
+ <BrowserNotifyModal />
+ </Modal>
+ <Row>
+ {!name && (
+ <Skeleton active loading style={{ marginLeft: '10vw', marginRight: '10vw' }} />
+ )}
+ {isMobile ? (
+ <MobileContent
name={name}
summary={summary}
tags={tags}
@@ -333,11 +323,25 @@ export const Content: FC = () => {
pluginTabs={pluginTabs}
setShowFollowModal={setShowFollowModal}
supportFediverseFeatures={supportFediverseFeatures}
+ online={online}
/>
- </div>
- )}
- </Row>
- <div style={{ flex: '1 1' }} />
+ ) : (
+ <div className={desktopStyles.bottomSectionContent}>
+ <DesktopContent
+ name={name}
+ summary={summary}
+ tags={tags}
+ socialHandles={socialHandles}
+ extraPageContent={extraPageContent}
+ pluginTabs={pluginTabs}
+ setShowFollowModal={setShowFollowModal}
+ supportFediverseFeatures={supportFediverseFeatures}
+ />
+ </div>
+ )}
+ </Row>
+ <div style={{ flex: '1 1' }} />
+ </div>
<Footer />
</div>
{showChat && !isMobile && currentUser && (