-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathroutes.jsx
More file actions
339 lines (330 loc) · 10.7 KB
/
routes.jsx
File metadata and controls
339 lines (330 loc) · 10.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
import { lazy } from "react";
import {
Code,
Search,
Tag,
Image,
SlidersHorizontal,
Type,
FileText,
Eye,
Palette,
Braces,
LayoutTemplate,
FileDiff,
TextCursorInput,
QrCode,
Hash,
ClipboardList,
ListChecks,
CaseSensitive,
Monitor,
Table,
Network,
Share2,
Link,
} from "lucide-react";
import HomePage from "@/Home";
import SearchEngine from "@/pages/SearchEngine";
const LiveHtml = lazy(() => import("@/pages/LiveHtml"));
import LiveReact from "@/pages/LiveReact";
const MetaTagsGenrator = lazy(() => import("@/pages/MetaTagsGenrator"));
const SocialMediaPreviewer = lazy(() => import("@/pages/SocialMediaPreviewer"));
const ImgPlaceholderGen = lazy(() => import("@/pages/ImgPlaceholderGen"));
const SQIPPreviewer = lazy(() => import("@/pages/SQIPPreviewer"));
const TypescriptPlayground = lazy(() => import("@/pages/TypescriptPlayground"));
const GrapesJSEditor = lazy(() => import("@/pages/GrapesJSEditor"));
const LoremIpsumGenerator = lazy(() => import("@/pages/LoremIpsumGenrator"));
import ScreenSize from "@/pages/ScreenSize";
import UnitConverter from "@/pages/UnitConverter";
const MarkdownEditor = lazy(() => import("@/pages/MarkdownEditor"));
const DiffViewer = lazy(() => import("@/pages/DiffViewer"));
import CharacterAndWordCounter from "@/pages/CharacterAndWordCounter";
const ColorConverter = lazy(() => import("@/pages/ColorConverter"));
const AutoprefixerTool = lazy(() => import("@/pages/AutoPrefixer"));
import StringConverter from "@/pages/StringConverter";
const QrCodeGenerator = lazy(() => import("@/pages/QRCodeGenrator"));
const HashGenerator = lazy(() => import("@/pages/HashGenerator"));
const ImageMetadataViewer = lazy(() => import("@/pages/ImageMetadataViewer"));
const TextStylingTool = lazy(() => import("@/pages/CssTextStyling"));
const CsvToTable = lazy(() => import("@/pages/CsvToTable"));
const ApiTester = lazy(() => import("@/pages/ApiTester"));
const ImageToDataUrl = lazy(() => import("@/pages/ImageToDataUrl"));
import Websites from "@/pages/Websites";
// import Test from "@/pages/testing/Test"; // Testing purpose
import NoPage from "@/pages/NoPage";
const size5 = "size-5";
const formatToolName = (slug) => {
const words = slug
.split(/[-_]/)
.map((word) => word.charAt(0).toUpperCase() + word.slice(1));
return {
pascalCase: words.join(""), // LiveHtml
titleCase: words.join(" "), // Live Html
};
};
const routes = [
{
path: "/",
element: <HomePage />,
index: true,
},
{
path: "live-html",
element: <LiveHtml />,
isLazy: true,
description:
"Real-time HTML and SVG editor with instant side-by-side preview. Great for testing or tweaking SVGs live.",
category: "Editor",
icon: <Code className={size5} />,
isPopular: true,
},
{
path: "live-react",
element: <LiveReact />,
description:
"Interactive React playground with live JSX preview. Great for testing components in-browser.",
category: "Editor",
icon: <Braces className={size5} />,
},
{
path: "markdown-editor",
element: <MarkdownEditor />,
isLazy: true,
description:
"Live Markdown editor with GitHub-style preview. Perfect for editing README.md without switching tabs.",
category: "Editor",
icon: <FileText className={size5} />,
isPopular: true,
},
{
path: "search-engines",
element: <SearchEngine />,
description:
"Dev-focused search interface. Skip the step of Googling a search engine—just enter text, pick an engine, go. Also includes code snippet support like CodePen.",
category: "SEO",
icon: <Search className={size5} />,
},
{
path: "meta-tags-generator",
element: <MetaTagsGenrator />,
isLazy: true,
description:
"Generate SEO meta tags with support for social previews like Twitter Cards and Open Graph.",
category: "SEO",
icon: <Tag className={size5} />,
},
{
isNew: true,
path: "social-media-previewer",
element: <SocialMediaPreviewer />,
isLazy: true,
description:
"Preview how your links look on Twitter, Facebook, LinkedIn, Discord, and more. Visual validation for your meta tags.",
category: "SEO",
icon: <Share2 className={size5} />,
},
{
path: "image-placeholder-generator",
element: <ImgPlaceholderGen />,
isLazy: true,
description:
"Create BlurHash and LQIP image placeholders to speed up UI loads with minimal effort.",
category: "Image",
icon: <Image className={size5} />,
},
{
path: "sqip-lqip-previewer",
element: <SQIPPreviewer />,
isLazy: true,
description:
"Preview SVG-based SQIP and LQIP placeholders. Optimize loading performance with visual feedback.",
category: "Image",
icon: <SlidersHorizontal className={size5} />,
},
{
path: "typescript-playground",
element: <TypescriptPlayground />,
isLazy: true,
fallbackText: "Downloading TypeScript...",
description:
"Real-time TypeScript editor. Write, test, and debug TypeScript code directly in the browser.",
category: "Editor",
icon: <Type className={size5} />,
},
{
path: "grapesjs-editor",
element: <GrapesJSEditor />,
isLazy: true,
description:
"Drag-and-drop page builder powered by GrapesJS. Customize components visually without code.",
category: "Builder",
icon: <LayoutTemplate className={size5} />,
},
{
path: "diff-viewer",
element: <DiffViewer />,
isLazy: true,
description:
"Side-by-side diff tool. Compare and visualize text/code differences instantly.",
category: "Utility",
icon: <FileDiff className={size5} />,
isPopular: true,
},
{
path: "browser-ready-css",
element: <AutoprefixerTool />,
isLazy: true,
description:
"Add necessary vendor prefixes to your CSS. Make it browser-ready with one click.",
category: "CSS",
icon: <ClipboardList className={size5} />,
},
{
path: "character-and-word-counter",
element: <CharacterAndWordCounter />,
description:
"Real-time counter for characters, words, paragraphs, and custom delimiters. Minimal and fast.",
category: "Utility",
icon: <TextCursorInput className={size5} />,
},
{
path: "lorem-ipsum-generator",
element: <LoremIpsumGenerator />,
isLazy: true,
description:
"Generate Lorem Ipsum text for mockups, wireframes, and content placeholders instantly.",
category: "Content",
icon: <FileText className={size5} />,
},
{
path: "image-metadata-viewer",
element: <ImageMetadataViewer />,
isLazy: true,
description:
"Inspect EXIF metadata from images: camera, GPS, timestamps, device info, and more.",
category: "Image",
icon: <Eye className={size5} />,
},
{
isNew: true,
path: "image-to-data-url",
element: <ImageToDataUrl />,
isLazy: true,
description:
"Convert images to Data URLs (Base64 or URL-encoded) for use in CSS, HTML, or JavaScript.",
category: "Image",
icon: <Link className={size5} />,
},
{
path: "string-converter",
element: <StringConverter />,
description:
"Convert strings into camelCase, PascalCase, kebab-case, snake_case, and more.",
category: "Utility",
icon: <Type className={size5} />,
},
{
path: "qr-code-generator",
element: <QrCodeGenerator />,
isLazy: true,
description: "Generate QR codes from input strings. Download-ready. ",
category: "Generator",
icon: <QrCode className={size5} />,
},
{
path: "hash-generator",
element: <HashGenerator />,
isLazy: true,
description:
"Generate hashes (MD5, SHA1, SHA224, SHA256, SHA384, SHA512, keccak256) from input string.",
category: "Security",
icon: <Hash className={size5} />,
},
{
path: "color-converter",
element: <ColorConverter />,
isLazy: true,
description:
"Convert between HEX, RGB, RGBA, and HSL color formats with real-time preview.",
category: "Color",
icon: <Palette className={size5} />,
},
{
isNew: true,
path: "screen-size",
element: <ScreenSize />,
description:
"Check your device screen width, height, and viewport dimensions in real time.",
category: "Utility",
icon: <Monitor className={size5} />,
},
{
path: "css-unit-converter",
element: <UnitConverter />,
description:
"Convert between CSS units like px, em and Tailwind equivalents.",
category: "Utility",
icon: <SlidersHorizontal className={size5} />,
},
{
isNew: true,
path: "css-text-styling",
element: <TextStylingTool />,
isLazy: true,
description:
"Interactive text style playground for tweaking fonts, gradients, shadows, strokes, and advanced CSS properties. Copy-ready output.",
category: "css",
icon: <CaseSensitive className={size5} />,
},
{
isNew: true,
path: "csv-to-table",
element: <CsvToTable />,
isLazy: true,
description:
"Convert CSV data to various table formats: Markdown, ASCII, HTML, JSON, and SQL.",
category: "Utility",
icon: <Table className={size5} />,
},
{
isNew: true,
path: "api-tester",
element: <ApiTester />,
isLazy: true,
description:
"Test HTTP requests (GET, POST, PUT, DELETE, etc.) directly from your browser. Analyze responses, headers, and performance.",
category: "Network",
icon: <Network className={size5} />,
},
/*
{ // Testing purpose
path: "test",
element: <Test />,
description:
"Interactive text style playground for tweaking fonts, gradients, shadows, strokes, and advanced CSS properties. Copy-ready output.",
category: "null",
icon: <CaseSensitive className={size5} />,
},
*/
{
path: "websites",
element: <Websites />,
description:
"Handpicked dev tools, sites, and resources. Bookmark-worthy stuff for web developers.",
category: "Directory",
icon: <ListChecks className={size5} />,
isPopular: true,
},
{
path: "*",
element: <NoPage />,
},
];
const customSlice = (startIdx, endIdx) =>
routes
.slice(startIdx, endIdx)
.map(({ path }) => (path === "/" ? path : "/" + path));
const paths = customSlice(1, -1);
const mobileResponsivePaths = customSlice(0, 4).concat(customSlice(12, -1));
export { formatToolName, routes, paths, mobileResponsivePaths };