1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 04:46:40 +07:00

fixed player position

This commit is contained in:
Fedor Katurov 2021-10-13 17:57:26 +07:00
parent 6761ca6330
commit 2ce39efef8
4 changed files with 17 additions and 12 deletions

View file

@ -5,17 +5,16 @@ import { selectUser } from '~/redux/auth/selectors';
import { pick } from 'ramda'; import { pick } from 'ramda';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
const mapStateToProps = state => pick(['is_user'], selectUser(state)); type IProps = {};
type IProps = ReturnType<typeof mapStateToProps> & {}; const BottomContainer: FC<IProps> = () => (
const BottomContainerUnconnected: FC<IProps> = ({ is_user }) => (
<div className={styles.wrap}> <div className={styles.wrap}>
<div className={styles.content}> <div className={styles.content}>
<PlayerBar /> <div className={styles.padder}>
<PlayerBar />
</div>
</div> </div>
</div> </div>
); );
const BottomContainer = connect(mapStateToProps)(BottomContainerUnconnected);
export { BottomContainer }; export { BottomContainer };

View file

@ -1,8 +1,7 @@
@import "src/styles/variables"; @import "src/styles/variables";
.wrap { .wrap {
position: fixed; position: sticky;
transform: translateZ(0);
bottom: 0; bottom: 0;
pointer-events: none; pointer-events: none;
touch-action: none; touch-action: none;
@ -13,8 +12,9 @@
left: 0; left: 0;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
padding: 0 $gap; //padding: 0 calc(min(100vw, #{$content_width}) - 64px) 0 $gap;
box-sizing: border-box; box-sizing: border-box;
padding: 0;
} }
.content { .content {
@ -23,10 +23,17 @@
height: $bar_height; height: $bar_height;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-start;
}
.padder {
display: flex;
flex-basis: calc(min(100vw - 94px, #{$content_width}));
align-items: center;
justify-content: flex-end; justify-content: flex-end;
& > div { & > div {
pointer-events: all; pointer-events: all;
touch-action: all; touch-action: auto;
} }
} }

View file

@ -6,7 +6,6 @@ export const MainLayout = ({ children }) => (
<div className={styles.wrapper}> <div className={styles.wrapper}>
<div className={styles.content}> <div className={styles.content}>
<Header /> <Header />
{children} {children}
</div> </div>
</div> </div>

View file

@ -37,7 +37,7 @@ body {
min-height: 100vh; min-height: 100vh;
& > div { & > div {
min-height: 100vh; //min-height: 100vh;
} }
} }