moved footer to layout. changed some css

This commit is contained in:
t1enne
2022-10-22 10:45:54 +02:00
parent f6e158ab88
commit 917248fc5b
13 changed files with 60 additions and 29 deletions

View File

@@ -1,3 +1,5 @@
@import '../../../styles/mixins.scss';
.root { .root {
position: relative; position: relative;
display: flex; display: flex;
@@ -54,14 +56,14 @@
} }
.sendButton { .sendButton {
display: none;
border: none; border: none;
background: none; background: none;
cursor: pointer; cursor: pointer;
padding: 0 1rem; padding: 0 1rem;
display: none;
// Only show the chat send button on narrow screens to assist in mobile use. // Only show the chat send button on narrow screens to assist in mobile use.
@media (max-width: 768px) { @include screen(desktop) {
display: block; display: block;
} }
} }

View File

@@ -1,3 +1,5 @@
@import '../../../styles/mixins.scss';
.root { .root {
position: relative; position: relative;
display: grid; display: grid;
@@ -10,7 +12,7 @@
.logoTitleSection { .logoTitleSection {
display: flex; display: flex;
@media (max-width: 768px) { @include screen(desktop) {
flex-direction: column; flex-direction: column;
.logo { .logo {
margin-left: auto; margin-left: auto;
@@ -29,14 +31,14 @@
.title { .title {
font-family: var(--theme-text-display-font-family); font-family: var(--theme-text-display-font-family);
color: var(--theme-color-palette-0); color: var(--theme-color-palette-0);
font-size: 2rem; font-size: 1.7rem;
font-weight: bold; font-weight: bold;
line-height: 30px; line-height: 30px;
} }
.subtitle { .subtitle {
font-size: 1.5rem; font-size: 1.2rem;
font-weight: 300; font-weight: 400;
line-height: 1.3; line-height: 1.3;
color: var(--theme-color-background-header); color: var(--theme-color-background-header);
max-width: 900px; max-width: 900px;

View File

@@ -1,7 +1,7 @@
/* eslint-disable react/no-danger */ /* eslint-disable react/no-danger */
/* eslint-disable react/no-unescaped-entities */ /* eslint-disable react/no-unescaped-entities */
import { Layout } from 'antd'; import { Layout } from 'antd';
import { useRecoilValue } from 'recoil'; import { useRecoilState, useRecoilValue } from 'recoil';
import Head from 'next/head'; import Head from 'next/head';
import { FC, useEffect, useRef } from 'react'; import { FC, useEffect, useRef } from 'react';
import { import {
@@ -9,6 +9,7 @@ import {
isChatAvailableSelector, isChatAvailableSelector,
clientConfigStateAtom, clientConfigStateAtom,
fatalErrorStateAtom, fatalErrorStateAtom,
isMobileAtom,
} from '../stores/ClientConfigStore'; } from '../stores/ClientConfigStore';
import { Content } from '../ui/Content/Content'; import { Content } from '../ui/Content/Content';
import { Header } from '../ui/Header/Header'; import { Header } from '../ui/Header/Header';
@@ -21,10 +22,12 @@ import { TitleNotifier } from '../TitleNotifier/TitleNotifier';
// @ts-ignore // @ts-ignore
import ServerRenderedMetadata from '../ServerRendered/ServerRenderedMetadata.html'; import ServerRenderedMetadata from '../ServerRendered/ServerRenderedMetadata.html';
import Footer from '../ui/Footer/Footer';
export const Main: FC = () => { export const Main: FC = () => {
const [isMobile] = useRecoilState<boolean | undefined>(isMobileAtom);
const clientConfig = useRecoilValue<ClientConfig>(clientConfigStateAtom); const clientConfig = useRecoilValue<ClientConfig>(clientConfigStateAtom);
const { name, title, customStyles } = clientConfig; const { name, title, customStyles, version } = clientConfig;
const isChatAvailable = useRecoilValue<boolean>(isChatAvailableSelector); const isChatAvailable = useRecoilValue<boolean>(isChatAvailableSelector);
const fatalError = useRecoilValue<DisplayableError>(fatalErrorStateAtom); const fatalError = useRecoilValue<DisplayableError>(fatalErrorStateAtom);
@@ -90,6 +93,7 @@ export const Main: FC = () => {
{fatalError && ( {fatalError && (
<FatalErrorStateModal title={fatalError.title} message={fatalError.message} /> <FatalErrorStateModal title={fatalError.title} message={fatalError.message} />
)} )}
{!isMobile && <Footer version={version} />}
</Layout> </Layout>
</> </>
); );

View File

@@ -1,10 +1,15 @@
@import '../../../styles/mixins.scss';
.root { .root {
display: grid; display: grid;
grid-template-columns: 1fr auto; grid-template-columns: 1fr auto;
height: 100%;
width: 100%; width: 100%;
background-color: var(--theme-color-background-main); background-color: var(--theme-color-background-main);
@include screen(desktop) {
height: var(--content-height);
}
.mainSection { .mainSection {
display: flex; display: flex;
overflow-y: scroll; overflow-y: scroll;
@@ -40,3 +45,4 @@
height: 100%; height: 100%;
grid-template-rows: 1fr auto; grid-template-rows: 1fr auto;
} }

View File

@@ -355,7 +355,7 @@ export const Content: FC = () => {
{showChat && !isMobile && <Sidebar />} {showChat && !isMobile && <Sidebar />}
</AntContent> </AntContent>
</Spin> </Spin>
{!isMobile && <Footer version={version} />} {!isMobile && false && <Footer version={version} />}
</div> </div>
{externalActionToDisplay && ( {externalActionToDisplay && (

View File

@@ -5,7 +5,7 @@
} }
.customPageContent { .customPageContent {
font-size: 1.1rem; font-size: 1rem;
line-height: 1.6em; line-height: 1.6em;
color: var(--theme-color-palette-0); color: var(--theme-color-palette-0);
padding: calc(2 * var(--content-padding)); padding: calc(2 * var(--content-padding));
@@ -20,7 +20,7 @@
} }
div.summary { div.summary {
font-size: 1.1rem; font-size: 0.9rem;
} }
p { p {

View File

@@ -1,13 +1,15 @@
.footer { .footer {
display: flex; display: flex;
align-items: center;
height: var(--footer-height);
justify-content: space-between; justify-content: space-between;
flex-direction: row; flex-direction: row;
background-color: var(--theme-color-background-header); background-color: var(--theme-color-background-header);
width: 100%; width: 100%;
color: var(--theme-color-components-text-on-dark); color: var(--theme-color-components-text-on-dark);
font-family: var(--theme-text-body-font-family); font-family: var(--theme-text-body-font-family);
padding: 0.6em; padding: 0 .6rem;
font-size: 0.8rem; font-size: 0.8rem;
font-weight: 600; font-weight: 600;
border-top: 1px solid rgba(214, 211, 211, 0.5); border-top: 1px solid rgba(214, 211, 211, 0.5);

View File

@@ -1,6 +1,7 @@
.header { .header {
position: sticky; position: sticky;
top: 0px; top: 0px;
height: var(--header-height) !important;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;

View File

@@ -1,14 +1,14 @@
@import '../../../styles/mixins.scss';
.root { .root {
background-color: var(--theme-color-background-chat); background-color: var(--theme-color-background-chat);
display: none; display: none;
} @include screen(desktop) {
position: sticky;
@media (min-width: 768px) { display: block;
.root {
position: sticky;
display: block;
} }
} }
/* /*
First div is .ant-layout-sider-children First div is .ant-layout-sider-children
Only way to target it apparently Only way to target it apparently

View File

@@ -10,8 +10,4 @@
background-color: var(--component-background); background-color: var(--component-background);
font-family: var(--theme-text-display-font-family); font-family: var(--theme-text-display-font-family);
font-weight: 600; font-weight: 600;
.right {
color: red;
}
} }

View File

@@ -1,9 +1,15 @@
@import '../../../styles/mixins.scss';
.player { .player {
height: auto !important; height: auto !important;
width: 100%; width: 100%;
video { video {
position: static !important; position: static !important;
} }
@include screen(desktop) {
height: 30vh !important;
}
} }
.poster { .poster {
@@ -11,8 +17,3 @@
height: 100%; height: 100%;
} }
@media (max-width: 768px) {
.player {
height: 30vh !important;
}
}

View File

@@ -4,10 +4,14 @@
@import '@fontsource/open-sans/800.css'; @import '@fontsource/open-sans/800.css';
@import '@fontsource/poppins/400.css'; @import '@fontsource/poppins/400.css';
@import '@fontsource/poppins/600.css'; @import '@fontsource/poppins/600.css';
@import './mixins.scss';
:root { :root {
--content-padding: 12px; --content-padding: 12px;
--module-spacing: 12px; // margin size between lines of stuff, if needed --module-spacing: 12px; // margin size between lines of stuff, if needed
--header-height: 4rem; // needed for making main content scrollable;
--footer-height: 2.5rem; // needed for making main content scrollable;
--content-height: calc(100vh - var(--header-height) - var(--footer-height));
} }
::selection { ::selection {

View File

@@ -3,3 +3,16 @@
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
@mixin screen ($breakpoint) {
@if $breakpoint == desktop {
@media only screen and (min-width: 768px) {
@content;
}
}
@if $breakpoint == mobile {
@media only screen and (max-width: 481px) {
@content;
}
}
}