mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-04-24 15:08:44 -05:00
Improve /vods layout and show more thumbnails
This commit is contained in:
parent
8b85a9f3bb
commit
f8923fa662
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
## React
|
||||
|
||||
- project uses Remix as metaframework
|
||||
- prefer functional components over class components
|
||||
- prefer using hooks over class lifecycle methods
|
||||
- do not use `useMemo`, `useCallback` or `useReducer` at all
|
||||
|
|
|
|||
|
|
@ -17,7 +17,11 @@ export function VodListing({
|
|||
return (
|
||||
<div className="vods__listing">
|
||||
<Link to={vodVideoPage(vod.id)} className="stack sm">
|
||||
<img alt="" src={youtubeIdToThumbnailUrl(vod.youtubeId)} />
|
||||
<img
|
||||
className="vods__listing__thumbnail"
|
||||
alt=""
|
||||
src={youtubeIdToThumbnailUrl(vod.youtubeId)}
|
||||
/>
|
||||
<h2 className="text-sm text-main-forced">{vod.title}</h2>
|
||||
</Link>
|
||||
<div className="vods__listing__info">
|
||||
|
|
@ -63,5 +67,5 @@ function WeaponsPeek({ weapons }: { weapons: ListVod["weapons"] }) {
|
|||
}
|
||||
|
||||
function youtubeIdToThumbnailUrl(youtubeId: string) {
|
||||
return `http://img.youtube.com/vi/${youtubeId}/maxresdefault.jpg`;
|
||||
return `http://img.youtube.com/vi/${youtubeId}/hqdefault.jpg`;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,6 +56,14 @@
|
|||
max-width: 355px;
|
||||
}
|
||||
|
||||
.vods__listing__thumbnail {
|
||||
aspect-ratio: 16 / 9;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
min-width: 355px;
|
||||
}
|
||||
|
||||
.vods__listing__info {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user