Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 3 additions & 1 deletion src/components/EventLanding.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ export default function EventLanding({ slug }) {
← {isZh ? "落地页" : "Landing Pages"}
</Link>
{event.banner && (
<img src={bannerUrl} alt={pick(locale, event.title)} className={styles.banner} />
<div className={styles.bannerWrapper}>
<img src={bannerUrl} alt={pick(locale, event.title)} className={styles.banner} />
</div>
)}
<h1 className={styles.title}>{pick(locale, event.title)}</h1>
<div className={styles.meta}>
Expand Down
17 changes: 13 additions & 4 deletions src/components/EventLanding.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,22 @@
padding: var(--hami-space-32) 0 var(--hami-space-48);
}

.banner {
.bannerWrapper {
width: 100%;
max-height: 480px;
object-fit: cover;
max-width: 960px;
height: 480px;
margin: 0 auto var(--hami-space-32);
border-radius: var(--hami-radius-md);
border: 1px solid var(--hami-color-border);
margin-bottom: var(--hami-space-32);
background-color: var(--hami-color-surface);
overflow: hidden;
}

.banner {
width: 100%;
height: 100%;
object-fit: contain;
Comment thread
Akashstztt marked this conversation as resolved.
display: block;
}

.title {
Expand Down