diff --git a/src/components/containers/Panel/index.tsx b/src/components/containers/Panel/index.tsx index 0c5d70e9..a64cd35a 100644 --- a/src/components/containers/Panel/index.tsx +++ b/src/components/containers/Panel/index.tsx @@ -4,15 +4,17 @@ import classNames = require("classnames"); type IProps = HTMLAttributes & { seamless?: boolean; + stretchy?: boolean } const Panel: FC = ({ className, children, seamless, + stretchy, ...props }) => ( -
+
{children}
); diff --git a/src/components/containers/Panel/styles.scss b/src/components/containers/Panel/styles.scss index bfaa8c27..76c67e3a 100644 --- a/src/components/containers/Panel/styles.scss +++ b/src/components/containers/Panel/styles.scss @@ -10,4 +10,5 @@ @include outer_shadow(); &:global(.seamless) { padding: 0; } + &:global(.stretchy) { flex: 1; align-items: flex-start; } } diff --git a/src/components/main/Header/index.tsx b/src/components/main/Header/index.tsx index 7effdcde..b45f1a2d 100644 --- a/src/components/main/Header/index.tsx +++ b/src/components/main/Header/index.tsx @@ -1,40 +1,45 @@ import * as React from 'react'; import { Logo } from "~/components/main/Logo"; import { connect } from 'react-redux'; -import { IUserProfile, IUserState } from "~/redux/user/reducer"; +import { IUserState } from "~/redux/user/reducer"; +import { push as historyPush } from 'connected-react-router'; import * as style from './style.scss'; import {Filler} from "~/components/containers/Filler"; import {Group} from "~/components/containers/Group"; - -interface IHeaderProps { - username?: IUserProfile['username'], - is_user?: IUserProfile['is_user'], -} - -export const Component: React.FunctionComponent = ({ username, is_user }) => ( -
-
- - - - -
-
depth
-
boris
-
flow
-
- - - - -
username
-
- -
-
-); +import { Link } from 'react-router-dom'; const mapStateToProps = ({ user: { profile: { username, is_user } } }: { user: IUserState }) => ({ username, is_user }); +const mapDispatchToProps = { + push: historyPush, +}; -export const Header = connect(mapStateToProps)(Component); +type IHeaderProps = ReturnType & typeof mapDispatchToProps & {}; + +export const Component: React.FunctionComponent = ({ username, is_user }) => { + return ( +
+
+ + + + +
+ flow + image + editor + horizontal +
+ + + + +
username
+
+ +
+
+ ); +}; + +export const Header = connect(mapStateToProps, mapDispatchToProps)(Component); diff --git a/src/components/main/Header/style.scss b/src/components/main/Header/style.scss index 333f375a..1da3abd7 100644 --- a/src/components/main/Header/style.scss +++ b/src/components/main/Header/style.scss @@ -17,13 +17,15 @@ font: $font_16_medium; text-transform: uppercase; - > div { + > a { display: flex; align-items: center; position: relative; padding: $gap; cursor: pointer; transition: color 0.25s; + text-decoration: none; + color: white; &:hover { color: $red; @@ -65,6 +67,7 @@ font: $font_16_medium; text-transform: uppercase; flex: 0 !important; + opacity: 0.3; } .user_avatar { diff --git a/src/containers/App.tsx b/src/containers/App.tsx index 61671c05..1acdb196 100644 --- a/src/containers/App.tsx +++ b/src/containers/App.tsx @@ -10,6 +10,8 @@ import { LoginLayout } from "~/containers/login/LoginLayout"; import { MainLayout } from "~/containers/main/MainLayout"; import { ImageExample } from "~/containers/examples/ImageExample"; import { EditorExample } from "~/containers/examples/EditorExample"; +import { HorizontalExample } from "~/containers/examples/HorizontalExample"; +import { Sprites } from "~/sprites/Sprites"; interface IAppProps {} interface IAppState {} @@ -19,9 +21,12 @@ class Component extends React.Component { return ( + + + diff --git a/src/containers/examples/EditorExample/index.tsx b/src/containers/examples/EditorExample/index.tsx index 59804fb2..d34ccd4b 100644 --- a/src/containers/examples/EditorExample/index.tsx +++ b/src/containers/examples/EditorExample/index.tsx @@ -8,11 +8,12 @@ import { Panel } from "~/components/containers/Panel"; import { TextInput } from "~/components/input/TextInput"; import classNames = require("classnames"); import { Scroll } from "~/components/containers/Scroll"; -import { Grid } from "~/components/containers/Grid"; import { Tags } from "~/components/node/Tags"; import { Button } from "~/components/input/Button"; import { Filler } from "~/components/containers/Filler"; import { InputText } from "~/components/input/InputText"; +import {Grid} from "~/components/containers/Grid"; +import {Icon} from "~/components/input/Icon"; interface IProps {} @@ -20,14 +21,6 @@ const EditorExample: FC = () => (
- - - - - - - - @@ -41,30 +34,35 @@ const EditorExample: FC = () => (
- - - - Layout setup + + + - Cover changer + + + - Track + + + ОБОИ ПОСТА - + МУЗЫКА - + + + - - - + + + diff --git a/src/containers/examples/EditorExample/styles.scss b/src/containers/examples/EditorExample/styles.scss index 9430c18b..a6efe10f 100644 --- a/src/containers/examples/EditorExample/styles.scss +++ b/src/containers/examples/EditorExample/styles.scss @@ -16,12 +16,10 @@ .panel { background: $editor_panel_bg; flex: 1; - //border-radius: 0 $radius $radius 0; border-radius: $radius; box-sizing: border-box; display: flex; flex-direction: column; - //@include outer_shadow(); } .editor { @@ -49,8 +47,14 @@ } .feature_card { - height: 100px; - background: darken($main_bg_color, 3%); + height: 120px; + background: darken($main_bg_color, 6%); + color: transparentize(white, 0.5); + display: flex; + align-items: center; + justify-content: center; + text-transform: uppercase; + font: $font_18_semibold; } .panel_main { diff --git a/src/containers/examples/HorizontalExample/index.tsx b/src/containers/examples/HorizontalExample/index.tsx new file mode 100644 index 00000000..9b1a38fc --- /dev/null +++ b/src/containers/examples/HorizontalExample/index.tsx @@ -0,0 +1,79 @@ +import React, { FC } from 'react'; +import { Card } from "~/components/containers/Card"; +import * as styles from './styles.scss'; +import { Group } from "~/components/containers/Group"; +import { Padder } from "~/components/containers/Padder"; +import { CellGrid } from "~/components/containers/CellGrid"; +import { Panel } from "~/components/containers/Panel"; +import classNames = require("classnames"); +import { Scroll } from "~/components/containers/Scroll"; +import { Tags } from "~/components/node/Tags"; +import { Button } from "~/components/input/Button"; +import { InputText } from "~/components/input/InputText"; +import {Grid} from "~/components/containers/Grid"; + +interface IProps {} + +const HorizontalExample: FC = () => ( + + +
+ + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+ +
+ + + + Layout setup + + Cover changer + + Track + + +
+ +
+ +
+ +
+
+
+
+ + +); + +export { HorizontalExample }; diff --git a/src/containers/examples/HorizontalExample/styles.scss b/src/containers/examples/HorizontalExample/styles.scss new file mode 100644 index 00000000..d8e5148c --- /dev/null +++ b/src/containers/examples/HorizontalExample/styles.scss @@ -0,0 +1,65 @@ +.wrap { + align-items: stretch; + justify-content: center; + display: flex; + background: $editor_bg; + //flex: 1; +} + +.group { + display: flex; + align-items: stretch !important; + justify-content: stretch; + //flex: 1; +} + +.panel { + background: $editor_panel_bg; + //flex: 1; + border-radius: $radius; + box-sizing: border-box; + display: flex; + flex-direction: column; +} + +.editor { + //flex: 2; + display: flex; + align-items: stretch; + flex-direction: column; +} + +.editor_panel { +} + +.editor_image_panel { + // flex: 1; +} + +.editor_image_container { + flex: 1; +} + +.editor_image { + background: transparentize(white, 0.95); + padding-bottom: 100%; + border-radius: $radius; +} + +.feature_card { + height: 100px; + background: darken($main_bg_color, 3%); +} + +.panel_main { + flex: 1; + display: flex; +} + +.close_icon { + height: 24px; + width: 24px; + background: transparentize(white, 0.95); + flex: 0 0 24px; + border-radius: $radius; +} diff --git a/src/sprites/Sprites.tsx b/src/sprites/Sprites.tsx new file mode 100644 index 00000000..60fb5ee3 --- /dev/null +++ b/src/sprites/Sprites.tsx @@ -0,0 +1,11 @@ +import React, {FC} from 'react'; + +const Sprites: FC<{}> = () => ( + + + + + +); + +export { Sprites }; diff --git a/src/styles/global.scss b/src/styles/global.scss index 22c9c6b2..a352c660 100644 --- a/src/styles/global.scss +++ b/src/styles/global.scss @@ -8,12 +8,14 @@ body { background: darken($main_bg_color, 12%); min-height: 100vh; //background: $main_bg_color url("../sprites/dots.svg"); - // background: url("http://vault48.org/pixmaps/texture.jpg"); + //background: url("http://vault48.org/pixmaps/texture.jpg"); //background: #111111; color: $main_text_color; font-family: Raleway, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; font-size: 16px; + fill: white; + stroke: white; &::before { content: ''; @@ -24,8 +26,8 @@ body { left: 0; z-index: -1; // background: url("../sprites/circles.svg"); - // background: url("http://vault48.org/pixmaps/texture_alt.jpg"); - background: linear-gradient(darken($main_bg_color, 15%), darken($main_bg_color, 12%)); + //background: url("http://vault48.org/pixmaps/texture_alt.jpg"); + //background: linear-gradient(darken($main_bg_color, 15%), darken($main_bg_color, 12%)); pointer-events: none; //background-size: cover; }