-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
95 lines (83 loc) · 2.38 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Kusingenerator</title>
<script
src="https://code.jquery.com/jquery-3.4.1.min.js"
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
crossorigin="anonymous"></script>
<script
src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"
integrity="sha256-VazP97ZCwtekAsvgPBSUwPFKdrwD3unUfSGVYrahUqU="
crossorigin="anonymous"></script>
<script type="text/javascript" src="kusin.js"></script>
<style>
#playground {
position: relative;
}
.person {
width: 100px;
height: 100px;
position: absolute;
}
.person button {
display: none;
}
.person:hover button {
display: block;
height: 5px;
width: 100%;
}
.person .inner {
background-color: black;
width: 90px;
height: 90px;
}
.female .inner{
border-radius: 50%;
}
.male .inner{
border-radius: 0%;
}
.sel1 .inner{
background-color: blue;
}
</style>
</head>
<body>
<form style="display: none">
<p>
<label>Andel kusinäktenskap</label>
<input id="kusin" name="kusin" type="number">
</p>
<p><label>Andel dubbelkusiner</label>
<input name="dubbelkusiner">
</p><p>
<label>Antal barn per familj</label>
<input max="30" min="1" type="range">
</p>
<p>
<label>Polygami</label>
<input type="checkbox">
</p>
</form>
<div style="display: none" class='person female'>
<button onclick="addParent(this)">+</button>
<div class='inner'></div>
<button>+</button>
</div>
<input type="button" value="lägg till hona" onclick="cousinCalc.newIndividual()">
<input type="button" value="lägg till hane" onclick="cousinCalc.newIndividual('m')">
<input type="button" value="Jämför" onclick="cousinGraph.calculate();">
<div style="display: none" class='person female'>
<button onclick="addParent(this)">+</button>
<div class='inner'></div>
<button>+</button>
</div>
<div id="playground">
<svg id="svg" style="position: absolute" width="100%" height="100%">
<line stroke="black" id="line1"/></svg>
</div>
</body>
</html>