Add YouTube Shorts video gallery to React app
- Added `VIDEO_ITEMS` constant with YouTube Shorts IDs to `src/App.jsx`. - Added a new `<section>` for videos in `src/App.jsx`. - Ported video grid styles from `static/css/style.css` to `src/styles.css`, including the 9:16 aspect ratio fix. - Updated `static/css/style.css` to ensure consistent styling (if not already present). Co-authored-by: abustosp <63634574+abustosp@users.noreply.github.com>
This commit is contained in:
@@ -359,6 +359,44 @@ p {
|
||||
gap: 2rem;
|
||||
}
|
||||
|
||||
/* Videos Section */
|
||||
.videos-section {
|
||||
background-color: var(--bg-body);
|
||||
}
|
||||
|
||||
.video-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
||||
gap: 2rem;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.video-wrapper {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
/* 9:16 Aspect Ratio */
|
||||
padding-bottom: 177.77%;
|
||||
background: var(--bg-surface);
|
||||
border-radius: var(--radius-md);
|
||||
overflow: hidden;
|
||||
box-shadow: var(--shadow-soft);
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
.video-wrapper:hover {
|
||||
transform: translateY(-5px);
|
||||
box-shadow: var(--shadow-hover);
|
||||
}
|
||||
|
||||
.video-wrapper iframe {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.gallery-item {
|
||||
background: var(--bg-surface);
|
||||
border-radius: var(--radius-md);
|
||||
|
||||
Reference in New Issue
Block a user