Skip to content

Commit bbe2a2d

Browse files
authored
Merge pull request #19 from gravity-ui/fixes
Fixes
2 parents 5831da7 + d9a77df commit bbe2a2d

File tree

12 files changed

+66
-40
lines changed

12 files changed

+66
-40
lines changed

src/blocks/ContentLayout/ContentLayout.scss

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ $block: '.#{$ns}content-layout-block';
2828
&_centered {
2929
margin-left: auto;
3030
margin-right: auto;
31-
32-
#{$block}__file {
33-
justify-content: center;
34-
}
3531
}
3632

3733
a {

src/blocks/ContentLayout/__stories__/ContentLayout.stories.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ export const WithFiles = DefaultTemplate.bind([]);
158158
export const Size = SizesTemplate.bind([]);
159159
export const WithBackgroundSizeS = DefaultTemplate.bind([]);
160160
export const WithImageAndBackgroundSizeL = DefaultTemplate.bind([]);
161-
export const WithImageSizeLCentered = DefaultTemplate.bind([]);
161+
export const WithImageSizeSCentered = DefaultTemplate.bind([]);
162162
export const Theme = ThemesTemplate.bind([]);
163163
export const TextWidth = TextWidthTemplate.bind([]);
164164
export const TextWidthWithoutTitle = TextWidthTemplateWithoutTitle.bind([]);
@@ -169,7 +169,7 @@ Size.args = data.size.content as ContentLayoutBlockProps;
169169
WithBackgroundSizeS.args = data.withBackgroundSizeS.content as ContentLayoutBlockProps;
170170
WithImageAndBackgroundSizeL.args = data.withImageAndBackgroundSizeL
171171
.content as ContentLayoutBlockProps;
172-
WithImageSizeLCentered.args = data.withImageSizeLCentered.content as ContentLayoutBlockProps;
172+
WithImageSizeSCentered.args = data.withImageSizeSCentered.content as ContentLayoutBlockProps;
173173
Theme.args = data.theme.content as ContentLayoutBlockProps;
174174
TextWidth.args = data.textWidth.content as ContentLayoutBlockProps;
175175
TextWidthWithoutTitle.args = data.textWidthWithoutTitle.content as ContentLayoutBlockProps;

src/blocks/ContentLayout/__stories__/data.json

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@
433433
]
434434
}
435435
},
436-
"withImageSizeLCentered": {
436+
"withImageSizeSCentered": {
437437
"content": {
438438
"type": "content-layout-block",
439439
"properties": {
@@ -467,33 +467,7 @@
467467
"url": "/#contact-form"
468468
}
469469
]
470-
},
471-
"fileContent": [
472-
{
473-
"href": "https://yandex.xls",
474-
"text": "Certificate of Compliance (600 KB)"
475-
},
476-
{
477-
"href": "https://yandex.fig",
478-
"text": "PNG, JPG, and SVG formats in Figma"
479-
},
480-
{
481-
"href": "https://yandex.pdf",
482-
"text": "Requirements and Recommendations for the PCI DSS (1.3 MB)"
483-
},
484-
{
485-
"href": "https://yandex.zip",
486-
"text": "Archive with other logo and icon formats"
487-
},
488-
{
489-
"href": "https://yandex.doc",
490-
"text": "Microsoft Word document"
491-
},
492-
{
493-
"href": "https://yandex.ppt",
494-
"text": "PPR"
495-
}
496-
]
470+
}
497471
}
498472
},
499473
"default": {

src/blocks/Header/Header.scss

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ $backgroundWidth: 1440px;
2525
&_theme_dark {
2626
#{$block}__title,
2727
#{$block}__description .yfm,
28-
#{$block}__description .yfm > * {
28+
#{$block}__description .yfm * {
2929
color: var(--yc-color-text-light-primary);
3030
}
3131
}
@@ -152,6 +152,16 @@ $backgroundWidth: 1440px;
152152
& > div {
153153
max-width: none;
154154
}
155+
156+
#{$block}__background-media {
157+
height: 100%;
158+
}
159+
160+
video {
161+
height: 100%;
162+
width: 100%;
163+
object-fit: cover;
164+
}
155165
}
156166
}
157167

src/blocks/Header/Header.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ const Background = ({background}: BackgroundProps) => {
2727
return headerHasMediaBackground(background) ? (
2828
<BackgroundMedia
2929
{...background}
30+
mediaClassName={b('background-media')}
3031
className={b('background', {media: true, 'full-width-media': fullWidthMedia})}
3132
/>
3233
) : (

src/blocks/Header/__stories__/data.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"verticalOffset": "m",
1010
"type": "header-block",
1111
"title": "Yandex Cloud Professionals partner program",
12-
"description": "<p>Sell Yandex Cloud services and get a monthly partner bonus ranging from 12% to 20% of your customers' spending on the services. Get grants to try out Yandex Cloud services or implement your customers' pilot projects.</p> ",
12+
"description": "<p>Marketplace is awailable now in Managed Service for Kubernetes<sup>®</sup> management console.</p>",
1313
"width": "s",
1414
"buttons": [
1515
{

src/blocks/HeaderSlider/__stories__/data.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,24 @@
4141
}
4242
]
4343
},
44+
{
45+
"title": "Yandex Cloud Professionals Partner Program",
46+
"description": "Sell Yandex.Cloud services and receive a monthly partner premium from 12% to 20% of your customers' consumption. Get grants to get acquainted with Yandex.Cloud services or to conduct pilot projects for your clients.",
47+
"width": "s",
48+
"background": {
49+
"fullWidthMedia": true,
50+
"fullWidth": true,
51+
"disableCompress": true,
52+
"height": 800,
53+
"color": "lightgreen",
54+
"image": "https://storage.cloud-preprod.yandex.net/aeksandla-test/img-scale.png",
55+
"video": {
56+
"src": [
57+
"https://storage.yandexcloud.net/cloud-www-assets/scale/2022/main/scale_header.mp4"
58+
]
59+
}
60+
}
61+
},
4462
{
4563
"title": "Yandex Scale",
4664
"overtitle": "September 24",

src/components/BackgroundMedia/BackgroundMedia.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const b = block('BackgroundMedia');
1212

1313
export interface FullProps extends MediaProps, Animatable {
1414
className?: string;
15+
mediaClassName?: string;
1516
}
1617

1718
const BackgroundMedia = ({
@@ -20,6 +21,7 @@ const BackgroundMedia = ({
2021
animated,
2122
parallax = true,
2223
video,
24+
mediaClassName,
2325
...props
2426
}: FullProps) => {
2527
const isMobile = useContext(MobileContext);
@@ -31,7 +33,7 @@ const BackgroundMedia = ({
3133
animate={animated}
3234
>
3335
<Media
34-
className={b('media')}
36+
className={b('media', mediaClassName)}
3537
imageClassName={b('image')}
3638
videoClassName={b('video')}
3739
isBackground={true}

src/containers/PageConstructor/PageConstructor.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ import {ConstructorFootnotes} from './components/ConstructorFootnotes';
2828
import {ConstructorHeader} from './components/ConstructorItem';
2929
import {ConstructorBlocks} from './components/ConstructorBlocks';
3030

31+
import '@doc-tools/transform/dist/js/yfm';
32+
3133
import './PageConstructor.scss';
3234

3335
const b = cnBlock('page-constructor');

src/grid/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ export function getColClass(params: GridColumnClassParams) {
7272
} = params;
7373
return [
7474
GridColumnClassPrefix.Col,
75-
className,
7675
alignSelf,
7776
justifyContent && getJustifyClass(justifyContent),
7877
sizes && getSizeClass(sizes),
@@ -81,6 +80,7 @@ export function getColClass(params: GridColumnClassParams) {
8180
hidden && getVisibilityClasses(hidden, GridColumnVisibilityClass.None),
8281
visible && getVisibilityClasses(visible, GridColumnVisibilityClass.Block),
8382
reset && getResetClass(),
83+
className,
8484
]
8585
.filter(Boolean)
8686
.join(' ');

0 commit comments

Comments
 (0)