diff --git a/src/components/flow/Cell/index.tsx b/src/components/flow/Cell/index.tsx index ceefc795..729ed21f 100644 --- a/src/components/flow/Cell/index.tsx +++ b/src/components/flow/Cell/index.tsx @@ -1,5 +1,6 @@ import React, { FC } from 'react'; import * as styles from './styles.scss'; +import { TEXTS } from '~/constants/texts'; import classNames = require('classnames'); @@ -9,6 +10,7 @@ interface IProps { title?: string; is_hero?: boolean; is_stamp?: boolean; + is_text?: boolean; } const Cell: FC = ({ @@ -16,14 +18,22 @@ const Cell: FC = ({ height = 1, title, is_hero, + is_text = (Math.random() > 0.8), }) => (
+ {is_text &&
{TEXTS.LOREM_IPSUM}
} { title &&
{title}
}
); diff --git a/src/components/flow/Cell/styles.scss b/src/components/flow/Cell/styles.scss index 64b8df26..38165284 100644 --- a/src/components/flow/Cell/styles.scss +++ b/src/components/flow/Cell/styles.scss @@ -6,6 +6,7 @@ background: $cell_bg; border-radius: $cell_radius; position: relative; + overflow: hidden; &:global(.is_hero) { .title { @@ -16,6 +17,16 @@ @include outer_shadow(); } +.text { + line-height: 1.6em; + font-size: 18px; + font: $font_18_regular; + position: absolute; + top: 0; + left: 0; + padding: $gap; +} + .title { font: $font_cell_title; @@ -49,4 +60,10 @@ .hor-2 { grid-column-end: span 2; } + + .is_text { + background: none; + padding: 10px; + box-shadow: inset #444 0 0 0 1px; + } } diff --git a/src/constants/texts.ts b/src/constants/texts.ts new file mode 100644 index 00000000..fbe35a31 --- /dev/null +++ b/src/constants/texts.ts @@ -0,0 +1,4 @@ +export const TEXTS = { + LOREM_IPSUM: + 'Многие думают, что Lorem Ipsum - взятый с потолка псевдо-латинский набор слов, но это не совсем так. Его корни уходят в один фрагмент классической латыни 45 года н.э., то есть более двух тысячелетий назад. Ричард МакКлинток, профессор латыни из колледжа Hampden-Sydney, штат Вирджиния, взял одно из самых странных слов в Lorem Ipsum, "consectetur", и занялся его поисками в классической латинской литературе. В результате он нашёл неоспоримый первоисточник Lorem Ipsum в разделах 1.10.32 и 1.10.33 книги "de Finibus Bonorum et Malorum" ("О пределах добра и зла"), написанной Цицероном в 45 году н.э. Этот трактат по теории этики был очень популярен в эпоху Возрождения. Первая строка Lorem Ipsum, "Lorem ipsum dolor sit amet..", происходит от одной из строк в разделе 1.10.32', +};