Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

498-refactor: Widget about video #538

Merged
merged 8 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 35 additions & 40 deletions src/widgets/about-video/ui/about-video.module.scss
Original file line number Diff line number Diff line change
@@ -1,55 +1,50 @@
.about-video {
&.content {
& > .video-wrapper {
margin-top: 24px;
padding: 0 67px;
.video-wrapper {
padding: 24px 67px 0;

.video-container {
position: relative;
.video-container {
position: relative;

overflow: hidden;
overflow: hidden;

width: 100%;
max-height: 600px;
padding-top: 56.25%;
width: 100%;
max-height: 600px;
padding-top: 56.25%;
Quiddlee marked this conversation as resolved.
Show resolved Hide resolved

iframe {
position: absolute;
top: 0;
left: 0;
.video-frame {
position: absolute;
top: 0;
left: 0;

width: 100%;
height: 100%;
width: 100%;
height: 100%;

border: 0;
}

.video-placeholder {
position: absolute;
top: 0;
left: 0;
border: 0;
}

display: flex;
align-items: center;
justify-content: center;
.video-placeholder {
position: absolute;
top: 0;
left: 0;

width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;

font-size: 24px;
color: white;
width: 100%;
height: 100%;

background: #ccc;
}
font-size: 24px;
color: $color-white;

@include media-laptop-medium {
max-height: 411px;
}
}
background: $color-gray-400;
}

@include media-tablet-large {
padding: 0;
}
@include media-laptop-medium {
max-height: 411px;
ansivgit marked this conversation as resolved.
Show resolved Hide resolved
}
}

@include media-tablet-large {
padding: 24px 0 0;
}
}
5 changes: 3 additions & 2 deletions src/widgets/about-video/ui/about-video.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ export const AboutVideo = ({ lang = 'en' }: AboutVideoProps) => {
const isRunningInDev = import.meta.env.DEV;

return (
<section className={cx('about-video container')}>
<article className={cx('about-video content')}>
<section className={cx('container')}>
<article className={cx('content')}>
<WidgetTitle mods="lines">{localizedContent[lang].title}</WidgetTitle>
<div className={cx('video-wrapper')}>
<div className={cx('video-container')}>
Expand All @@ -28,6 +28,7 @@ export const AboutVideo = ({ lang = 'en' }: AboutVideoProps) => {
)
: (
<iframe
className={cx('video-frame')}
loading="lazy"
title="RS School Intro"
Quiddlee marked this conversation as resolved.
Show resolved Hide resolved
src="https://www.youtube.com/embed/n4unZLVpnaU"
Quiddlee marked this conversation as resolved.
Show resolved Hide resolved
Expand Down