-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathindex.html
36 lines (31 loc) · 1.72 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
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="toggle.css"/>
<style>
* {font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;}
main {font-weight: 300;}
</style>
</head>
<body>
<h1>Toggle Widget</h1>
<main>
<p>This is a simple toggle widget that can replace checkboxes most cases. It adds a hidden input to the form that will contain the value TRUE or FALSE.
<form>
<div script="install toggle" name="thing" value="true" true-text="YES. Do the thing" false-text="NO. Don't do it."></div>
<div style="height:1em;"></div>
<div script="install toggle" name="missles" value="false" true-text="ACTIVE. Missles will fire automatically." false-text="PASSIVE. Missles only fire manually"></div>
<div style="height:1em;"></div>
<div script="install toggle" name="binary" value="true" true-text="YES. Binary" false-text="NO. Not binary."></div>
<div style="height:1em;"></div>
<div script="install toggle" name="correct" value="false" true-text="YES. Hyperscript is awesome." false-text="NO. I must be confused."></div>
<div style="height:1em;"></div>
<div script="install toggle" name="missles" value="true" true-text="This is the same label no matter what." false-text="This is the same label no matter what."></div>
<div style="height:1em;"></div>
<div script="install toggle" name="missles" value="false"></div>
</form>
</main>
<script src="toggle._hs" type="text/hyperscript"></script>
<script src="https://unpkg.com/hyperscript.org"></script>
</body>
</html>