forked from ibnuda/dactyl-keyboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wrapper.html
114 lines (105 loc) · 5.06 KB
/
wrapper.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
104
105
106
107
108
109
110
111
112
113
114
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dactyl Generator</title>
<link rel="stylesheet" href="normalize.css">
<link rel="stylesheet" href="milligram.min.css">
<link rel="stylesheet" href="main.css">
<script>
function setkeyboard(ncols, nrows, thumbcount, innercolumn, lastrow, widepinky) {
document.getElementById("ncols").value = ncols;
document.getElementById("nrows").value = nrows;
document.getElementById("thumb-count").value = thumbcount;
document.getElementById("inner-column").value = innercolumn;
document.getElementById("last-row").value = lastrow;
document.getElementById("wide-pinky").value = widepinky;
}
function setminidox() {
setkeyboard(5, 4, "three", "false", "zero", "false");
}
function setcorne() {
setkeyboard(6, 4, "three", "false", "zero", "false");
}
function setergodox() {
setkeyboard(6, 5, "six", "true", "full", "true");
}
function toggle_connectors_fields() {
const use_external_holder = document.getElementById("external-holder").value;
const impacted_ids = ["trrs-connector", "usb-hole"];
if (use_external_holder === "true") {
impacted_ids.forEach(id => {
document.querySelector("label[for='" + id + "']").style.display = 'none'; // Hide the label
document.querySelector("select[id='" + id + "']").style.display = 'none'; // Hide the select
});
} else {
impacted_ids.forEach(id => {
document.querySelector("label[for='" + id + "']").style.display = 'block'; // Show the label
document.querySelector("select[id='" + id + "']").style.display = 'block'; // Hide the select
});
}
}
function toggle_wrist_rest_type_fields() {
const use_wrist_rest = document.getElementById("wrist-rest").value;
if (use_wrist_rest === "false") {
document.querySelector("label[for='integrated-wrist-rest']").style.display = 'none'; // Hide the label
document.querySelector("select[id='integrated-wrist-rest']").style.display = 'none'; // Hide the select
document.querySelector("input[name='generate-wrist-rest']").style.display = 'none'; // Hide the input
} else {
document.querySelector("label[for='integrated-wrist-rest']").style.display = 'block'; // Show the label
document.querySelector("select[id='integrated-wrist-rest']").style.display = 'block'; // Show the select
toggle_generate_wrist_rest_button();
}
}
function toggle_generate_wrist_rest_button() {
const integrated_wrist_rest = document.getElementById("integrated-wrist-rest").value;
if (integrated_wrist_rest === "true") {
document.querySelector("input[name='generate-wrist-rest']").style.display = 'none'; // Hide the button
} else {
document.querySelector("input[name='generate-wrist-rest']").style.display = 'block'; // Show the button
}
}
</script>
</head>
<body>
<div class="wrapper">
<nav class="navigation">
<section class="container">
<a class="navigation-title" href="/" title="Dactyl Generator">
<h1 class="title">Generator</h1>
</a>
<ul class="navigation-list float-right">
<li class="navigation-item">
<a href="/api" class="navigation-link">API</a>
</li>
<li class="navigation-item">
<a href="/manuform" class="navigation-link">Manuform</a>
</li>
<li class="navigation-item">
<a href="/lightcycle" class="navigation-link">Lightcycle</a>
</li>
<li class="navigation-item">
<a href="/example" class="navigation-link">Example</a>
</li>
</ul>
</section>
</nav>
<div id="content" class="container">
{% block content %}
{% endblock %}
</div>
<footer class="footer">
<section class="container">
<p class="copyright">
Written by<a href="https://github.com/ibnuda" rel="noopener" target="_blank"
title="Rick's GH page."> Ibnu D. Aji</a>.
Licenced under the<a href="https://github.com/ibnuda/dactyl-keyboard/tree/refaktor#license"
rel="noopener" target="_blank" title="GNU Affero General Public License Version 3"> GNU
Affero General Public License V3</a>.
</p>
</section>
</footer>
</div>
</body>
</html>