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

#23 fixed lab shadows

This commit is contained in:
Fedor Katurov 2021-03-22 17:21:35 +07:00
parent b761849432
commit 10729de375
8 changed files with 40 additions and 7 deletions

View file

@ -1,6 +1,8 @@
@import "~/styles/variables.scss";
.wrap {
@include lab_shadow;
background: linear-gradient(darken($dark_blue, 0%), darken($blue, 30%));
}

View file

@ -9,7 +9,7 @@ import { Grid } from '~/components/containers/Grid';
interface IProps {}
const LabHead: FC<IProps> = () => (
<Card className={styles.wrap}>
<div className={styles.wrap}>
<div className={styles.group}>
<Group horizontal style={{ flex: '0 0 auto' }}>
<Placeholder width="32px" height={32} />
@ -28,7 +28,7 @@ const LabHead: FC<IProps> = () => (
<Filler />
</div>
</Card>
</div>
);
export { LabHead };

View file

@ -1,5 +1,13 @@
@import "~/styles/variables.scss";
.wrap {
@include lab_shadow;
border-radius: $radius;
background-color: $content_bg;
padding: $gap;
}
.group {
display: flex;

View file

@ -1,7 +1,8 @@
@import "~/styles/variables.scss";
.wrap {
box-shadow: transparentize(black, 0.5) 0 0 0 1px, inset transparentize(white, 0.9) 0 1px, lighten(black, 10%) 0 4px;
@include lab_shadow;
background-color: $lab_post_bg;
cursor: pointer;

View file

@ -26,7 +26,7 @@ const LabStats: FC<IProps> = () => {
<Group>
<LabBanner />
<Card>
<div className={styles.card}>
<Group>
{isLoading ? (
<Placeholder height={14} width="100px" />
@ -52,7 +52,7 @@ const LabStats: FC<IProps> = () => {
<LabHeroes nodes={heroes} isLoading={isLoading} />
</div>
</Group>
</Card>
</div>
</Group>
);
};

View file

@ -15,3 +15,11 @@
.heroes {
margin-top: -$gap;
}
.card {
@include lab_shadow;
border-radius: $radius;
background-color: $comment_bg;
padding: $gap;
}

View file

@ -91,8 +91,16 @@ export type INodeComponents = Record<ValueOf<typeof NODE_TYPES>, FC<INodeCompone
export const LAB_PREVIEW_LAYOUT: Record<string, FC<INodeComponentProps>[]> = {
[NODE_TYPES.IMAGE]: [LabImage, LabPad, LabNodeTitle, LabBottomPanel],
[NODE_TYPES.VIDEO]: [NodeVideoBlock, LabPad, LabNodeTitle, LabBottomPanel],
[NODE_TYPES.AUDIO]: [LabPad, LabNodeTitle, NodeAudioImageBlock, NodeAudioBlock, LabBottomPanel],
[NODE_TYPES.TEXT]: [LabPad, LabNodeTitle, LabText, LabBottomPanel],
[NODE_TYPES.AUDIO]: [
LabPad,
LabNodeTitle,
LabPad,
NodeAudioImageBlock,
NodeAudioBlock,
LabPad,
LabBottomPanel,
],
[NODE_TYPES.TEXT]: [LabPad, LabNodeTitle, LabPad, LabText, LabPad, LabBottomPanel],
};
export const NODE_HEADS: INodeComponents = {

View file

@ -219,3 +219,9 @@ $sidebar_border: transparentize(white, 0.95);
border-radius: $radius;
cursor: pointer;
}
@mixin lab_shadow {
box-shadow: transparentize(black, 0.5) 0 0 0 1px,
inset transparentize(white, 0.9) 0 1px,
lighten(black, 10%) 0 4px;
}