Skip to content

Commit d7eb702

Browse files
committed
feat: basics of tcg
1 parent 6d26fc4 commit d7eb702

File tree

4 files changed

+601
-5
lines changed

4 files changed

+601
-5
lines changed

public/apps/apps.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,14 @@
220220
"description": "Pop some virtual bubble wrap to relieve stress.",
221221
"icon": "CirclesFourIcon",
222222
"created_at": "2025-11-25T16:01:56+03:00"
223+
},
224+
{
225+
"slug": "tcg-card-generator",
226+
"to": "/apps/tcg-card-generator",
227+
"title": "TCG Card Generator",
228+
"description": "Create your own custom TCG cards with this generator.",
229+
"icon": "CardsThreeIcon",
230+
"created_at": "2025-11-26T12:00:00+03:00"
223231
}
224232
]
225233
},

src/components/AnimatedRoutes.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ import BpmGuesserPage from '../pages/apps/BpmGuesserPage';
6969
import WhiteboardPage from '../pages/apps/WhiteboardPage';
7070
import FootballEmblemCreatorPage from '../pages/apps/FootballEmblemCreatorPage';
7171
import RoguelikeGamePage from '../pages/apps/RoguelikeGamePage'; // Import RoguelikeGamePage
72+
import TcgCardGeneratorPage from '../pages/apps/TcgCardGeneratorPage'; // Import TcgCardGeneratorPage
7273
import SettingsPage from '../pages/SettingsPage';
7374

7475
import UsefulLinksPage from '../pages/UsefulLinksPage';
@@ -633,6 +634,10 @@ function AnimatedRoutes() {
633634
path="/apps::rl"
634635
element={<Navigate to="/apps/roguelike-game" replace />}
635636
/>
637+
<Route
638+
path="/apps::tcg"
639+
element={<Navigate to="/apps/tcg-card-generator" replace />}
640+
/>
636641
{/* End of hardcoded redirects */}
637642
<Route
638643
path="/apps/ip"
@@ -648,6 +653,20 @@ function AnimatedRoutes() {
648653
</motion.div>
649654
}
650655
/>
656+
<Route
657+
path="/apps/tcg-card-generator"
658+
element={
659+
<motion.div
660+
initial="initial"
661+
animate="in"
662+
exit="out"
663+
variants={pageVariants}
664+
transition={pageTransition}
665+
>
666+
<TcgCardGeneratorPage />
667+
</motion.div>
668+
}
669+
/>
651670
<Route
652671
path="/apps/roguelike-game"
653672
element={

src/components/CustomDropdown.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import ReactDOM from 'react-dom'; // Import ReactDOM
33
import { CaretDown, Check } from '@phosphor-icons/react';
44
import { motion, AnimatePresence } from 'framer-motion';
55

6-
const CustomDropdown = ({ options, value, onChange, icon: Icon, label }) => {
6+
const CustomDropdown = ({ options, value, onChange, icon: Icon, label, className = '' }) => {
77
const [isOpen, setIsOpen] = useState(false);
88
const dropdownRef = useRef(null); // Ref for the button
99
const menuRef = useRef(null); // Ref for the dropdown menu
@@ -89,15 +89,17 @@ const CustomDropdown = ({ options, value, onChange, icon: Icon, label }) => {
8989
};
9090

9191
return (
92-
<div className="relative inline-block text-left">
92+
<div className={`relative inline-block text-left ${className}`}>
9393
<button
9494
type="button"
9595
ref={dropdownRef} // Attach ref to the button
9696
onClick={() => setIsOpen(!isOpen)}
97-
className="flex items-center gap-2 px-4 py-2 bg-gray-800 hover:bg-gray-700 border border-gray-700 rounded-md text-sm font-medium text-gray-200 transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-900 focus:ring-primary-500"
97+
className="flex items-center justify-between w-full gap-2 px-4 py-2 bg-gray-800 hover:bg-gray-700 border border-gray-700 rounded-md text-sm font-medium text-gray-200 transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-900 focus:ring-primary-500"
9898
>
99-
{Icon && <Icon size={20} className="text-gray-400" />}
100-
<span>{selectedOption ? selectedOption.label : label}</span>
99+
<div className="flex items-center gap-2">
100+
{Icon && <Icon size={20} className="text-gray-400" />}
101+
<span>{selectedOption ? selectedOption.label : label}</span>
102+
</div>
101103
<CaretDown
102104
size={16}
103105
className={`ml-2 transition-transform duration-200 ${isOpen ? 'rotate-180' : ''}`}

0 commit comments

Comments
 (0)