@@ -70,20 +70,27 @@ interface MinificationBenchmarksProps {
7070function MinificationBenchmarks ( { } : MinificationBenchmarksProps ) {
7171 return (
7272 < >
73- < main className = " max-w-6xl mx-auto px-8 py-8 flex flex-col gap-8" >
73+ < main className = ' max-w-6xl mx-auto px-8 py-8 flex flex-col gap-8' >
7474 { /* Combined Charts for Each Library - Time and Compression Side by Side */ }
75- < div className = " flex flex-col gap-8" >
75+ < div className = ' flex flex-col gap-8' >
7676 { libraries . map ( library => {
7777 const timeData = getLibraryData ( library , 'time' ) ;
7878 const compressionData = getLibraryData ( library , 'compression' ) ;
7979
8080 return (
81- < div key = { library } className = "bg-white border border-gray-200 rounded-xl px-6 py-6 shadow-sm transition-all duration-300 hover:shadow-md hover:-translate-y-0.5" >
82- < h3 className = "mb-4 text-xl font-bold text-slate-800 capitalize text-center pb-2 border-b-2 border-slate-200" > { library } </ h3 >
83- < div className = "grid grid-cols-1 lg:grid-cols-2 gap-8 mt-4" >
81+ < div
82+ key = { library }
83+ className = 'bg-white border border-gray-200 rounded-xl px-6 py-6 shadow-sm transition-all duration-300 hover:shadow-md hover:-translate-y-0.5'
84+ >
85+ < h3 className = 'mb-4 text-xl font-bold text-slate-800 capitalize text-center pb-2 border-b-2 border-slate-200' >
86+ { library }
87+ </ h3 >
88+ < div className = 'grid grid-cols-1 lg:grid-cols-2 gap-8 mt-4' >
8489 { /* Left column - Minification Time */ }
85- < div className = "bg-slate-50 border border-gray-200 rounded-lg p-4" >
86- < h4 className = "mb-4 text-base font-medium text-gray-700 text-center pb-2 border-b border-gray-200" > Minification Time</ h4 >
90+ < div className = 'bg-slate-50 border border-gray-200 rounded-lg p-4' >
91+ < h4 className = 'mb-4 text-base font-medium text-gray-700 text-center pb-2 border-b border-gray-200' >
92+ Minification Time
93+ </ h4 >
8794 < ResponsiveContainer width = '100%' height = { 300 } >
8895 < BarChart data = { timeData } margin = { { top : 20 , right : 30 , left : 20 , bottom : 5 } } >
8996 < CartesianGrid strokeDasharray = '3 3' stroke = '#e5e7eb' />
@@ -124,8 +131,10 @@ function MinificationBenchmarks({}: MinificationBenchmarksProps) {
124131 </ div >
125132
126133 { /* Right column - Compression Ratio */ }
127- < div className = "bg-slate-50 border border-gray-200 rounded-lg p-4" >
128- < h4 className = "mb-4 text-base font-medium text-gray-700 text-center pb-2 border-b border-gray-200" > Compression Ratio</ h4 >
134+ < div className = 'bg-slate-50 border border-gray-200 rounded-lg p-4' >
135+ < h4 className = 'mb-4 text-base font-medium text-gray-700 text-center pb-2 border-b border-gray-200' >
136+ Compression Ratio
137+ </ h4 >
129138 < ResponsiveContainer width = '100%' height = { 300 } >
130139 < BarChart data = { compressionData } margin = { { top : 20 , right : 30 , left : 20 , bottom : 5 } } >
131140 < CartesianGrid strokeDasharray = '3 3' stroke = '#e5e7eb' />
@@ -173,27 +182,39 @@ function MinificationBenchmarks({}: MinificationBenchmarksProps) {
173182 } ) }
174183 </ div >
175184
176- < div className = " grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-6" >
185+ < div className = ' grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-6' >
177186 { /* Minification statistics */ }
178- < div className = "bg-white border border-slate-200 px-7 py-7 rounded-xl shadow-sm border-l-4 border-l-blue-500 transition-all duration-200 hover:-translate-y-0.5 hover:shadow-md" >
179- < h3 className = "mb-3 text-slate-500 text-sm font-semibold uppercase tracking-widest" > Libraries Tested</ h3 >
180- < p className = "mb-3 text-4xl font-bold text-slate-800 tracking-tight leading-tight" > { Object . keys ( minificationData ) . length } </ p >
181- < span className = "text-sm font-semibold px-3 py-1.5 rounded-lg inline-flex items-center gap-1 text-emerald-700 bg-emerald-100 bg-opacity-100 border border-emerald-200 border-opacity-200" > JavaScript Libraries</ span >
187+ < div className = 'bg-white border border-slate-200 px-7 py-7 rounded-xl shadow-sm border-l-4 border-l-blue-500 transition-all duration-200 hover:-translate-y-0.5 hover:shadow-md' >
188+ < h3 className = 'mb-3 text-slate-500 text-sm font-semibold uppercase tracking-widest' > Libraries Tested</ h3 >
189+ < p className = 'mb-3 text-4xl font-bold text-slate-800 tracking-tight leading-tight' >
190+ { Object . keys ( minificationData ) . length }
191+ </ p >
192+ < span className = 'text-sm font-semibold px-3 py-1.5 rounded-lg inline-flex items-center gap-1 text-emerald-700 bg-emerald-100 bg-opacity-100 border border-emerald-200 border-opacity-200' >
193+ JavaScript Libraries
194+ </ span >
182195 </ div >
183- < div className = "bg-white border border-slate-200 px-7 py-7 rounded-xl shadow-sm border-l-4 border-l-blue-500 transition-all duration-200 hover:-translate-y-0.5 hover:shadow-md" >
184- < h3 className = "mb-3 text-slate-500 text-sm font-semibold uppercase tracking-widest" > Minifiers Compared</ h3 >
185- < p className = "mb-3 text-4xl font-bold text-slate-800 tracking-tight leading-tight" > { popularMinifiers . length } </ p >
186- < span className = "text-sm font-semibold px-3 py-1.5 rounded-lg inline-flex items-center gap-1 text-emerald-700 bg-emerald-100 bg-opacity-100 border border-emerald-200 border-opacity-200" > Popular Tools</ span >
196+ < div className = 'bg-white border border-slate-200 px-7 py-7 rounded-xl shadow-sm border-l-4 border-l-blue-500 transition-all duration-200 hover:-translate-y-0.5 hover:shadow-md' >
197+ < h3 className = 'mb-3 text-slate-500 text-sm font-semibold uppercase tracking-widest' > Minifiers Compared</ h3 >
198+ < p className = 'mb-3 text-4xl font-bold text-slate-800 tracking-tight leading-tight' >
199+ { popularMinifiers . length }
200+ </ p >
201+ < span className = 'text-sm font-semibold px-3 py-1.5 rounded-lg inline-flex items-center gap-1 text-emerald-700 bg-emerald-100 bg-opacity-100 border border-emerald-200 border-opacity-200' >
202+ Popular Tools
203+ </ span >
187204 </ div >
188- < div className = "bg-white border border-slate-200 px-7 py-7 rounded-xl shadow-sm border-l-4 border-l-blue-500 transition-all duration-200 hover:-translate-y-0.5 hover:shadow-md" >
189- < h3 className = "mb-3 text-slate-500 text-sm font-semibold uppercase tracking-widest" > Fastest Minifier</ h3 >
190- < p className = "mb-3 text-4xl font-bold text-slate-800 tracking-tight leading-tight" > OXC</ p >
191- < span className = "text-sm font-semibold px-3 py-1.5 rounded-lg inline-flex items-center gap-1 text-emerald-700 bg-emerald-100 bg-opacity-100 border border-emerald-200 border-opacity-200" > Rust-based</ span >
205+ < div className = 'bg-white border border-slate-200 px-7 py-7 rounded-xl shadow-sm border-l-4 border-l-blue-500 transition-all duration-200 hover:-translate-y-0.5 hover:shadow-md' >
206+ < h3 className = 'mb-3 text-slate-500 text-sm font-semibold uppercase tracking-widest' > Fastest Minifier</ h3 >
207+ < p className = 'mb-3 text-4xl font-bold text-slate-800 tracking-tight leading-tight' > OXC</ p >
208+ < span className = 'text-sm font-semibold px-3 py-1.5 rounded-lg inline-flex items-center gap-1 text-emerald-700 bg-emerald-100 bg-opacity-100 border border-emerald-200 border-opacity-200' >
209+ Rust-based
210+ </ span >
192211 </ div >
193- < div className = "bg-white border border-slate-200 px-7 py-7 rounded-xl shadow-sm border-l-4 border-l-blue-500 transition-all duration-200 hover:-translate-y-0.5 hover:shadow-md" >
194- < h3 className = "mb-3 text-slate-500 text-sm font-semibold uppercase tracking-widest" > Best Compression</ h3 >
195- < p className = "mb-3 text-4xl font-bold text-slate-800 tracking-tight leading-tight" > UglifyJS</ p >
196- < span className = "text-sm font-semibold px-3 py-1.5 rounded-lg inline-flex items-center gap-1 text-emerald-700 bg-emerald-100 bg-opacity-100 border border-emerald-200 border-opacity-200" > Traditional Leader</ span >
212+ < div className = 'bg-white border border-slate-200 px-7 py-7 rounded-xl shadow-sm border-l-4 border-l-blue-500 transition-all duration-200 hover:-translate-y-0.5 hover:shadow-md' >
213+ < h3 className = 'mb-3 text-slate-500 text-sm font-semibold uppercase tracking-widest' > Best Compression</ h3 >
214+ < p className = 'mb-3 text-4xl font-bold text-slate-800 tracking-tight leading-tight' > UglifyJS</ p >
215+ < span className = 'text-sm font-semibold px-3 py-1.5 rounded-lg inline-flex items-center gap-1 text-emerald-700 bg-emerald-100 bg-opacity-100 border border-emerald-200 border-opacity-200' >
216+ Traditional Leader
217+ </ span >
197218 </ div >
198219 </ div >
199220 </ main >
0 commit comments