Skip to content

Commit cd8643c

Browse files
Add card-based layout with Font Awesome icons for all suspects, weapons, and locations
1 parent f760397 commit cd8643c

9 files changed

Lines changed: 600 additions & 228 deletions

File tree

package-lock.json

Lines changed: 49 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
"vite": "^7.2.4"
2828
},
2929
"dependencies": {
30+
"@fortawesome/fontawesome-svg-core": "^7.1.0",
31+
"@fortawesome/free-solid-svg-icons": "^7.1.0",
32+
"@fortawesome/react-fontawesome": "^3.1.1",
3033
"react": "^18.3.1",
3134
"react-dom": "^18.3.1",
3235
"react-router-dom": "^7.12.0"

src/components/LocationsCard.tsx

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import type { Location } from '../types/puzzle';
2+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3+
import { getIcon } from '../utils/iconMapping';
4+
5+
interface LocationsCardProps {
6+
locations: Location[];
7+
}
8+
9+
export default function LocationsCard({ locations }: LocationsCardProps) {
10+
return (
11+
<div className="mb-6 md:mb-8">
12+
<h2 className="text-2xl md:text-3xl font-bold text-blue-400 mb-4 flex items-center">
13+
<span className="text-3xl mr-2">📍</span>
14+
Locations
15+
</h2>
16+
<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
17+
{locations.map((location, idx) => (
18+
<div
19+
key={idx}
20+
className="bg-gradient-to-br from-gray-800/90 to-gray-900/90 backdrop-blur-sm rounded-xl p-4 border-2 border-blue-500/30 hover:border-blue-500/50 transition-all shadow-lg"
21+
>
22+
{/* Font Awesome Icon */}
23+
<div className="flex items-center justify-center w-16 h-16 mx-auto mb-3 bg-blue-500/20 rounded-full">
24+
<FontAwesomeIcon icon={getIcon(location.icon)} className="text-3xl text-blue-400" />
25+
</div>
26+
27+
<h3 className="text-xl font-bold text-white text-center mb-2">{location.name}</h3>
28+
<p className="text-sm text-gray-400 text-center mb-3 min-h-[40px]">{location.description}</p>
29+
30+
<div className="flex flex-wrap gap-1.5 justify-center text-xs">
31+
<span className="bg-gray-700/50 px-2 py-1 rounded text-gray-300">{location.setting}</span>
32+
<span className="bg-gray-700/50 px-2 py-1 rounded text-gray-300">{location.access}</span>
33+
</div>
34+
</div>
35+
))}
36+
</div>
37+
</div>
38+
);
39+
}

src/components/SuspectsCard.tsx

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import type { Suspect } from '../types/puzzle';
2+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3+
import { getIcon } from '../utils/iconMapping';
4+
5+
interface SuspectsCardProps {
6+
suspects: Suspect[];
7+
}
8+
9+
export default function SuspectsCard({ suspects }: SuspectsCardProps) {
10+
return (
11+
<div className="mb-6 md:mb-8">
12+
<h2 className="text-2xl md:text-3xl font-bold text-red-400 mb-4 flex items-center">
13+
<span className="text-3xl mr-2">🕵️</span>
14+
Suspects
15+
</h2>
16+
<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
17+
{suspects.map((suspect, idx) => (
18+
<div
19+
key={idx}
20+
className="bg-gradient-to-br from-gray-800/90 to-gray-900/90 backdrop-blur-sm rounded-xl p-4 border-2 border-red-500/30 hover:border-red-500/50 transition-all shadow-lg"
21+
>
22+
{/* Font Awesome Icon */}
23+
<div className="flex items-center justify-center w-16 h-16 mx-auto mb-3 bg-red-500/20 rounded-full">
24+
<FontAwesomeIcon icon={getIcon(suspect.icon)} className="text-3xl text-red-400" />
25+
</div>
26+
27+
<h3 className="text-xl font-bold text-white text-center mb-2">{suspect.name}</h3>
28+
<p className="text-sm text-gray-400 text-center mb-3 min-h-[40px]">{suspect.bio}</p>
29+
30+
<div className="flex flex-wrap gap-1.5 justify-center text-xs">
31+
<span className="bg-gray-700/50 px-2 py-1 rounded text-gray-300">{suspect.height}</span>
32+
<span className="bg-gray-700/50 px-2 py-1 rounded text-gray-300">{suspect.build}</span>
33+
<span className="bg-gray-700/50 px-2 py-1 rounded text-gray-300">{suspect.eyeColor}</span>
34+
<span className="bg-gray-700/50 px-2 py-1 rounded text-gray-300">{suspect.hairColor}</span>
35+
<span className="bg-gray-700/50 px-2 py-1 rounded text-gray-300">{suspect.handedness}</span>
36+
<span className="bg-gray-700/50 px-2 py-1 rounded text-gray-300">{suspect.age}</span>
37+
</div>
38+
</div>
39+
))}
40+
</div>
41+
</div>
42+
);
43+
}

src/components/WeaponsCard.tsx

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import type { Weapon } from '../types/puzzle';
2+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3+
import { getIcon } from '../utils/iconMapping';
4+
5+
interface WeaponsCardProps {
6+
weapons: Weapon[];
7+
}
8+
9+
export default function WeaponsCard({ weapons }: WeaponsCardProps) {
10+
return (
11+
<div className="mb-6 md:mb-8">
12+
<h2 className="text-2xl md:text-3xl font-bold text-orange-400 mb-4 flex items-center">
13+
<span className="text-3xl mr-2">🔪</span>
14+
Weapons
15+
</h2>
16+
<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
17+
{weapons.map((weapon, idx) => (
18+
<div
19+
key={idx}
20+
className="bg-gradient-to-br from-gray-800/90 to-gray-900/90 backdrop-blur-sm rounded-xl p-4 border-2 border-orange-500/30 hover:border-orange-500/50 transition-all shadow-lg"
21+
>
22+
{/* Font Awesome Icon */}
23+
<div className="flex items-center justify-center w-16 h-16 mx-auto mb-3 bg-orange-500/20 rounded-full">
24+
<FontAwesomeIcon icon={getIcon(weapon.icon)} className="text-3xl text-orange-400" />
25+
</div>
26+
27+
<h3 className="text-xl font-bold text-white text-center mb-2">{weapon.name}</h3>
28+
<p className="text-sm text-gray-400 text-center mb-3 min-h-[40px]">{weapon.description}</p>
29+
30+
<div className="flex flex-wrap gap-1.5 justify-center text-xs">
31+
<span className="bg-gray-700/50 px-2 py-1 rounded text-gray-300">{weapon.weight}</span>
32+
<span className="bg-gray-700/50 px-2 py-1 rounded text-gray-300">{weapon.type}</span>
33+
</div>
34+
</div>
35+
))}
36+
</div>
37+
</div>
38+
);
39+
}

0 commit comments

Comments
 (0)