Video component displays a YouTube video with a custom thumbnail and the Geometry Dash logo. It’s designed for showcasing game trailers or featured content.
Features
- Geometry Dash logo display
- YouTube video thumbnail link
- Responsive container
- Shadow effect on video thumbnail
- Fixed width container for consistent sizing
Usage
- Basic Usage
- With Other Components
src/pages/index.astro
Component Code
The Video component is a static component that doesn’t accept props:src/components/Video.astro
Video Configuration
The component currently displays a hardcoded YouTube video:- Video ID:
LxA4NJMiZ8o - Link: https://youtu.be/LxA4NJMiZ8o
- Thumbnail: https://img.youtube.com/vi/LxA4NJMiZ8o/maxresdefault.jpg
YouTube Thumbnail URL Pattern
YouTube provides automatic thumbnails for videos:default.jpg- 120x90mqdefault.jpg- 320x180hqdefault.jpg- 480x360sddefault.jpg- 640x480maxresdefault.jpg- 1280x720 (used in component)
Styling Features
Container Sizing
The video container has a fixed width for consistency:Shadow Effect
The video thumbnail has a Bootstrap shadow class:Responsive Image
Both the logo and thumbnail use Bootstrap’s.img-fluid class for responsive sizing:
Customization
To change the featured video, update the video ID in three places:src/components/Video.astro
Making it Dynamic
To accept different videos as props:src/components/Video.astro
