@@ -50,6 +50,7 @@ const commandsData = [
5050 { title : "Toggle Invert Colors" , description : "Inverts all colors on the page. (Easter Egg)" , color : "orange" } ,
5151 { title : "Party Mode" , description : "Cycles hue colors for a disco effect. (Easter Egg)" , color : "amber" } ,
5252 { title : "Toggle Retro Mode" , description : "Enables a retro CRT scanline effect. (Easter Egg)" , color : "yellow" } ,
53+ { title : "Toggle Mirror Mode" , description : "Mirrors the entire page horizontally. (Easter Egg)" , color : "indigo" } ,
5354 ]
5455 } ,
5556 {
@@ -64,6 +65,31 @@ const commandsData = [
6465 }
6566] ;
6667
68+ const colorClasses = {
69+ red : { bg : 'bg-red-900' , border : 'border-red-700' , text : 'text-red-300' } ,
70+ orange : { bg : 'bg-orange-900' , border : 'border-orange-700' , text : 'text-orange-300' } ,
71+ amber : { bg : 'bg-amber-900' , border : 'border-amber-700' , text : 'text-amber-300' } ,
72+ yellow : { bg : 'bg-yellow-900' , border : 'border-yellow-700' , text : 'text-yellow-300' } ,
73+ lime : { bg : 'bg-lime-900' , border : 'border-lime-700' , text : 'text-lime-300' } ,
74+ green : { bg : 'bg-green-900' , border : 'border-green-700' , text : 'text-green-300' } ,
75+ emerald : { bg : 'bg-emerald-900' , border : 'border-emerald-700' , text : 'text-emerald-300' } ,
76+ teal : { bg : 'bg-teal-900' , border : 'border-teal-700' , text : 'text-teal-300' } ,
77+ cyan : { bg : 'bg-cyan-900' , border : 'border-cyan-700' , text : 'text-cyan-300' } ,
78+ sky : { bg : 'bg-sky-900' , border : 'border-sky-700' , text : 'text-sky-300' } ,
79+ blue : { bg : 'bg-blue-900' , border : 'border-blue-700' , text : 'text-blue-300' } ,
80+ indigo : { bg : 'bg-indigo-900' , border : 'border-indigo-700' , text : 'text-indigo-300' } ,
81+ violet : { bg : 'bg-violet-900' , border : 'border-violet-700' , text : 'text-violet-300' } ,
82+ purple : { bg : 'bg-purple-900' , border : 'border-purple-700' , text : 'text-purple-300' } ,
83+ fuchsia : { bg : 'bg-fuchsia-900' , border : 'border-fuchsia-700' , text : 'text-fuchsia-300' } ,
84+ pink : { bg : 'bg-pink-900' , border : 'border-pink-700' , text : 'text-pink-300' } ,
85+ rose : { bg : 'bg-rose-900' , border : 'border-rose-700' , text : 'text-rose-300' } ,
86+ slate : { bg : 'bg-slate-900' , border : 'border-slate-700' , text : 'text-slate-300' } ,
87+ gray : { bg : 'bg-gray-900' , border : 'border-gray-700' , text : 'text-gray-300' } ,
88+ zinc : { bg : 'bg-zinc-900' , border : 'border-zinc-700' , text : 'text-zinc-300' } ,
89+ neutral : { bg : 'bg-neutral-900' , border : 'border-neutral-700' , text : 'text-neutral-300' } ,
90+ stone : { bg : 'bg-stone-900' , border : 'border-stone-700' , text : 'text-stone-300' } ,
91+ } ;
92+
6793function CommandsPage ( ) {
6894 useSeo ( {
6995 title : 'All Commands | Fezcodex' ,
@@ -154,16 +180,19 @@ function CommandsPage() {
154180 < div key = { catIndex } className = "mb-8" >
155181 < h2 className = "text-2xl font-semibold text-gray-200 mb-4 border-b border-gray-700 pb-2 inline-block" > { category . category } </ h2 >
156182 < div className = "grid grid-cols-1 gap-4" >
157- { category . items . map ( ( cmd , cmdIndex ) => (
158- < div
159- key = { cmdIndex }
160- className = { `bg-${ cmd . color } -900 bg-opacity-30 border border-${ cmd . color } -700 text-${ cmd . color } -300 px-4 py-3 rounded relative` }
161- role = "alert"
162- >
163- < strong className = "font-bold" > { cmd . title } :</ strong >
164- < span className = "block sm:inline ml-2" > { cmd . description } </ span >
165- </ div >
166- ) ) }
183+ { category . items . map ( ( cmd , cmdIndex ) => {
184+ const classes = colorClasses [ cmd . color ] || colorClasses . gray ;
185+ return (
186+ < div
187+ key = { cmdIndex }
188+ className = { `${ classes . bg } bg-opacity-30 border ${ classes . border } ${ classes . text } px-4 py-3 rounded relative` }
189+ role = "alert"
190+ >
191+ < strong className = "font-bold" > { cmd . title } :</ strong >
192+ < span className = "block sm:inline ml-2" > { cmd . description } </ span >
193+ </ div >
194+ ) ;
195+ } ) }
167196 </ div >
168197 </ div >
169198 ) ) }
0 commit comments