forked from benpate/hyperscript-widgets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
84 lines (68 loc) · 2.36 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
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="multiselect.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>Multiselect 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 style="max-width:400px;">
<div class="multiselect" style="max-height:160px;" script="install multiselect">
<div class="options">
<!-- Options can be styled any way you like -->
<label for="id1">
<input type="checkbox" id="id1" name="options" value="first">
First Option
</label>
<label for="id2">
<input type="checkbox" id="id2" name="options" value="second">
Second Option
</label>
<label for="id3">
<input type="checkbox" id="id3" name="options" value="third">
Third Option
</label>
<label for="id4">
<input type="checkbox" id="id4" name="options" value="fourth">
Fourth Option
</label>
<label for="id5">
<input type="checkbox" id="id5" name="options" value="fifth">
Fifth Option
</label>
<label for="id6">
<input type="checkbox" id="id6" name="options" value="sixth">
Sixth Option
</label>
<label for="id7">
<input type="checkbox" id="id7" name="options" value="seventh">
Seventh Option
</label>
<label for="id8">
<input type="checkbox" id="id8" name="options" value="eighth">
Eighth Option
</label>
<label for="id9">
<input type="checkbox" id="id9" name="options" value="ninth">
Ninth Option
</label>
</div>
<!-- Sort buttons are optional. If present, then users can change option order -->
<div class="buttons">
<button type="button" data-sort="up">⇧</button>
<button type="button" data-sort="down">⇩</button>
</div>
</div>
</form>
</main>
<script src="multiselect._hs" type="text/hyperscript"></script>
<script src="https://unpkg.com/hyperscript.org"></script>
<!-- Sortable is optional. If included, then select options will automatically be draggable -->
<script src="https://www.unpkg.com/[email protected]/Sortable.min.js"></script>
</body>
</html>