-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
103 lines (99 loc) · 4.46 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>The Elder Scrolls Name Generator</title>
<!--
My whole work is based on Aleist3r's Name generator v1.2
See https://www.nexusmods.com/morrowind/mods/45610
Thank you for the amazing work!
I just ported it to a web based version,
so everyone can access it, even on the go.
-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="assets/src/generate.js"></script>
<script>
function generate(gender, race) {
switch (race) {
case "altmer":
return Generator.getAltmer(gender);
case "argonianJel":
return Generator.getArgonianJel(gender);
case "argonianTamrielic":
return Generator.getArgonianTamrielic(gender);
case "bosmer":
return Generator.getBosmer(gender);
case "breton":
return Generator.getBreton(gender);
case "chimerAzura":
return Generator.getChimerAzura(gender);
case "chimerOuamer":
return Generator.getChimerOuamer(gender);
case "dunmer":
return Generator.getDunmer(gender);
case "dunmerAshlander":
return Generator.getDunmerAshlander(gender);
case "imperial":
return Generator.getImperial(gender);
case "khajiit":
return Generator.getKhajiit(gender);
case "nord":
return Generator.getNord(gender);
case "orsimer":
return Generator.getOrsimer(gender);
case "redguard":
return Generator.getRedguard(gender);
default:
return "";
};
}
function onButtonPress (gender) {
var race = $("#race option:selected").data("key");
var names = "";
for (let i = 0; i < 10; i++) {
names += generate(gender, race) + "<br>";
}
$("#output").html(names);
};
</script>
<link rel="stylesheet" href="assets/css/general.css" type="text/css">
<link rel="stylesheet" media="screen and (max-width: 600px)" href="assets/css/mobile.css" type="text/css">
<link rel="stylesheet" media="screen and (min-width: 600px)" href="assets/css/desktop.css" type="text/css">
<link rel="shortcut icon" href="assets/img/favicon.ico" type="image/x-icon">
</head>
<body>
<div id="wrapper">
<h1>Name generator</h1><br>
<div class="container">
<select id="race">
<option data-key="altmer">Altmer (High elves)</option>
<option data-key="argonianJel">Argonian (Jel)</option>
<option data-key="argonianTamrielic">Argonian (Tamrielic)</option>
<option data-key="bosmer">Bosmer (Wood elves)</option>
<option data-key="breton">Breton</option>
<option data-key="chimerAzura">Chimer (Azura)</option>
<option data-key="chimerOuamer">Chimer (Ouamer)</option>
<option data-key="dunmer">Dunmer (Dark elves)</option>
<option data-key="dunmerAshlander">Dunmer (Ashlander)</option>
<option data-key="imperial">Imperial</option>
<option data-key="khajiit">Khajiit</option>
<option data-key="nord">Nord</option>
<option data-key="orsimer">Orsimer (Orcs)</option>
<option data-key="redguard">Redguard</option>
</select>
</div>
<div class="container">
<img onclick="onButtonPress('male');" class="gender-button" src="assets/img/mars.svg" alt="Male">
<img onclick="onButtonPress('female');" class="gender-button" src="assets/img/venus.svg" alt="Female">
</div>
<p id="output"> </p>
</div>
<div id="footer">
<p>
Based on <a href="https://www.nexusmods.com/morrowind/mods/45610">Aleist3r's Name generator v1.2</a><br>
</p>
</div>
</body>
</html>