Skip to content

Commit

Permalink
Smaller mobile text
Browse files Browse the repository at this point in the history
  • Loading branch information
Assios committed Aug 26, 2023
1 parent a5c4944 commit 89d37e4
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
36 changes: 36 additions & 0 deletions app/components/Achievement/AchievementBadge.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { Achievement } from "../AuthProvider/AuthProvider";

interface AchievementBadgeProps {
achievement: Achievement;
achievedAchievements: string[];
}

export default function AchievementBadge({
achievement,
achievedAchievements,
}: AchievementBadgeProps) {
const isAchieved = achievedAchievements.includes(achievement.id);

<div className="achievement-element relative m-4 hover:scale-105 transition-transform duration-200">
<div className="flex justify-between items-center px-2">
<p className="achievement-title text-center rounded-md py-1 px-2">
{achievement.achieved ? achievement.title : "?"}
</p>
</div>
<img
src={achievement.iconUrl || "default_achievement.png"}
alt={achievement.title}
className={`w-16 h-16 mx-auto my-2 ${
achievement.achieved ? "" : "grayscale"
}`}
/>
<p className="achievement-description text-xs text-center bg-gray-800 py-1 px-2 rounded-md absolute -bottom-8 left-1/2 transform -translate-x-1/2">
{achievement.achieved
? achievement.description
: "Secret until achieved!"}
</p>
</div>
);
}

export default AchievementBadge;
2 changes: 1 addition & 1 deletion app/components/Navbar/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const Navbar = ({ setShowModal, setShowTutorial, showNavbarStats }) => {
<NavLink
prefetch="intent"
to="/"
className="btn btn-ghost normal-case text-lg lg:text-2xl"
className="btn btn-ghost normal-case text-md md:text-lg lg:text-2xl"
>
Chessguessr
</NavLink>
Expand Down

1 comment on commit 89d37e4

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for chessguessr ready!

✅ Preview
https://chessguessr-ko7uquwqf-assios.vercel.app

Built with commit 89d37e4.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.