mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-24 20:36:40 +07:00
fluid flow
This commit is contained in:
parent
f511ca3f6a
commit
c7911e1cf1
9 changed files with 70 additions and 73 deletions
|
@ -6,31 +6,10 @@ import * as styles from './styles.scss';
|
|||
|
||||
export const TestGrid = () => (
|
||||
<div>
|
||||
<div
|
||||
style={{
|
||||
// gridRow: "1 / 2",
|
||||
// gridColumn: "1 / -1",
|
||||
background: '#222222',
|
||||
borderRadius: 6,
|
||||
height: 300,
|
||||
marginBottom: 4,
|
||||
display: 'flex',
|
||||
}}
|
||||
>
|
||||
HERO
|
||||
</div>
|
||||
|
||||
<div className={styles.grid_test}>
|
||||
<div
|
||||
style={{
|
||||
gridRow: '1 / 3',
|
||||
gridColumn: '-2 / -1',
|
||||
background: '#090909',
|
||||
borderRadius: 4,
|
||||
}}
|
||||
>
|
||||
STAMP
|
||||
</div>
|
||||
<div className={styles.hero}>HERO</div>
|
||||
|
||||
<div className={styles.stamp}>STAMP</div>
|
||||
|
||||
{range(1, 20).map(el => (
|
||||
<Cell
|
||||
|
|
|
@ -17,3 +17,32 @@ $cols: $content_width / $cell;
|
|||
.pad_last {
|
||||
grid-column-end: $cols + 1;
|
||||
}
|
||||
|
||||
.hero {
|
||||
grid-row-start: 0;
|
||||
grid-row-end: span 2;
|
||||
grid-column-start: 0;
|
||||
grid-column-end: span 4;
|
||||
// gridRow: "1 / 2",
|
||||
// gridColumn: "1 / -1",
|
||||
background: #222222;
|
||||
border-radius: $radius;
|
||||
// height: 33vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font: $font_24_semibold;
|
||||
}
|
||||
|
||||
.stamp {
|
||||
// grid-row: -1 / 3;
|
||||
grid-row-end: span 3;
|
||||
grid-column: -2 / -1;
|
||||
background: #090909;
|
||||
border-radius: $radius;
|
||||
padding: $gap;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font: $font_24_semibold;
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ const HeaderUnconnected: FC<IProps> = ({ username, is_user, showDialog }) => {
|
|||
const onOpenEditor = useCallback(() => showDialog(DIALOGS.EDITOR), [showDialog]);
|
||||
|
||||
return (
|
||||
<div className="default_container head_container">
|
||||
<div>
|
||||
<div className={style.container}>
|
||||
<Logo />
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
justify-content: flex-end;
|
||||
font-weight: 500;
|
||||
height: 96px;
|
||||
margin-top: -20px;
|
||||
}
|
||||
|
||||
.spacer {
|
||||
|
|
|
@ -1,11 +1,8 @@
|
|||
import * as React from 'react';
|
||||
import React, { FC } from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import { bindActionCreators } from 'redux';
|
||||
import { hot } from 'react-hot-loader';
|
||||
import { ConnectedRouter } from 'connected-react-router';
|
||||
import {
|
||||
NavLink, Switch, Route, Redirect
|
||||
} from 'react-router-dom';
|
||||
import { Switch, Route, Redirect } from 'react-router-dom';
|
||||
import { history } from '~/redux/store';
|
||||
import { FlowLayout } from '~/containers/flow/FlowLayout';
|
||||
import { MainLayout } from '~/containers/main/MainLayout';
|
||||
|
@ -23,29 +20,28 @@ const mapDispatchToProps = {};
|
|||
|
||||
type IProps = typeof mapDispatchToProps & ReturnType<typeof mapStateToProps> & {};
|
||||
|
||||
class Component extends React.Component<IProps, {}> {
|
||||
render() {
|
||||
return (
|
||||
<ConnectedRouter history={history}>
|
||||
<BlurWrapper is_blurred={this.props.is_shown}>
|
||||
<MainLayout>
|
||||
<Modal />
|
||||
<Sprites />
|
||||
const Component: FC<IProps> = ({ is_shown }) => (
|
||||
<ConnectedRouter history={history}>
|
||||
<BlurWrapper is_blurred={is_shown}>
|
||||
<Modal />
|
||||
<Sprites />
|
||||
|
||||
<Switch>
|
||||
<Route path={URLS.EXAMPLES.IMAGE} component={ImageExample} />
|
||||
<Route path={URLS.EXAMPLES.EDITOR} component={EditorExample} />
|
||||
<Route path="/examples/horizontal" component={HorizontalExample} />
|
||||
<Route exact path={URLS.BASE} component={FlowLayout} />
|
||||
<Switch>
|
||||
<Route exact path={URLS.BASE} component={FlowLayout} />
|
||||
|
||||
<Redirect to="/" />
|
||||
</Switch>
|
||||
</MainLayout>
|
||||
</BlurWrapper>
|
||||
</ConnectedRouter>
|
||||
);
|
||||
}
|
||||
}
|
||||
<MainLayout>
|
||||
<Switch>
|
||||
<Route path={URLS.EXAMPLES.IMAGE} component={ImageExample} />
|
||||
<Route path={URLS.EXAMPLES.EDITOR} component={EditorExample} />
|
||||
<Route path="/examples/horizontal" component={HorizontalExample} />
|
||||
|
||||
<Redirect to="/" />
|
||||
</Switch>
|
||||
</MainLayout>
|
||||
</Switch>
|
||||
</BlurWrapper>
|
||||
</ConnectedRouter>
|
||||
);
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
|
|
|
@ -10,17 +10,16 @@ import { NodeRelated } from '~/components/node/NodeRelated';
|
|||
import { Tags } from '~/components/node/Tags';
|
||||
import { MenuButton } from '~/components/node/MenuButton';
|
||||
import { NodeNoComments } from '~/components/node/NodeNoComments';
|
||||
import { InputText } from '~/components/input/InputText';
|
||||
|
||||
interface IProps {}
|
||||
|
||||
const ImageExample: FC<IProps> = () => (
|
||||
<Card className={styles.node} seamless>
|
||||
<InputText />
|
||||
<div className={styles.image_container}>
|
||||
<img
|
||||
className={styles.image}
|
||||
src="http://37.192.131.144/full/attached/2017/11/f01fdaaea789915284757634baf7cd11.jpg"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
@ -41,11 +40,7 @@ const ImageExample: FC<IProps> = () => (
|
|||
<Group style={{ flex: 1 }}>
|
||||
<Padder className={styles.buttons}>
|
||||
<Group>
|
||||
<MenuButton
|
||||
title="На главной"
|
||||
description="плывет по течению"
|
||||
icon="star"
|
||||
/>
|
||||
<MenuButton title="На главной" description="плывет по течению" icon="star" />
|
||||
|
||||
<MenuButton title="Видно всем" icon="star" />
|
||||
|
||||
|
@ -59,7 +54,7 @@ const ImageExample: FC<IProps> = () => (
|
|||
{ title: 'Плейлист', feature: 'green' },
|
||||
{ title: 'Просто' },
|
||||
{ title: '+ фото', feature: 'black' },
|
||||
{ title: '+ с музыкой', feature: 'black' }
|
||||
{ title: '+ с музыкой', feature: 'black' },
|
||||
]}
|
||||
/>
|
||||
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
import * as React from 'react';
|
||||
import { TestGrid } from '~/components/flow/TestGrid';
|
||||
import * as styles from './styles.scss';
|
||||
import { Header } from '~/components/main/Header';
|
||||
|
||||
export const FlowLayout = () => (
|
||||
<div className="default_container content_container">
|
||||
<div className={styles.wrap}>
|
||||
<Header />
|
||||
<TestGrid />
|
||||
</div>
|
||||
);
|
||||
|
|
6
src/containers/flow/FlowLayout/styles.scss
Normal file
6
src/containers/flow/FlowLayout/styles.scss
Normal file
|
@ -0,0 +1,6 @@
|
|||
.wrap {
|
||||
max-width: 2000px;
|
||||
padding: 0 40px 40px 40px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
|
@ -17,19 +17,7 @@ const INITIAL_STATE: INodeState = {
|
|||
...EMPTY_NODE,
|
||||
type: 'image',
|
||||
blocks: [{ ...EMPTY_BLOCK, type: 'image' }],
|
||||
files: [
|
||||
// { ...EMPTY_FILE, id: uuid() },
|
||||
// { ...EMPTY_FILE, id: uuid() },
|
||||
// { ...EMPTY_FILE, id: uuid() },
|
||||
// { ...EMPTY_FILE, id: uuid() },
|
||||
// { ...EMPTY_FILE, id: uuid() },
|
||||
// { ...EMPTY_FILE, id: uuid() },
|
||||
// { ...EMPTY_FILE, id: uuid() },
|
||||
// { ...EMPTY_FILE, id: uuid() },
|
||||
// { ...EMPTY_FILE, id: uuid() },
|
||||
// { ...EMPTY_FILE, id: uuid() },
|
||||
// { ...EMPTY_FILE, id: uuid() },
|
||||
],
|
||||
files: [],
|
||||
},
|
||||
is_loading: false,
|
||||
error: null,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue