Clemylia commited on
Commit
0dffdc5
·
verified ·
1 Parent(s): 91497ba

Upload index.html

Browse files
Files changed (1) hide show
  1. index.html +197 -0
index.html ADDED
@@ -0,0 +1,197 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="fr">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Prenma - Générateur de noms</title>
7
+ <style>
8
+ body {
9
+ font-family: Arial, sans-serif;
10
+ background-color: #000;
11
+ color: #ff1493; /* Rose */
12
+ display: flex;
13
+ justify-content: center;
14
+ align-items: center;
15
+ min-height: 100vh;
16
+ margin: 0;
17
+ }
18
+
19
+ .container {
20
+ background-color: #1a1a1a;
21
+ padding: 30px;
22
+ border-radius: 10px;
23
+ box-shadow: 0 0 20px rgba(255, 20, 147, 0.5);
24
+ text-align: center;
25
+ width: 90%;
26
+ max-width: 500px;
27
+ }
28
+
29
+ h1 {
30
+ color: #fff;
31
+ margin-bottom: 20px;
32
+ }
33
+
34
+ .input-group {
35
+ margin-bottom: 20px;
36
+ text-align: left;
37
+ }
38
+
39
+ .input-group label {
40
+ display: block;
41
+ margin-bottom: 5px;
42
+ color: #fff;
43
+ }
44
+
45
+ .input-group input[type="number"],
46
+ .input-group select {
47
+ width: 100%;
48
+ padding: 10px;
49
+ border: 2px solid #ff1493;
50
+ background-color: #2c2c2c;
51
+ color: #ff1493;
52
+ border-radius: 5px;
53
+ box-sizing: border-box;
54
+ font-size: 16px;
55
+ }
56
+
57
+ .checkbox-group {
58
+ display: flex;
59
+ align-items: center;
60
+ margin-bottom: 20px;
61
+ }
62
+
63
+ .checkbox-group input[type="checkbox"] {
64
+ margin-right: 10px;
65
+ }
66
+
67
+ .checkbox-group label {
68
+ color: #fff;
69
+ }
70
+
71
+ button {
72
+ background-color: #ff1493;
73
+ color: #fff;
74
+ border: none;
75
+ padding: 12px 25px;
76
+ border-radius: 5px;
77
+ cursor: pointer;
78
+ font-size: 18px;
79
+ transition: background-color 0.3s ease;
80
+ }
81
+
82
+ button:hover {
83
+ background-color: #e00e7a;
84
+ }
85
+
86
+ #result {
87
+ margin-top: 30px;
88
+ padding: 15px;
89
+ background-color: #2c2c2c;
90
+ border: 2px solid #ff1493;
91
+ border-radius: 5px;
92
+ font-size: 24px;
93
+ color: #fff;
94
+ word-wrap: break-word; /* Pour les longs noms */
95
+ }
96
+ </style>
97
+ </head>
98
+ <body>
99
+
100
+ <div class="container">
101
+ <h1>Prenma</h1>
102
+ <p>Ton partenaire de noms et pseudos uniques</p>
103
+
104
+ <div class="input-group">
105
+ <label for="nameLength">Longueur du nom (3-15) :</label>
106
+ <input type="number" id="nameLength" min="3" max="15" value="8">
107
+ </div>
108
+
109
+ <div class="input-group">
110
+ <label for="nameStyle">Style de nom :</label>
111
+ <select id="nameStyle">
112
+ <option value="fantasy">Fantasy</option>
113
+ <option value="real">Nom réel</option>
114
+ </select>
115
+ </div>
116
+
117
+ <div class="checkbox-group">
118
+ <input type="checkbox" id="includeNumbers">
119
+ <label for="includeNumbers">Inclure des chiffres</label>
120
+ </div>
121
+
122
+ <button onclick="generateName()">Générer</button>
123
+
124
+ <div id="result">
125
+ Nom généré :
126
+ </div>
127
+ </div>
128
+
129
+ <script>
130
+ const vowels = 'aeiouy';
131
+ const consonants = 'bcdfghjklmnpqrstvwxyz';
132
+ const numbers = '0123456789';
133
+
134
+ function getRandomChar(str) {
135
+ return str[Math.floor(Math.random() * str.length)];
136
+ }
137
+
138
+ function generateFantasyName(length) {
139
+ let name = '';
140
+ let lastCharType = Math.random() < 0.5 ? 'vowel' : 'consonant';
141
+
142
+ for (let i = 0; i < length; i++) {
143
+ if (lastCharType === 'vowel') {
144
+ name += getRandomChar(consonants);
145
+ lastCharType = 'consonant';
146
+ } else {
147
+ name += getRandomChar(vowels);
148
+ lastCharType = 'vowel';
149
+ }
150
+ }
151
+ return name.charAt(0).toUpperCase() + name.slice(1);
152
+ }
153
+
154
+ function generateRealName() {
155
+ // Liste de prénoms et noms de familles
156
+ const firstNames = ['Alex', 'Léa', 'Lucas', 'Emma', 'Hugo', 'Chloé', 'Théo', 'Manon', 'Louise', 'Clementine', 'charlotte', 'Nicole', 'Rose', 'Françoise', 'Elsa', 'Julie', 'Karine', 'Emylie', 'Sylvie', 'Antoine', 'Mïa', "Elena", 'Mathieu', 'Clemence', 'Xavier', 'Laura', 'Veronique', 'Gloria', 'Louna', 'Oceanne', 'Violetine', 'Nora', 'Leo', 'Valentina', 'Nina', 'Lora', 'Dania', 'Sandra', 'Anaselia', 'Anastasia'];
157
+ const lastNames = ['Martin', 'Dubois', 'Thomas', 'Robert', 'Petit', 'Durand', 'Leroy', 'Moreau', 'Garcia', 'Bonnet', 'Castorina', 'Baril', 'Geneviere', 'Jonia', 'Mazoo', 'Noca', 'Cary', 'Astro', 'Grosiel', 'Lebois', 'Marte', 'Reno', 'Luminis', 'Zexir', 'Norza', 'Zilda', 'Kachallit', 'Vanilla', 'Durand', 'Bonnard', 'Le marseille', 'Nicotouche'];
158
+
159
+ const randomFirstName = firstNames[Math.floor(Math.random() * firstNames.length)];
160
+ const randomLastName = lastNames[Math.floor(Math.random() * lastNames.length)];
161
+
162
+ return randomFirstName + ' ' + randomLastName;
163
+ }
164
+
165
+ function addNumbers(name) {
166
+ let numLength = Math.floor(Math.random() * 4) + 1; // 1 à 4 chiffres
167
+ let numbersPart = '';
168
+ for (let i = 0; i < numLength; i++) {
169
+ numbersPart += getRandomChar(numbers);
170
+ }
171
+ return name + numbersPart;
172
+ }
173
+
174
+ function generateName() {
175
+ const length = document.getElementById('nameLength').value;
176
+ const style = document.getElementById('nameStyle').value;
177
+ const includeNumbers = document.getElementById('includeNumbers').checked;
178
+ const resultDiv = document.getElementById('result');
179
+
180
+ let generatedName;
181
+
182
+ if (style === 'fantasy') {
183
+ generatedName = generateFantasyName(length);
184
+ } else {
185
+ generatedName = generateRealName();
186
+ }
187
+
188
+ if (includeNumbers) {
189
+ generatedName = addNumbers(generatedName);
190
+ }
191
+
192
+ resultDiv.textContent = 'Nom généré : ' + generatedName;
193
+ }
194
+ </script>
195
+
196
+ </body>
197
+ </html>