Skip to content

Commit

Permalink
Use Image component for manga list
Browse files Browse the repository at this point in the history
Signed-off-by: Marcus Crane <[email protected]>
  • Loading branch information
marcus-crane committed Jan 12, 2024
1 parent 7403b6a commit ed206e5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
4 changes: 3 additions & 1 deletion src/pages/games.astro
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ const typedGames = games as GameList[];
{
typedGames.map((gameList) => (
<div class="grid-list">
<h3>{gameList.list}</h3>
<header>
<h2>{gameList.list}</h2>
</header>
<ul role="list">
{gameList.games
.map((game) => (
Expand Down
14 changes: 10 additions & 4 deletions src/pages/manga.astro
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@ import { Image } from 'astro:assets';
{manga.filter(m => m.chapters === null).map((m) => (
<li>
<div>
<img
alt={`A cover photo of the book titled ${m.title}`}
<Image
alt={`A cover image of ${m.title}, a manga series by ${m.author}`}
src={m.cover}
width={m.cover_width}
height={m.cover_height}
style="border-radius: 3px; width: auto; max-width: 16rem;"
/>
<a href={m.url} target="_blank" rel="noopener noreferer">
<span>{m.title}</span>
Expand All @@ -46,9 +49,12 @@ import { Image } from 'astro:assets';
{manga.filter(m => m.chapters !== null).map((m) => (
<li>
<div>
<img
alt={`A cover photo of the book titled ${m.title}`}
<Image
alt={`A cover image of ${m.title}, a manga series by ${m.author}`}
src={m.cover}
width={m.cover_width}
height={m.cover_height}
style="border-radius: 3px; width: auto; max-width: 16rem;"
/>
<a href={m.url} target="_blank" rel="noopener noreferer">
<span>{m.title}</span>
Expand Down

0 comments on commit ed206e5

Please sign in to comment.