Skip to content

Commit

Permalink
✨ show caption
Browse files Browse the repository at this point in the history
  • Loading branch information
mrpmohiburrahman committed Jun 23, 2024
1 parent fb49d67 commit c47c56b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
18 changes: 12 additions & 6 deletions components/gallery/Gallery.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,20 @@
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
display: flex;
flex-direction: column;
height: 350px;
height: 400px;
/* Increased height for caption */
transition: background 0.3s ease;
/* Removed cursor: pointer; */
}

.videoContainer {
flex: 0 0 70%;
flex: 0 0 60%;
/* Reduced height percentage for video */
position: relative;
width: 100%;
padding-top: 56.25%;
/* 16:9 Aspect Ratio */
overflow: hidden;
cursor: pointer;
/* Added cursor: pointer; */
}

.cardContent {
Expand All @@ -64,6 +64,14 @@
justify-content: space-between;
}

.caption {
font-size: 1rem;
color: var(--text-color);
margin: 0 0 -8px 0;
/* Margin to separate from author */

}

.author {
margin: 0;
font-size: 1.1rem;
Expand All @@ -80,7 +88,6 @@
font-size: 1.2rem;
color: var(--icon-color);
cursor: pointer;
/* Added cursor: pointer; */
}

.source {
Expand All @@ -96,7 +103,6 @@
font-size: 0.9rem;
transition: background 0.3s ease;
cursor: pointer;
/* Added cursor: pointer; */
}

.sourceButton:hover {
Expand Down
17 changes: 5 additions & 12 deletions components/gallery/Gallery.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,35 +35,30 @@ const Gallery = ({ items }) => {
<Video title={item.Author} url={videoUrl} />
</div>
<div className={styles.cardContent}>
{item.caption && <p className={styles.caption}>{item.caption}</p>}
<h3 className={styles.author}>{item.Author}</h3>
<div className={styles.icons}>
{item.twitterId && (
<a
href={`https://twitter.com/${item.twitterId}`}
target="_blank"
rel="noopener noreferrer"
// onClick={(e) => e.stopPropagation()}
>
rel="noopener noreferrer">
<FaTwitter className={styles.icon} />
</a>
)}
{item.linkedInId && (
<a
href={`https://linkedin.com/in/${item.linkedInId}`}
target="_blank"
rel="noopener noreferrer"
// onClick={(e) => e.stopPropagation()}
>
rel="noopener noreferrer">
<FaLinkedin className={styles.icon} />
</a>
)}
{item.personalSite && (
<a
href={item.personalSite}
target="_blank"
rel="noopener noreferrer"
// onClick={(e) => e.stopPropagation()}
>
rel="noopener noreferrer">
<FaGlobe className={styles.icon} />
</a>
)}
Expand All @@ -73,9 +68,7 @@ const Gallery = ({ items }) => {
href={item.source}
target="_blank"
rel="noopener noreferrer"
className={styles.sourceButton}
// onClick={(e) => e.stopPropagation()}
>
className={styles.sourceButton}>
Get Source
</a>
</div>
Expand Down

0 comments on commit c47c56b

Please sign in to comment.