File tree Expand file tree Collapse file tree 4 files changed +32
-1
lines changed
components/BackgroundMedia Expand file tree Collapse file tree 4 files changed +32
-1
lines changed Original file line number Diff line number Diff line change @@ -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
Original file line number Diff line number Diff 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 ) : (
Original file line number Diff line number Diff line change 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" ,
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ const b = block('BackgroundMedia');
1212
1313export interface FullProps extends MediaProps , Animatable {
1414 className ?: string ;
15+ mediaClassName ?: string ;
1516}
1617
1718const 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 }
You can’t perform that action at this time.
0 commit comments