-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html.literal
executable file
·173 lines (134 loc) · 6.85 KB
/
index.html.literal
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<!DOCTYPE html>
<html lang="en">
<head>
${ include('literal/documentation/templates/head.literal', './package.json') }
<link rel="stylesheet" href="./number-control/build/module.css">
<link rel="stylesheet" href="./select-control/build/module.css">
<link rel="stylesheet" href="./range-input/build/module.css">
<link rel="stylesheet" href="./rotary-input/build/module.css">
<link rel="stylesheet" href="./xy-input/build/module.css">
<link rel="stylesheet" href="./y-input/build/module.css">
<link rel="prefetch" as="style" href="./number-control/build/shadow.css">
<link rel="prefetch" as="style" href="./select-control/build/shadow.css">
<link rel="prefetch" as="style" href="./range-input/build/shadow.css">
<link rel="prefetch" as="style" href="./rotary-input/build/shadow.css">
<link rel="prefetch" as="style" href="./xy-input/build/shadow.css">
<link rel="prefetch" as="style" href="./y-input/build/shadow.css">
<script title="debug">
window.incrementControlStylesheet = './number-control/build/shadow.css';
window.selectControlStylesheet = './select-control/build/shadow.css';
window.rangeInputStylesheet = './range-input/build/shadow.css';
window.rotaryInputStylesheet = './rotary-input/build/shadow.css';
window.xyInputStylesheet = './xy-input/build/shadow.css';
window.yInputStylesheet = './y-input/build/shadow.css';
</script>
<style>
rotary-input {
max-width: 10rem;
}
* + rotary-input,
* + xy-input {
margin-top: 2rem;
}
.link-button {
--size: 2.5rem;
--border-width: 1px;
border-color: currentcolor;
border-radius: 0.3125rem;
}
.link-button:hover {
color: #4f6473;
}
* + .link-button {
margin-top: 1.25rem;
}
</style>
${ include('literal/documentation/templates/scripts.literal', './package.json') }
<script type="importmap">{
"dom/": "https://cdn.jsdelivr.net/gh/stephband/dom@master/modules/",
"fn/": "https://cdn.jsdelivr.net/gh/stephband/fn@master/modules/",
"bolt/": "https://cdn.jsdelivr.net/gh/stephband/bolt-2@main/",
"literal/": "https://cdn.jsdelivr.net/gh/stephband/literal@main/",
"slide-show/": "https://cdn.jsdelivr.net/gh/stephband/slide-show@main/"
}</script>
<script type="module">
import NumberControl from './number-control/build/module.js';
import SelectControl from './select-control/build/module.js';
import RangeInput from './range-input/build/module.js';
import RotaryInput from './rotary-input/build/module.js';
import XYInput from './xy-input/build/module.js';
import YInput from './y-input/build/module.js';
</script>
</head>
<body class="4x-grid @1-6x-grid @2-7x-grid @3-9x-grid grid" style="align-content: start;">
<header class="x1 4x @2-x2 x-stretch y-start">
<h1>Form elements</h1>
<p>A collection of advanced form controls published as custom elements.
Ranges of these elements can be scaled with linear, logarithm, or
exponential curves, values and tickmarks can by expressed in dB, Hz,
seconds and other units, and the elements may be used in forms with their
values being submitted like other form controls.
</p>
</header>
<section class="x1 4x @1-3x @2-x2 x-stretch y-stretch documentation-flex flex">
<h2><rotary-input></h2>
<p>A rotating knob input that can be dragged vertically, with scaling,
step, ticks, units and formatted output display.</p>
<rotary-input name="gain" min="0" max="2" ticks="-∞dB -60dB -54dB -48dB -42dB -36dB -30dB -24dB -18dB -12dB -6dB 0dB 6dB" scale="log-60dB" display="dB" value="-6dB">
Volume
</rotary-input>
<a class="link-button button x-start" href="./rotary-input/">Documentation</a>
</section>
<section class="x1 4x @1-3x @1-x4 @2-x5 x-stretch y-stretch documentation-flex flex">
<h2><range-input></h2>
<p>A horizontal slider input built around an <code><input type="range"></code>
augmented with scaling, step, ticks, units and formatted output display.</p>
<range-input name="scale" min="-1" max="1" ticks="-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1" value="-0.4">
Scale
</range-input>
<a class="link-button button x-start" href="./range-input/">Documentation</a>
</section>
<section class="x1 4x @1-3x @2-x2 x-stretch y-stretch documentation-flex flex">
<h2><y-input></h2>
<p>A vertical slider input with scaling, step, ticks, units, output display
and multiple values.</p>
<y-input class="x1 3x y6" value="0 1" min="-0.5" max="2" ticks>
Range
</y-input>
<a class="link-button button x-start" href="./y-input/">Documentation</a>
</section>
<section class="x1 4x @1-3x @1-x4 @2-x5 x-stretch y-stretch documentation-flex flex">
<h2><xy-input></h2>
<p>A two-axis input with scaling, step, ticks, units and multiple value handles.</p>
<xy-input value="0 0, 0.2 0.4 step 0.4 1.5 exponential 0.6 1 linear 0.8 0 target 0.4" ymin="-0.5" ymax="2" yticks xmin="0" xmax="1.4" xticks>
Envelope
</xy-input>
<a class="link-button button x-start" href="./xy-input/">Documentation</a>
</section>
<section class="x1 4x @1-3x @2-x2 x-stretch y-stretch documentation-flex flex">
<h2><number-control></h2>
<p>A wrapper element that augments an <code><input type="number"></code>
with increment/decrement controls.</p>
<number-control>
<input type="number" name="number" min="-10" max="10" value="0" />
</number-control>
<a class="link-button button x-start" href="./number-control/">Documentation</a>
</section>
<section class="x1 4x @1-3x @1-x4 @2-x5 x-stretch y-stretch documentation-flex flex">
<h2><select-control></h2>
<p>A wrapper element that augments a <code><select></code> with
previous/next controls.</p>
<select-control>
<select name="selection">
<option value="">Select one</option>
<option value="0">Option 0</option>
<option value="1">Option 1</option>
<option value="2">Option 2</option>
</select>
</select-control>
<a class="link-button button x-start" href="./select-control/">Documentation</a>
</section>
${ include('literal/documentation/templates/contribute.literal', './package.json') }
${ include('literal/documentation/templates/credit.literal', './package.json') }
${ include('literal/documentation/templates/footer.literal', './package.json') }
</body>