add responsiveness to the favorites section (#137)
This commit is contained in:
parent
42f05e5e23
commit
7d734808cf
6 changed files with 13 additions and 8 deletions
|
|
@ -13,7 +13,7 @@ const {
|
||||||
} = Astro.props;
|
} = Astro.props;
|
||||||
---
|
---
|
||||||
|
|
||||||
<a href={url} class="flex w-full flex-col gap-3 transition duration-300 hover:translate-y-2">
|
<a href={url} class="flex w-full max-w-[200px] flex-col gap-3 transition duration-300 hover:translate-y-2">
|
||||||
<Image
|
<Image
|
||||||
class="rounded-lg shadow-md aspect-[3/4] object-cover"
|
class="rounded-lg shadow-md aspect-[3/4] object-cover"
|
||||||
format="webp"
|
format="webp"
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ const {
|
||||||
} = Astro.props;
|
} = Astro.props;
|
||||||
---
|
---
|
||||||
|
|
||||||
<a href={url} class="flex w-full flex-col gap-3 transition duration-300 hover:translate-y-2">
|
<a href={url} class="flex w-full max-w-[120px] flex-col gap-3 transition duration-300 hover:translate-y-2">
|
||||||
<Image
|
<Image
|
||||||
class="rounded-lg shadow-md aspect-square object-cover"
|
class="rounded-lg shadow-md aspect-square object-cover"
|
||||||
fit="cover"
|
fit="cover"
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ const {
|
||||||
} = Astro.props;
|
} = Astro.props;
|
||||||
---
|
---
|
||||||
|
|
||||||
<a href={url} class="flex w-full flex-col gap-3 transition duration-300 hover:translate-y-2">
|
<a href={url} class="flex w-full max-w-[120px] flex-col gap-3 transition duration-300 hover:translate-y-2">
|
||||||
<Image
|
<Image
|
||||||
class="rounded-lg shadow-md transition duration-300 aspect-square object-cover"
|
class="rounded-lg shadow-md transition duration-300 aspect-square object-cover"
|
||||||
format="webp"
|
format="webp"
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ const id = url.split('/').pop();
|
||||||
const thumbnail = `https://img.youtube.com/vi/${id}/0.jpg`;
|
const thumbnail = `https://img.youtube.com/vi/${id}/0.jpg`;
|
||||||
---
|
---
|
||||||
|
|
||||||
<a href={url} class="flex w-full flex-col gap-3 transition duration-300 hover:translate-y-2">
|
<a href={url} class="flex w-full max-w-[240px] flex-col gap-3 transition duration-300 hover:translate-y-2">
|
||||||
<Image
|
<Image
|
||||||
class="rounded-lg shadow-md aspect-video object-cover"
|
class="rounded-lg shadow-md aspect-video object-cover"
|
||||||
format="webp"
|
format="webp"
|
||||||
|
|
|
||||||
|
|
@ -35,28 +35,28 @@ interface FavoritesSubsection<T extends SubsectionData> {
|
||||||
|
|
||||||
const booksSubsection: FavoritesSubsection<Book> = {
|
const booksSubsection: FavoritesSubsection<Book> = {
|
||||||
name: 'books',
|
name: 'books',
|
||||||
columnsLayout: 'grid-cols-4',
|
columnsLayout: 'grid-cols-fluid200',
|
||||||
Component: BookTile,
|
Component: BookTile,
|
||||||
...books,
|
...books,
|
||||||
};
|
};
|
||||||
|
|
||||||
const mediasSubsection: FavoritesSubsection<Media> = {
|
const mediasSubsection: FavoritesSubsection<Media> = {
|
||||||
name: 'medias',
|
name: 'medias',
|
||||||
columnsLayout: 'grid-cols-6',
|
columnsLayout: 'grid-cols-fluid120',
|
||||||
Component: MediaTile,
|
Component: MediaTile,
|
||||||
...medias,
|
...medias,
|
||||||
};
|
};
|
||||||
|
|
||||||
const peopleSubsection: FavoritesSubsection<Person> = {
|
const peopleSubsection: FavoritesSubsection<Person> = {
|
||||||
name: 'people',
|
name: 'people',
|
||||||
columnsLayout: 'grid-cols-6',
|
columnsLayout: 'grid-cols-fluid120',
|
||||||
Component: PersonTile,
|
Component: PersonTile,
|
||||||
...people,
|
...people,
|
||||||
};
|
};
|
||||||
|
|
||||||
const videosSubsection: FavoritesSubsection<Video> = {
|
const videosSubsection: FavoritesSubsection<Video> = {
|
||||||
name: 'videos',
|
name: 'videos',
|
||||||
columnsLayout: 'grid-cols-3',
|
columnsLayout: 'grid-cols-fluid240',
|
||||||
Component: VideoTile,
|
Component: VideoTile,
|
||||||
...videos,
|
...videos,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,11 @@ module.exports = {
|
||||||
spacing: {
|
spacing: {
|
||||||
22: '5.5rem',
|
22: '5.5rem',
|
||||||
},
|
},
|
||||||
|
gridTemplateColumns: {
|
||||||
|
fluid120: 'repeat(auto-fit, minmax(120px, 1fr))',
|
||||||
|
fluid200: 'repeat(auto-fit, minmax(200px, 1fr))',
|
||||||
|
fluid240: 'repeat(auto-fit, minmax(240px, 1fr))',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
plugins: [],
|
plugins: [],
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue