From fc8ac3d541dd4b4074dfcf7d9b3d6bbe1de913aa Mon Sep 17 00:00:00 2001 From: muerwre Date: Tue, 20 Aug 2019 21:51:20 +0700 Subject: [PATCH] fixed node appearance --- src/components/node/NodePanel/index.tsx | 7 +++++- src/components/node/NodePanel/styles.scss | 19 +++++++++------- src/components/node/NodeRelated/styles.scss | 8 ++++--- .../examples/ImageExample/index.tsx | 22 ++++++++++--------- .../examples/ImageExample/styles.scss | 2 ++ src/sprites/Sprites.tsx | 5 +++++ src/styles/global.scss | 1 + src/styles/variables.scss | 21 ++++++++++++++++++ 8 files changed, 63 insertions(+), 22 deletions(-) diff --git a/src/components/node/NodePanel/index.tsx b/src/components/node/NodePanel/index.tsx index dd281ace..243484e8 100644 --- a/src/components/node/NodePanel/index.tsx +++ b/src/components/node/NodePanel/index.tsx @@ -2,6 +2,7 @@ import React, { FC } from 'react'; import * as styles from './styles.scss'; import { Group } from '~/components/containers/Group'; import { Filler } from '~/components/containers/Filler'; +import {Icon} from "~/components/input/Icon"; interface IProps {} @@ -14,8 +15,12 @@ const NodePanel: FC = () => ( -
+ + +
); export { NodePanel }; + +//
diff --git a/src/components/node/NodePanel/styles.scss b/src/components/node/NodePanel/styles.scss index ae63be17..439b3751 100644 --- a/src/components/node/NodePanel/styles.scss +++ b/src/components/node/NodePanel/styles.scss @@ -37,14 +37,17 @@ } .buttons { - height: 54px; - border-radius: $radius $radius 0 0; - background: linear-gradient(176deg, #f42a00, #5c1085); - position: absolute; - bottom: 0; - right: 10px; - width: 270px; - display: flex; + flex: 0; + padding-right: $gap; + fill: transparentize(white, 0.7); + //height: 54px; + //border-radius: $radius $radius 0 0; + //background: linear-gradient(176deg, #f42a00, #5c1085); + //position: absolute; + //bottom: 0; + //right: 10px; + //width: 270px; + //display: flex; } .mark { diff --git a/src/components/node/NodeRelated/styles.scss b/src/components/node/NodeRelated/styles.scss index d875df53..dae07ec1 100644 --- a/src/components/node/NodeRelated/styles.scss +++ b/src/components/node/NodeRelated/styles.scss @@ -1,7 +1,8 @@ .wrap { - padding: $gap; - background: transparentize(black, 0.8); + // padding: $gap; + //background: transparentize(black, 0.8); border-radius: $panel_radius; + padding: $gap 0; } .grid { @@ -14,7 +15,7 @@ } .item { - background: #222222; + background: darken($content_bg, 2%); padding-bottom: 100%; border-radius: $cell_radius; } @@ -29,6 +30,7 @@ } .line { + display: none; flex: 1; height: 2px; background: transparentize(white, 0.95); diff --git a/src/containers/examples/ImageExample/index.tsx b/src/containers/examples/ImageExample/index.tsx index bfa7272f..1495db06 100644 --- a/src/containers/examples/ImageExample/index.tsx +++ b/src/containers/examples/ImageExample/index.tsx @@ -38,16 +38,6 @@ const ImageExample: FC = () => (
- - - - - - - - - - = () => ( ); export { ImageExample }; + +/* + + + + + + + + + + */ diff --git a/src/containers/examples/ImageExample/styles.scss b/src/containers/examples/ImageExample/styles.scss index 16bdac56..fffb6217 100644 --- a/src/containers/examples/ImageExample/styles.scss +++ b/src/containers/examples/ImageExample/styles.scss @@ -15,6 +15,8 @@ .content { align-items: stretch !important; + + @include vertical_at_tablet; } .comments { diff --git a/src/sprites/Sprites.tsx b/src/sprites/Sprites.tsx index f9b17ccf..6b9e3017 100644 --- a/src/sprites/Sprites.tsx +++ b/src/sprites/Sprites.tsx @@ -39,6 +39,11 @@ const Sprites: FC<{}> = () => ( + + + + + ); diff --git a/src/styles/global.scss b/src/styles/global.scss index 17e5f698..12c4cbeb 100644 --- a/src/styles/global.scss +++ b/src/styles/global.scss @@ -80,3 +80,4 @@ body { :global(h2) { font: $font_24_bold; } + diff --git a/src/styles/variables.scss b/src/styles/variables.scss index 37ac0fe2..b9c9ed7d 100644 --- a/src/styles/variables.scss +++ b/src/styles/variables.scss @@ -101,3 +101,24 @@ $input_shadow_filled: $input_shadow; touch-action: none; } } + +@mixin phone { + @content; +} + +@mixin tablet { + @media (max-width: 599px) { @content; } +} + +@mixin vertical_at_tablet { + @media (max-width: 599px) { + flex-direction: column !important; + + & > * { + margin: $gap/2 0 !important; + + &:first-child { margin-top: 0 !important; } + &:last-child { margin-bottom: 0 !important; } + } + } +}