Skip to content

Commit

Permalink
Add for tablet as well
Browse files Browse the repository at this point in the history
  • Loading branch information
dzole0311 committed Nov 22, 2024
1 parent d88ba77 commit 0560f61
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions overrides/home/carousel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,8 @@ export function DesktopCarousel () {
color: '#fff',
background: 'rgba(0, 0, 0, 0.5)',
padding: '10px',
borderRadius: '4px',
fontSize: '1.2rem',
fontWeight: 'bold',
lineHeight: '1.5'
}}
>
{itemInProgress.imageOverlayText1 && (
Expand Down Expand Up @@ -111,7 +109,27 @@ function TabletCarousel() {
<Grid row className="margin-top-2">
{CarouselItems.map((item) => {
return <Grid col={12} key={item.title} className="margin-bottom-4">
<div>
<div className='position-relative'>
{ (item.imageOverlayText1 || item.imageOverlayText2) && (
<div
className="position-absolute text-lower-left"
style={{
bottom: '10px',
left: '10px',
color: '#fff',
padding: '10px',
fontSize: '3vw',
fontWeight: 'bold',
}}
>
{item.imageOverlayText1 && (
<span style={{ display: 'block' }}>{item.imageOverlayText1}</span>
)}
{item.imageOverlayText2 && (
<span style={{ display: 'block' }}>{item.imageOverlayText2}</span>
)}
</div>
)}
<img className="carousel--content-image" src={item.image} />
</div>
<h3 className="margin-top-1">{item.title}</h3>
Expand Down

0 comments on commit 0560f61

Please sign in to comment.