1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-24 20:36:40 +07:00
This commit is contained in:
muerwre 2019-07-23 19:08:55 +07:00
parent ef71e55543
commit 1b001db91a
6 changed files with 34 additions and 8 deletions

View file

@ -1,19 +1,22 @@
import React, { FC } from 'react';
import * as styles from './styles.scss';
import classNames = require("classnames");
interface IProps {
height?: number;
width?: number;
title?: string;
is_hero?: boolean;
}
const Cell: FC<IProps> = ({
width = 1,
height = 1,
title,
is_hero,
}) => (
<div
className={styles.cell}
className={classNames(styles.cell, { is_hero })}
style={{
gridRowEnd: `span ${height}`,
gridColumnEnd: `span ${width}`,

View file

@ -5,13 +5,31 @@
flex: 0 0;
background: $cell_bg;
border-radius: 4px;
position: relative;
&:global(.is_hero) {
.title {
font-size: 48px;
}
}
@include outer_shadow();
}
.title {
font-family: 'Montserrat';
font-family: $font;
font-weight: 700;
font-size: 32px;
font-size: 24px;
text-transform: uppercase;
height: 1em;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
padding: 0 $gap;
position: absolute;
bottom: $gap;
left: 0;
width: 100%;
box-sizing: border-box;
}

View file

@ -1,5 +1,4 @@
import * as React from 'react';
import classnames from 'classnames';
import { Cell } from "~/components/flow/Cell";
const style = require('./style.scss');
@ -9,11 +8,15 @@ export const TestGrid = () => (
<Cell
height={1}
width={4}
title="Example cell"
title="Example cell Example cell Example cell Example cell Example cell Example cell Example cell "
is_hero
/>
<Cell />
<Cell height={2} />
<Cell
height={2}
title="Example cell Example cell Example cell Example cell Example cell Example cell Example cell "
/>
<Cell width={2} />
<Cell />
</div>

View file

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<link href="https://fonts.googleapis.com/css?family=Montserrat+Alternates&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700,800&display=swap&subset=cyrillic" rel="stylesheet">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>

View file

@ -4,7 +4,8 @@ $color_blue: complement($color_red);
//$color_yellow: complement($color_red);
//$color_yellow: yellow;
$main_bg_color: #161616;
//$main_bg_color: #161616;
$main_bg_color: #111111;
$main_text_color: white;
$content_bg_color: #222222;

View file

@ -12,6 +12,7 @@ $input_height: 32px;
$input_radius: 2px;
$info_height: 24px;
$font: Montserrat, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
@mixin outer_shadow() {
box-shadow: inset transparentize(white, 0.95) 0 1px,