larxius commited on
Commit
c8b998f
·
verified ·
1 Parent(s): c7ce533

Update frontend/src/components/FeatureComparison.jsx

Browse files
frontend/src/components/FeatureComparison.jsx CHANGED
@@ -1,27 +1,24 @@
1
  import React from 'react';
2
 
3
  const CheckIcon = () => (
4
- <div className="w-6 h-6 rounded-full bg-emerald-500 text-white flex items-center justify-center shadow-sm mx-auto">
5
- <svg className="w-4 h-4 stroke-[3]" fill="none" viewBox="0 0 24 24" stroke="currentColor">
6
  <path strokeLinecap="round" strokeLinejoin="round" d="M5 13l4 4L19 7" />
7
  </svg>
8
  </div>
9
  );
10
 
11
  const CrossIcon = () => (
12
- <div className="w-6 h-6 rounded-full bg-red-100 text-red-500 flex items-center justify-center mx-auto">
13
- <svg className="w-3.5 h-3.5 stroke-[2.5]" fill="none" viewBox="0 0 24 24" stroke="currentColor">
14
  <path strokeLinecap="round" strokeLinejoin="round" d="M6 18L18 6M6 6l12 12" />
15
  </svg>
16
  </div>
17
  );
18
 
19
- const HalfIcon = ({ label }) => (
20
- <div className="flex items-center justify-center gap-1.5 mx-auto">
21
- <div className="w-5 h-5 rounded-full border-2 border-slate-700 relative overflow-hidden flex items-center justify-start bg-slate-100 shrink-0">
22
- <div className="w-1/2 h-full bg-slate-800"></div>
23
- </div>
24
- {label && <span className="text-[12px] text-on-surface-variant font-medium">({label})</span>}
25
  </div>
26
  );
27
 
@@ -40,13 +37,11 @@ export const FeatureComparison = () => {
40
  nessus: "cross",
41
  openvas: "cross",
42
  qualys: "half",
43
- qualysLabel: "Limited",
44
  },
45
  {
46
  feature: "Automated Risk Prioritization (AI)",
47
  larshield: "check",
48
  nessus: "half",
49
- nessusLabel: "Basic",
50
  openvas: "cross",
51
  qualys: "check",
52
  },
@@ -96,7 +91,6 @@ export const FeatureComparison = () => {
96
  feature: "Automated Compliance Reporting",
97
  larshield: "check",
98
  nessus: "half",
99
- nessusLabel: "Limited",
100
  openvas: "cross",
101
  qualys: "check",
102
  },
@@ -130,141 +124,115 @@ export const FeatureComparison = () => {
130
  },
131
  ];
132
 
133
- const renderCell = (type, label) => {
134
  if (type === "check") return <CheckIcon />;
135
  if (type === "cross") return <CrossIcon />;
136
- if (type === "half") return <HalfIcon label={label} />;
137
  return null;
138
  };
139
 
140
  return (
141
- <section id="comparison" className="py-12 md:py-16 bg-gradient-to-b from-slate-50/50 to-white relative border-t border-slate-200/70">
142
- <div className="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8">
143
 
144
- {/* Section Header */}
145
- <div className="text-center mb-8">
146
- <span className="bg-blue-50 text-blue-700 font-bold px-3 py-1 rounded-full text-xs uppercase tracking-wider mb-2 border border-blue-200/60 inline-block">
147
- Competitive Advantage
148
- </span>
149
- <h2 className="text-2xl md:text-3xl font-extrabold text-slate-900 mb-2 tracking-tight">
150
- How LarShield Compares
151
- </h2>
152
- <p className="text-slate-600 max-w-2xl mx-auto text-sm md:text-base leading-relaxed">
153
- See why modern engineering and security teams choose LarShield over legacy vulnerability scanners.
154
  </p>
155
  </div>
156
 
157
- {/* Table Container */}
158
- <div className="bg-white border border-slate-200 rounded-2xl shadow-xl shadow-slate-200/60 overflow-hidden">
159
  <div className="overflow-x-auto custom-scrollbar">
160
- <table className="w-full text-left border-collapse min-w-[680px]">
161
 
162
  {/* Header Row */}
163
  <thead>
164
- <tr className="border-b border-slate-800">
165
- <th className="py-3.5 px-5 bg-slate-900 text-white font-bold text-sm w-[34%]">
166
  Feature
167
  </th>
168
 
169
  {/* LarShield Column Header */}
170
- <th className="py-3.5 px-4 bg-gradient-to-b from-blue-600 to-blue-700 text-white font-bold text-center w-[20%] relative shadow-md">
171
- <div className="flex items-center justify-center gap-2">
172
- <div className="w-6 h-6 rounded-md bg-white/15 p-0.5 flex items-center justify-center border border-white/20">
173
- <img src="/logo.png" alt="LarShield" className="w-full h-full object-contain" />
174
- </div>
175
- <span className="tracking-tight font-extrabold text-base text-white">LarShield</span>
176
- </div>
177
  </th>
178
 
179
  {/* Nessus */}
180
- <th className="py-3.5 px-4 bg-slate-900 text-white font-semibold text-sm text-center w-[15%]">
181
- <div className="flex items-center justify-center gap-1.5">
182
- <div className="w-5 h-5 rounded-full bg-emerald-600 text-white font-bold text-[11px] flex items-center justify-center shadow-inner">
183
- N
184
- </div>
185
- <span>Nessus</span>
186
- </div>
187
  </th>
188
 
189
  {/* OpenVAS */}
190
- <th className="py-3.5 px-4 bg-slate-900 text-white font-semibold text-sm text-center w-[15%]">
191
- <div className="flex items-center justify-center gap-1.5">
192
- <div className="w-5 h-5 rounded-full bg-emerald-500/20 text-emerald-400 border border-emerald-500/40 flex items-center justify-center">
193
- <span className="material-symbols-outlined text-[13px]">bug_report</span>
194
- </div>
195
- <span>OpenVAS</span>
196
- </div>
197
  </th>
198
 
199
  {/* Qualys */}
200
- <th className="py-3.5 px-4 bg-slate-900 text-white font-semibold text-sm text-center w-[16%]">
201
- <div className="flex items-center justify-center gap-1.5">
202
- <div className="w-5 h-5 rounded-full bg-red-600 text-white font-bold text-[11px] flex items-center justify-center shadow-inner">
203
- Q
204
- </div>
205
- <span>Qualys</span>
206
- </div>
207
  </th>
208
  </tr>
209
  </thead>
210
 
211
  {/* Table Body */}
212
- <tbody className="divide-y divide-slate-100 text-xs sm:text-sm">
213
  {comparisonData.map((row, idx) => (
214
  <tr
215
  key={idx}
216
- className={`${idx % 2 === 0 ? 'bg-white' : 'bg-slate-50/50'} hover:bg-blue-50/30 transition-colors`}
217
  >
218
  {/* Feature Name */}
219
- <td className="py-2.5 px-5 font-semibold text-slate-800">
220
  {row.feature}
221
  </td>
222
 
223
- {/* LarShield Cell (Highlighted Column) */}
224
- <td className="py-2.5 px-4 text-center bg-blue-50/60 border-x border-blue-100/80 font-bold">
225
  {renderCell(row.larshield)}
226
  </td>
227
 
228
  {/* Nessus Cell */}
229
- <td className="py-2.5 px-4 text-center">
230
- {renderCell(row.nessus, row.nessusLabel)}
231
  </td>
232
 
233
  {/* OpenVAS Cell */}
234
- <td className="py-2.5 px-4 text-center">
235
- {renderCell(row.openvas, row.openvasLabel)}
236
  </td>
237
 
238
  {/* Qualys Cell */}
239
- <td className="py-2.5 px-4 text-center">
240
- {renderCell(row.qualys, row.qualysLabel)}
241
  </td>
242
  </tr>
243
  ))}
244
 
245
  {/* Pricing Row */}
246
- <tr className="bg-slate-100/70 font-bold border-t-2 border-slate-200">
247
- <td className="py-3 px-5 text-slate-900 text-sm">
248
- Pricing Model
249
  </td>
250
 
251
  {/* LarShield Pricing */}
252
- <td className="py-3 px-4 text-center bg-blue-100/70 border-x border-blue-200/80 text-blue-700 text-xs sm:text-sm font-extrabold">
253
- Flexible &amp; Affordable
254
  </td>
255
 
256
  {/* Nessus Pricing */}
257
- <td className="py-3 px-4 text-center text-slate-600 font-medium text-xs">
258
  Subscription
259
  </td>
260
 
261
  {/* OpenVAS Pricing */}
262
- <td className="py-3 px-4 text-center text-slate-600 font-medium text-xs">
263
- Free <span className="text-[11px] text-slate-500">(Open Source)</span>
264
  </td>
265
 
266
  {/* Qualys Pricing */}
267
- <td className="py-3 px-4 text-center text-slate-600 font-medium text-xs">
268
  Subscription
269
  </td>
270
  </tr>
@@ -280,3 +248,5 @@ export const FeatureComparison = () => {
280
  };
281
 
282
  export default FeatureComparison;
 
 
 
1
  import React from 'react';
2
 
3
  const CheckIcon = () => (
4
+ <div className="flex items-center justify-center mx-auto">
5
+ <svg className="w-4 h-4 text-emerald-500 stroke-[3]" fill="none" viewBox="0 0 24 24" stroke="currentColor">
6
  <path strokeLinecap="round" strokeLinejoin="round" d="M5 13l4 4L19 7" />
7
  </svg>
8
  </div>
9
  );
10
 
11
  const CrossIcon = () => (
12
+ <div className="w-5 h-5 rounded-full bg-red-100 text-red-400 flex items-center justify-center mx-auto">
13
+ <svg className="w-3 h-3 stroke-[2.5]" fill="none" viewBox="0 0 24 24" stroke="currentColor">
14
  <path strokeLinecap="round" strokeLinejoin="round" d="M6 18L18 6M6 6l12 12" />
15
  </svg>
16
  </div>
17
  );
18
 
19
+ const HalfIcon = () => (
20
+ <div className="w-4 h-4 rounded-full bg-[#0B132B] text-white flex items-center justify-center mx-auto text-[9px] font-bold shadow-sm">
21
+ ◐
 
 
 
22
  </div>
23
  );
24
 
 
37
  nessus: "cross",
38
  openvas: "cross",
39
  qualys: "half",
 
40
  },
41
  {
42
  feature: "Automated Risk Prioritization (AI)",
43
  larshield: "check",
44
  nessus: "half",
 
45
  openvas: "cross",
46
  qualys: "check",
47
  },
 
91
  feature: "Automated Compliance Reporting",
92
  larshield: "check",
93
  nessus: "half",
 
94
  openvas: "cross",
95
  qualys: "check",
96
  },
 
124
  },
125
  ];
126
 
127
+ const renderCell = (type) => {
128
  if (type === "check") return <CheckIcon />;
129
  if (type === "cross") return <CrossIcon />;
130
+ if (type === "half") return <HalfIcon />;
131
  return null;
132
  };
133
 
134
  return (
135
+ <section id="comparison" className="py-4 md:py-6 bg-slate-50/50 relative border-t border-slate-200/60">
136
+ <div className="max-w-5xl mx-auto px-3 sm:px-6">
137
 
138
+ {/* Header Text */}
139
+ <div className="text-center mb-3">
140
+ <p className="text-slate-600 max-w-2xl mx-auto text-xs md:text-sm font-medium">
141
+ See how LarShield compares against legacy vulnerability scanners on coverage, automation, and reporting.
 
 
 
 
 
 
142
  </p>
143
  </div>
144
 
145
+ {/* Comparison Table Card */}
146
+ <div className="bg-white border border-slate-200/80 rounded-2xl shadow-xl overflow-hidden">
147
  <div className="overflow-x-auto custom-scrollbar">
148
+ <table className="w-full text-left border-collapse min-w-[620px]">
149
 
150
  {/* Header Row */}
151
  <thead>
152
+ <tr className="bg-[#0B132B] text-white">
153
+ <th className="py-2.5 px-4 font-bold text-xs sm:text-sm w-[32%]">
154
  Feature
155
  </th>
156
 
157
  {/* LarShield Column Header */}
158
+ <th className="py-2.5 px-3 font-extrabold text-xs sm:text-sm text-center w-[20%] bg-[#0B132B] text-sky-400">
159
+ LarShield
 
 
 
 
 
160
  </th>
161
 
162
  {/* Nessus */}
163
+ <th className="py-2.5 px-3 font-bold text-xs sm:text-sm text-center w-[16%] text-slate-100">
164
+ Nessus
 
 
 
 
 
165
  </th>
166
 
167
  {/* OpenVAS */}
168
+ <th className="py-2.5 px-3 font-bold text-xs sm:text-sm text-center w-[16%] text-slate-100">
169
+ OpenVAS
 
 
 
 
 
170
  </th>
171
 
172
  {/* Qualys */}
173
+ <th className="py-2.5 px-3 font-bold text-xs sm:text-sm text-center w-[16%] text-slate-100">
174
+ Qualys
 
 
 
 
 
175
  </th>
176
  </tr>
177
  </thead>
178
 
179
  {/* Table Body */}
180
+ <tbody className="divide-y divide-slate-100 text-xs sm:text-[13px]">
181
  {comparisonData.map((row, idx) => (
182
  <tr
183
  key={idx}
184
+ className={`${idx % 2 === 0 ? 'bg-white' : 'bg-slate-50/60'} hover:bg-blue-50/20 transition-colors`}
185
  >
186
  {/* Feature Name */}
187
+ <td className="py-2 px-4 font-bold text-slate-800">
188
  {row.feature}
189
  </td>
190
 
191
+ {/* LarShield Cell (Highlighted Ice-Blue Column) */}
192
+ <td className="py-2 px-3 text-center bg-[#E0F2FE]/60 border-x border-blue-100/50">
193
  {renderCell(row.larshield)}
194
  </td>
195
 
196
  {/* Nessus Cell */}
197
+ <td className="py-2 px-3 text-center">
198
+ {renderCell(row.nessus)}
199
  </td>
200
 
201
  {/* OpenVAS Cell */}
202
+ <td className="py-2 px-3 text-center">
203
+ {renderCell(row.openvas)}
204
  </td>
205
 
206
  {/* Qualys Cell */}
207
+ <td className="py-2 px-3 text-center">
208
+ {renderCell(row.qualys)}
209
  </td>
210
  </tr>
211
  ))}
212
 
213
  {/* Pricing Row */}
214
+ <tr className="bg-white font-bold border-t border-slate-200">
215
+ <td className="py-2.5 px-4 text-slate-900 text-xs sm:text-sm font-bold">
216
+ Pricing
217
  </td>
218
 
219
  {/* LarShield Pricing */}
220
+ <td className="py-2.5 px-3 text-center bg-[#E0F2FE]/90 border-x border-blue-100 text-blue-700 text-xs sm:text-[13px] font-extrabold">
221
+ Affordable &amp; Flexible
222
  </td>
223
 
224
  {/* Nessus Pricing */}
225
+ <td className="py-2.5 px-3 text-center text-slate-800 font-bold text-xs sm:text-[13px]">
226
  Subscription
227
  </td>
228
 
229
  {/* OpenVAS Pricing */}
230
+ <td className="py-2.5 px-3 text-center text-slate-800 font-bold text-xs sm:text-[13px]">
231
+ Free (Open Source)
232
  </td>
233
 
234
  {/* Qualys Pricing */}
235
+ <td className="py-2.5 px-3 text-center text-slate-800 font-bold text-xs sm:text-[13px]">
236
  Subscription
237
  </td>
238
  </tr>
 
248
  };
249
 
250
  export default FeatureComparison;
251
+
252
+