mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
return to fixed flow
This commit is contained in:
parent
3d4f60c2b4
commit
ad517a9bfe
5 changed files with 31 additions and 34 deletions
|
@ -8,6 +8,7 @@ $cols: $content_width / $cell;
|
||||||
.grid_test {
|
.grid_test {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
||||||
|
grid-template-rows: 360px;
|
||||||
grid-auto-rows: 256px;
|
grid-auto-rows: 256px;
|
||||||
grid-auto-flow: row dense;
|
grid-auto-flow: row dense;
|
||||||
grid-column-gap: $grid_line;
|
grid-column-gap: $grid_line;
|
||||||
|
@ -19,13 +20,13 @@ $cols: $content_width / $cell;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hero {
|
.hero {
|
||||||
grid-row-start: 0;
|
grid-row-start: 1;
|
||||||
grid-row-end: span 2;
|
grid-row-end: span 1;
|
||||||
grid-column-start: 0;
|
grid-column-start: 0;
|
||||||
grid-column-end: span 4;
|
grid-column-end: span 4;
|
||||||
// gridRow: "1 / 2",
|
// gridRow: "1 / 2",
|
||||||
// gridColumn: "1 / -1",
|
// gridColumn: "1 / -1",
|
||||||
background: #222222;
|
background: darken($content_bg, 2%);
|
||||||
border-radius: $radius;
|
border-radius: $radius;
|
||||||
// height: 33vh;
|
// height: 33vh;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -38,7 +39,7 @@ $cols: $content_width / $cell;
|
||||||
// grid-row: -1 / 3;
|
// grid-row: -1 / 3;
|
||||||
grid-row-end: span 3;
|
grid-row-end: span 3;
|
||||||
grid-column: -2 / -1;
|
grid-column: -2 / -1;
|
||||||
background: #090909;
|
background: darken($content_bg, 8%);
|
||||||
border-radius: $radius;
|
border-radius: $radius;
|
||||||
padding: $gap;
|
padding: $gap;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
@ -25,33 +25,31 @@ const HeaderUnconnected: FC<IProps> = ({ username, is_user, showDialog }) => {
|
||||||
const onOpenEditor = useCallback(() => showDialog(DIALOGS.EDITOR), [showDialog]);
|
const onOpenEditor = useCallback(() => showDialog(DIALOGS.EDITOR), [showDialog]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div className={style.container}>
|
||||||
<div className={style.container}>
|
<Logo />
|
||||||
<Logo />
|
|
||||||
|
|
||||||
<Filler />
|
<Filler />
|
||||||
|
|
||||||
<div className={style.plugs}>
|
<div className={style.plugs}>
|
||||||
<Link to="/">flow</Link>
|
<Link to="/">flow</Link>
|
||||||
<Link to="/examples/image">image</Link>
|
<Link to="/examples/image">image</Link>
|
||||||
<div onClick={onOpenEditor}>editor</div>
|
<div onClick={onOpenEditor}>editor</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<Filler />
|
|
||||||
|
|
||||||
{is_user && (
|
|
||||||
<Group horizontal className={style.user_button}>
|
|
||||||
<div>{username}</div>
|
|
||||||
<div className={style.user_avatar} />
|
|
||||||
</Group>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{!is_user && (
|
|
||||||
<Group horizontal className={style.user_button} onClick={onLogin}>
|
|
||||||
<div>ВДОХ</div>
|
|
||||||
</Group>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<Filler />
|
||||||
|
|
||||||
|
{is_user && (
|
||||||
|
<Group horizontal className={style.user_button}>
|
||||||
|
<div>{username}</div>
|
||||||
|
<div className={style.user_avatar} />
|
||||||
|
</Group>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{!is_user && (
|
||||||
|
<Group horizontal className={style.user_button} onClick={onLogin}>
|
||||||
|
<div>ВДОХ</div>
|
||||||
|
</Group>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -27,10 +27,11 @@ const Component: FC<IProps> = ({ is_shown }) => (
|
||||||
<Sprites />
|
<Sprites />
|
||||||
|
|
||||||
<Switch>
|
<Switch>
|
||||||
<Route exact path={URLS.BASE} component={FlowLayout} />
|
|
||||||
|
|
||||||
<MainLayout>
|
<MainLayout>
|
||||||
<Switch>
|
<Switch>
|
||||||
|
<Route exact path={URLS.BASE} component={FlowLayout} />
|
||||||
<Route path={URLS.EXAMPLES.IMAGE} component={ImageExample} />
|
<Route path={URLS.EXAMPLES.IMAGE} component={ImageExample} />
|
||||||
<Route path={URLS.EXAMPLES.EDITOR} component={EditorExample} />
|
<Route path={URLS.EXAMPLES.EDITOR} component={EditorExample} />
|
||||||
<Route path="/examples/horizontal" component={HorizontalExample} />
|
<Route path="/examples/horizontal" component={HorizontalExample} />
|
||||||
|
|
|
@ -4,8 +4,5 @@ import * as styles from './styles.scss';
|
||||||
import { Header } from '~/components/main/Header';
|
import { Header } from '~/components/main/Header';
|
||||||
|
|
||||||
export const FlowLayout = () => (
|
export const FlowLayout = () => (
|
||||||
<div className={styles.wrap}>
|
|
||||||
<Header />
|
|
||||||
<TestGrid />
|
<TestGrid />
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
|
|
|
@ -5,9 +5,9 @@ import { Header } from '~/components/main/Header';
|
||||||
|
|
||||||
export const MainLayout = ({ children }) => (
|
export const MainLayout = ({ children }) => (
|
||||||
<div className={styles.wrapper}>
|
<div className={styles.wrapper}>
|
||||||
<Header />
|
|
||||||
|
|
||||||
<div className={styles.content}>
|
<div className={styles.content}>
|
||||||
|
<Header />
|
||||||
|
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue