-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFantasyNameGeneratorPage.jsx
More file actions
665 lines (648 loc) · 14.6 KB
/
FantasyNameGeneratorPage.jsx
File metadata and controls
665 lines (648 loc) · 14.6 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
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
import React, { useState } from 'react';
import { Link } from 'react-router-dom';
import {
ArrowLeftIcon,
CopySimpleIcon,
UserFocusIcon,
ArrowsClockwiseIcon,
} from '@phosphor-icons/react';
import { useToast } from '../../hooks/useToast';
import Seo from '../../components/Seo';
import CustomDropdown from '../../components/CustomDropdown';
import GenerativeArt from '../../components/GenerativeArt';
import BreadcrumbTitle from '../../components/BreadcrumbTitle';
const FantasyNameGeneratorPage = () => {
const appName = 'Identity Gen';
const [nameType, setNameType] = useState('human');
const [generatedName, setGeneratedName] = useState('');
const { addToast } = useToast();
const handleCopy = async () => {
if (generatedName) {
try {
await navigator.clipboard.writeText(generatedName);
addToast({
title: 'Success',
message: 'Identity mapped to clipboard.',
});
} catch (err) {
addToast({
title: 'Failure',
message: 'Mapping failed.',
type: 'error',
});
}
}
};
const nameParts = {
human: {
prefixes: [
'Ael',
'Bor',
'Cael',
'Dra',
'El',
'Fen',
'Gor',
'Hal',
'Isol',
'Jor',
'Kal',
'Lor',
'Mor',
'Nor',
'Orin',
'Per',
'Quinn',
'Roric',
'Ser',
'Thorn',
'Ulric',
'Val',
'Wyn',
'Ald',
'Bran',
'Cor',
'Dain',
'Ed',
'Finn',
'Gareth',
'Haldor',
'Ivar',
'Kaelen',
'Leif',
'Magnus',
'Niall',
'Odin',
'Perrin',
'Ragnar',
'Sten',
'Torvin',
'Ulf',
'Vance',
'Wulf',
],
middles: [
'an',
'den',
'ric',
'wyn',
'gar',
'lin',
'dor',
'mar',
'van',
'thar',
'mond',
'bert',
'fred',
'gorn',
'hald',
'kiel',
'land',
'morn',
'niel',
'rath',
'sian',
'tian',
'vyn',
'ard',
'ast',
'ber',
'dal',
'dred',
'eon',
'fyn',
'glen',
'hark',
'ing',
'kyn',
'lar',
'mond',
'nys',
'oth',
'pyr',
'quen',
'ryn',
'syl',
'tav',
'und',
'ver',
'wynn',
],
suffixes: [
'us',
'a',
'on',
'en',
'or',
'yn',
'ia',
'eth',
'an',
'ar',
'da',
'el',
'is',
'ra',
'os',
'er',
'in',
'of',
'um',
'ald',
'ard',
'bert',
'mond',
'red',
'son',
'ton',
'born',
'brook',
'field',
'ford',
'ham',
'hurst',
'ley',
'mont',
'ridge',
'shire',
'stead',
'ton',
'vale',
'wood',
'wick',
'worth',
'stone',
'shield',
'blade',
'heart',
],
},
elf: {
prefixes: [
'Aer',
'Ael',
'El',
'Fael',
'Lae',
'Lir',
'Sil',
'Thran',
'Val',
'Xyl',
'Yl',
'Zyl',
'Aen',
'Alat',
'Aran',
'Bael',
'Caelen',
'Dae',
'Eil',
'Fin',
'Gael',
'Hael',
'Ili',
'Jor',
'Kael',
'Loth',
'Mael',
'Nym',
'Olen',
'Pael',
'Quen',
'Riel',
'Sael',
'Tael',
'Ulen',
'Ven',
'Wyl',
],
middles: [
'an',
'ara',
'en',
'iel',
'ion',
'ith',
'or',
'wen',
'yn',
'dor',
'mar',
'van',
'thal',
'rion',
'syl',
'tir',
'aen',
'al',
'ath',
'dar',
'dran',
'eon',
'fiel',
'glen',
'hian',
'ian',
'ith',
'lan',
'lin',
'mir',
'nys',
'oth',
'phyr',
'quel',
'ryn',
'sian',
'tian',
'und',
'vyn',
'wen',
],
suffixes: [
'as',
'a',
'el',
'en',
'ia',
'ion',
'is',
'or',
'os',
'ra',
'us',
'wyn',
'ys',
'eth',
'iel',
'in',
'on',
'ril',
'wen',
'dore',
'fiel',
'las',
'mar',
'nys',
'ore',
'riel',
'sil',
'thas',
'van',
'wen',
'wyn',
'ys',
'aen',
'dar',
'ion',
'ith',
'lan',
'lin',
'mir',
],
},
dwarf: {
prefixes: [
'Bor',
'Dur',
'Gim',
'Kael',
'Thrain',
'Bal',
'Dwal',
'Fili',
'Kili',
'Oin',
'Gloin',
'Thor',
'Bif',
'Bof',
'Bomb',
'Bard',
'Brok',
'Dori',
'Farin',
'Flint',
'Gror',
'Haldor',
'Iron',
'Khard',
'Lodur',
'Mordin',
'Nain',
'Orik',
'Roric',
'Stone',
'Throk',
'Ulfgar',
'Volk',
],
middles: [
'in',
'grim',
'li',
'son',
'gar',
'rek',
'und',
'orn',
'rak',
'dal',
'mar',
'stone',
'beard',
'hammer',
'axe',
'axe',
'beard',
'braid',
'breaker',
'delver',
'fist',
'forge',
'hand',
'heart',
'helm',
'hide',
'iron',
'rock',
'shield',
'stone',
'stride',
'tamer',
'thane',
'hammer',
],
suffixes: [
'son',
'in',
'grim',
'li',
'rek',
'und',
'orn',
'rak',
'dal',
'mar',
'stone',
'beard',
'hammer',
'axe',
'foot',
'hand',
'shield',
'born',
'brook',
'delver',
'dottir',
'fist',
'forge',
'hand',
'heart',
'helm',
'hide',
'iron',
'rock',
'shield',
'son',
'stone',
'stride',
'tamer',
'thane',
'hammer',
],
},
orc: {
prefixes: [
'Grak',
'Thorg',
'Ur',
'Morg',
'Grish',
'Azog',
'Bolg',
'Drog',
'Grog',
'Karg',
'Maug',
'Snag',
'Blud',
'Drak',
'Frak',
'Gnar',
'Harg',
'Krag',
'Lurg',
'Mulg',
'Oog',
'Ragn',
'Skarg',
'Trog',
'Vorg',
'Zog',
],
middles: [
'ash',
'uk',
'og',
'nar',
'gul',
'rak',
'oth',
'fang',
'skull',
'blood',
'hide',
'tooth',
'bash',
'bone',
'gut',
'head',
'jaw',
'maul',
'rend',
'rip',
'snarl',
'smash',
'spike',
'tusk',
'gore',
'flesh',
],
suffixes: [
'ak',
'ug',
'osh',
'uk',
'a',
'ar',
'da',
'er',
'ish',
'ok',
'or',
'oth',
'ra',
'rag',
'rot',
'ruk',
'um',
'un',
'ur',
'blood',
'fang',
'fist',
'hide',
'killer',
'maul',
'ripper',
'scar',
'skull',
'smasher',
'tooth',
'axe',
'blade',
'gut',
'jaw',
],
},
};
const generateName = () => {
const getRandomElement = (arr) =>
arr[Math.floor(Math.random() * arr.length)];
const selectedParts = nameParts[nameType];
if (!selectedParts) return;
let name = getRandomElement(selectedParts.prefixes);
if (Math.random() > 0.3) name += getRandomElement(selectedParts.middles);
name += getRandomElement(selectedParts.suffixes);
setGeneratedName(name.charAt(0).toUpperCase() + name.slice(1));
};
return (
<div className="min-h-screen bg-[#050505] text-white selection:bg-emerald-500/30 font-sans">
<Seo
title="Identity Gen | Fezcodex"
description="Protocol for archetypal nomenclature. Generate names for humans, elves, dwarves, and orcs."
keywords={[
'Fezcodex',
'fantasy name generator',
'random name',
'human names',
'elf names',
'dwarf names',
'orc names',
]}
/>
<div className="mx-auto max-w-7xl px-6 py-24 md:px-12">
<header className="mb-24">
<Link
to="/apps"
className="group mb-12 inline-flex items-center gap-2 text-xs font-mono text-gray-500 hover:text-white transition-colors uppercase tracking-[0.3em]"
>
<ArrowLeftIcon
weight="bold"
className="transition-transform group-hover:-translate-x-1"
/>
<span>Applications</span>
</Link>
<div className="flex flex-col md:flex-row md:items-end justify-between gap-12">
<div className="space-y-4">
<BreadcrumbTitle
title="Identity Gen"
slug="fng"
variant="brutalist"
/>
<p className="text-xl text-gray-400 max-w-2xl font-light leading-relaxed">
Identity synthesis protocol. Generate archetypal nomenclature
for diverse neural profiles and systemic entities.
</p>
</div>
</div>
</header>
<div className="grid grid-cols-1 lg:grid-cols-12 gap-12">
{/* Interaction Area */}
<div className="lg:col-span-8">
<div className="relative border border-white/10 bg-white/[0.02] p-12 md:p-24 rounded-sm overflow-hidden group flex flex-col items-center justify-center">
<div className="absolute inset-0 opacity-[0.03] pointer-events-none grayscale">
<GenerativeArt
seed={generatedName || appName}
className="w-full h-full"
/>
</div>
<div className="relative z-10 w-full flex flex-col items-center gap-16">
<div className="text-center space-y-4">
<span className="font-mono text-[10px] text-emerald-500 font-bold uppercase tracking-[0.5em]">
{'//'} SYNTHESIZED_NAME
</span>
<div
className={`text-5xl md:text-[8rem] font-black tracking-tighter uppercase leading-none transition-all duration-500 ${generatedName ? 'text-white' : 'text-gray-800'}`}
>
{generatedName || 'Identity'}
</div>
</div>
<div className="flex flex-wrap justify-center gap-6">
<button
onClick={generateName}
className="group relative inline-flex items-center gap-4 px-12 py-6 bg-white text-black hover:bg-emerald-400 transition-all duration-300 font-mono uppercase tracking-widest text-sm font-black rounded-sm shadow-[0_0_30px_rgba(255,255,255,0.05)]"
>
<ArrowsClockwiseIcon
weight="bold"
size={24}
className="group-hover:rotate-180 transition-transform duration-500"
/>
<span>Synthesize New</span>
</button>
<button
onClick={handleCopy}
disabled={!generatedName}
className="group relative inline-flex items-center gap-4 px-12 py-6 border border-white/10 text-white hover:bg-white/5 transition-all duration-300 font-mono uppercase tracking-widest text-sm font-bold rounded-sm disabled:opacity-20"
>
<CopySimpleIcon weight="bold" size={24} />
<span>Store Identity</span>
</button>
</div>
</div>
</div>
</div>
{/* Config Module */}
<div className="lg:col-span-4 space-y-8">
<div className="border border-white/10 bg-white/[0.02] p-8 rounded-sm space-y-10">
<h3 className="font-mono text-[10px] font-bold text-emerald-500 uppercase tracking-widest flex items-center gap-2">
<UserFocusIcon weight="fill" />
Origin_Parameters
</h3>
<div className="space-y-6">
<label className="block font-mono text-[10px] text-gray-500 uppercase tracking-widest">
Selected_Archetype
</label>
<CustomDropdown
variant="brutalist"
options={[
{ label: 'Human', value: 'human' },
{ label: 'Elf', value: 'elf' },
{ label: 'Dwarf', value: 'dwarf' },
{ label: 'Orc', value: 'orc' },
]}
value={nameType}
onChange={setNameType}
label="Archetype"
/>
</div>
<div className="pt-8 border-t border-white/5">
<p className="text-[10px] font-mono uppercase tracking-[0.2em] leading-relaxed text-gray-500">
Nomenclature is derived from linguistic datasets mapped to
specific historical and cultural matrices.
</p>
</div>
</div>
</div>
</div>
<footer className="mt-32 pt-12 border-t border-white/10 flex flex-col md:flex-row justify-between items-center gap-6 text-gray-600 font-mono text-[10px] uppercase tracking-[0.3em]">
<span>Fezcodex_Identity_Loom_v0.6.1</span>
<span className="text-gray-800">MAPPING_ENGINE // ACTIVE</span>
</footer>
</div>
</div>
);
};
export default FantasyNameGeneratorPage;