Skip to content

Commit

Permalink
Increase award sizes on mobile (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
byronwall authored Nov 22, 2023
1 parent 424a7c1 commit 9619a4e
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/app/awards/AwardsForProfile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export function AwardsForProfile() {
<CardTitle>Recent Awards</CardTitle>
<CardDescription></CardDescription>
</CardHeader>
<CardContent>
<CardContent className="p-1 sm:p-2 md:p-4">
<AwardList awards={recentFiftyAwards} />
</CardContent>
</Card>
Expand Down
4 changes: 2 additions & 2 deletions src/app/awards/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default function AwardsPage() {
Click an image to add to your awards.
</CardDescription>
</CardHeader>
<CardContent className="flex flex-col gap-4">
<CardContent className="flex flex-col gap-4 p-1 sm:p-2 md:p-4">
<div className="sticky top-0 z-10 flex flex-wrap justify-center gap-2 bg-gray-100 p-2">
{awards
?.filter((award) => !award.imageId)
Expand All @@ -80,7 +80,7 @@ export default function AwardsPage() {
))}
</div>

<div className="grid grid-cols-2 gap-4 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5">
<div className="grid grid-cols-1 gap-2 sm:grid-cols-2 md:grid-cols-3">
{(awardImagesShuffled ?? []).map((image) => (
<AwardImageChoice
key={image.id}
Expand Down
4 changes: 2 additions & 2 deletions src/components/awards/AwardCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ export function AwardCard({ award }: { award: Award }) {
key={award.id}
src={award.image?.imageUrl ?? "/placeholder.jpeg"}
alt={"Award image"}
width={256}
height={256}
width={512}
height={512}
className={cn("rounded-md", {
"border-4 border-yellow-400": !award.imageId,
})}
Expand Down
4 changes: 2 additions & 2 deletions src/components/awards/AwardImageChoice.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ export function AwardImageChoice({
key={image.id}
src={image.imageUrl}
alt={"Award image"}
width={256}
height={256}
width={512}
height={512}
onClick={() =>
!isLoading && shouldClickToClaim && handleAddImageIdToAward(image.id)
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/awards/AwardList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { AwardCard } from "./AwardCard";

export function AwardList({ awards = [] }: { awards?: Award[] }) {
return (
<div className="grid grid-cols-2 gap-4 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5">
<div className="grid grid-cols-1 gap-2 sm:grid-cols-2 md:grid-cols-3 ">
{awards.map((award) => (
<AwardCard key={award.id} award={award} />
))}
Expand Down
14 changes: 7 additions & 7 deletions tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
module.exports = {
darkMode: ["class"],
content: [
'./pages/**/*.{ts,tsx}',
'./components/**/*.{ts,tsx}',
'./app/**/*.{ts,tsx}',
'./src/**/*.{ts,tsx}',
],
"./pages/**/*.{ts,tsx}",
"./components/**/*.{ts,tsx}",
"./app/**/*.{ts,tsx}",
"./src/**/*.{ts,tsx}",
],
theme: {
container: {
center: true,
padding: "2rem",
padding: "1rem",
screens: {
"2xl": "1400px",
},
Expand All @@ -33,4 +33,4 @@ module.exports = {
},
},
plugins: [require("tailwindcss-animate")],
}
};

0 comments on commit 9619a4e

Please sign in to comment.