Skip to content

Commit

Permalink
bugfix: fix page, button and card layout
Browse files Browse the repository at this point in the history
  • Loading branch information
KalpasWang committed Dec 8, 2023
1 parent 9b70efe commit c58d0c3
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 19 deletions.
38 changes: 21 additions & 17 deletions frontend/app/card-picking/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,27 @@ import { investigators } from "@/config/investigators";

export default function RolePickingDemo() {
return (
<main className="flex flex-col w-full h-full p-4 bg-cover gap-11 bg-map">
<h1 className="font-bold leading-tight text-center text-outline text-7xl xl:text-8xl text-yellow">
Please Select a Character
<span className="block leading-tight tracking-[20px]">請選擇角色</span>
</h1>
<div className="grid grid-cols-4 gap-4 justify-items-center">
{investigators.map((investigator) => {
const { name, saneImage, sanity } = investigator;
return (
<InvestigatorCard
key={name}
investigator={name}
imgUrl={saneImage}
sanity={sanity}
/>
);
})}
<main className="min-h-screen py-4 bg-cover bg-map">
<div className="container">
<h1 className="font-bold leading-tight text-center text-outline-4 tracking-[4px] text-7xl xl:text-8xl text-yellow">
Please Select a Character
<span className="block leading-tight tracking-[20px]">
請選擇角色
</span>
</h1>
<div className="flex flex-wrap items-center justify-center gap-4 mt-11">
{investigators.map((investigator) => {
const { name, saneImage, sanity } = investigator;
return (
<InvestigatorCard
key={name}
investigator={name}
imgUrl={saneImage}
sanity={sanity}
/>
);
})}
</div>
</div>
</main>
);
Expand Down
4 changes: 2 additions & 2 deletions frontend/app/level-select/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { levels } from "@/config/levels";

export default function LevelSelectDemo() {
return (
<main className="h-full pb-48 bg-cover bg-map pt-11">
<main className="min-h-screen pb-48 bg-cover bg-map pt-11">
<div className="container">
<h1 className="text-6xl font-bold leading-tight text-center text-outline-4 xl:text-8xl text-yellow tracking-[4px]">
Please Select the Level of Difficulty
Expand All @@ -16,7 +16,7 @@ export default function LevelSelectDemo() {
return (
<Button
key={level.en}
className="w-full h-auto transition-opacity bg-gradient-to-r from-tertiary to-secondary rounded-3xl py-14 shadow-custom hover:opacity-90 active:opacity-90"
className="w-full h-auto transition-all bg-gradient-to-r from-tertiary to-secondary rounded-3xl py-14 shadow-custom hover:scale-95 active:scale-95"
size="lg"
>
<span className="text-white font-bold tracking-[2px] text-outline-2 text-7xl xl:text-8xl">
Expand Down
1 change: 1 addition & 0 deletions frontend/components/investigator-card2/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const InvestigatorCard = React.memo(function ({
<Card
className={cn(
"rounded-2xl w-60 min-h-[250px] border-0 bg-gradient-to-r shadow-lg cursor-pointer transition-all",
"hover:scale-95 active:scale-95",
gradientStyle[sanity],
isSelected ? "grayscale" : "grayscale-0"
)}
Expand Down

0 comments on commit c58d0c3

Please sign in to comment.