Skip to content

Commit

Permalink
fix: resize episode preview image (#842)
Browse files Browse the repository at this point in the history
  • Loading branch information
gauthier-th authored Jun 26, 2024
1 parent f714132 commit 96ba53f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/components/TvDetails/Season/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,14 @@ const Season = ({ seasonNumber, tvId }: SeasonProps) => {
{episode.overview && <p>{episode.overview}</p>}
</div>
{episode.stillPath && (
<Image
className="h-auto w-full rounded-lg xl:h-32 xl:w-auto"
src={`https://image.tmdb.org/t/p/original/${episode.stillPath}`}
alt=""
fill
/>
<div className="relative aspect-video xl:h-32">
<Image
className="rounded-lg object-contain"
src={`https://image.tmdb.org/t/p/original/${episode.stillPath}`}
alt=""
fill
/>
</div>
)}
</div>
);
Expand Down
21 changes: 21 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,27 @@ module.exports = {
},
}),
},
aspectRatio: {
auto: 'auto',
square: '1 / 1',
video: '16 / 9',
1: '1',
2: '2',
3: '3',
4: '4',
5: '5',
6: '6',
7: '7',
8: '8',
9: '9',
10: '10',
11: '11',
12: '12',
13: '13',
14: '14',
15: '15',
16: '16',
},
},
plugins: [
require('@tailwindcss/forms'),
Expand Down

0 comments on commit 96ba53f

Please sign in to comment.