-
Notifications
You must be signed in to change notification settings - Fork 3
/
index_jp.html
99 lines (98 loc) · 2.77 KB
/
index_jp.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
<!DOCTYPE html>
<html lang="jp">
<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>半☆導☆戯☆王</title>
<script src="cardMaker.js"></script>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div>
<div class="card">
<div id="cardContainer" class="card-preview"></div>
<form id="cardMakingForm" class="card-form">
<span class="languages">
<span> <a href="index.html"> Korean</a> </span>
<span> <a href="index_en.html"> English</a></span>
<span> <a href="index_jp.html"> Japanese</a></span>
</span>
<div>
<label>
<span>タイトル</span>
<input type="text" name="title" />
</label>
</div>
<div>
<label>
<span>部族/効果</span>
<input type="text" name="subtitle" />
</label>
</div>
<!--div>
<label>
<input type="radio" name="type" value="0">
<span>화염</span>
</label>
<label>
<input type="radio" name="type" value="1">
<span>어둠</span>
</label>
<label>
<input type="radio" name="type" value="2">
<span>물</span>
</label>
<label>
<input type="radio" name="type" value="3">
<span>빛</span>
</label>
<label>
<input type="radio" name="type" value="4">
<span>땅</span>
</label>
</div-->
<div>
<label>
<span>説明</span>
<textarea type="text" name="description"></textarea>
</label>
</div>
<!--div>
<label>
<span>공격력</span>
<input type="number" name="atk">
</label>
</div>
<div>
<label>
<span>방어력</span>
<input type="number" name="def">
</label>
</div-->
<div>
<button type="submit">生成</button>
</div>
</form>
</div>
<script>
(function () {
function fillForm() {
['title', 'subtitle', 'description'].forEach(function (v) {
document.querySelector('#cardMakingForm *[name=' + v+']').value = cardMaker[v];
});
}
var cardMaker = new Card(document.querySelector('#cardContainer'));
cardMaker.render();
fillForm();
document.querySelector('#cardMakingForm').addEventListener('submit', function (e) {
e.preventDefault();
['title', 'subtitle', 'description'].forEach(function (v) {
cardMaker[v] = document.querySelector('#cardMakingForm *[name='+v+']').value;
});
cardMaker.render();
});
})();
</script>
</body>
</html>