forked from stephband/dom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.html
243 lines (212 loc) · 9.54 KB
/
template.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
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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
<!DOCTYPE html>
<html lang="en" is="sparky">
<head build-fn="fetch:package.json">
<meta charset="utf-8" />
<meta name="author" content="@{[author.twitter]}" />
<meta name="description" content="Documentation for {[title]}. {[description]}" />
<meta name="viewport" content="width=device-width" />
<title>{[title]}</title>
<script>
document.documentElement.className = 'js';
window.DEBUG = false;
</script>
<link rel="shortcut icon" href="images/logo-64x64.ico" />
<link rel="icon" type="image/png" href="images/logo-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="images/logo-64x64.png" sizes="64x64">
<link rel="icon" type="image/png" href="images/logo-128x128.png" sizes="128x128">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto+Mono:100,300,400,500,700" />
<link rel="stylesheet" href="../bolt/css/html.css" />
<link rel="stylesheet" href="../bolt/css/root.css" />
<link rel="stylesheet" href="../bolt/css/body.css" />
<link rel="stylesheet" href="../bolt/css/block.css" />
<link rel="stylesheet" href="../bolt/css/bubble.css" />
<link rel="stylesheet" href="../bolt/css/button.css" />
<link rel="stylesheet" href="../bolt/css/dialog.css" />
<link rel="stylesheet" href="../bolt/css/layer.css" />
<link rel="stylesheet" href="../bolt/css/type.css" />
<link rel="stylesheet" href="../bolt/css/text.css" />
<link rel="stylesheet" href="../bolt/css/color.css" />
<link rel="stylesheet" href="../dom/css/dom.css" />
<link rel="stylesheet" href="../fn/css/prism-cruncher.css" />
<link rel="stylesheet" href="../fn/css/tests.css" />
<link rel="stylesheet" href="../fn/css/docs.css" />
<link rel="stylesheet" href="../dom/css/theme.css" />
<link rel="stylesheet" href="../fn/css/respond.css" />
</head>
<body class="@3-12-grid grid">
<header class="x-1 3x @1-6x @2-9x @3-x-2 @3-9x" id="header">
<template build-fn="fetch:package.json" build-src="/fn/templates.html#header-template"></template>
</header>
<section class="x-1 3x @1-6x @2-9x @3-x-2 grid" locateable id="functions">
<header class="x-1 3x @1-4x">
<h2 class="text-2">Functions</h2>
</header>
<div class="x-1 3x @2-4x">
<p>Import functions:</p>
<pre><code class="language-js">import { closest, matches } from '/dom/module.js';</code></pre>
<p>All functions that take more than one parameter are partially applicable.</p>
</div>
<div class="x-1 3x column-grid grid">
<div class="x-1">
<h4 class="text-4">select.</h4>
<template build-fn="docs:
modules/closest.js,
modules/children.js,
modules/find.js,
modules/matches.js,
modules/select.js
filter-function each" build-src="/fn/templates.html#{[type]}-template"></template>
</div>
<div class="x-1">
<h4 class="text-4">inspect.</h4>
<template build-fn="docs:
modules/attribute.js,
modules/identify.js,
modules/media.js,
modules/tag.js,
modules/nodes.js
filter-function each" build-src="/fn/templates.html#{[type]}-template"></template>
</div>
<div class="x-1">
<h4 class="text-4">mutate.</h4>
<template build-fn="docs:
modules/append.js,
modules/assign.js,
modules/create.js,
modules/clone.js,
modules/prepend.js
filter-function each" build-src="/fn/templates.html#{[type]}-template"></template>
</div>
</div>
<div class="x-1 3x @1-x-4 column-grid grid">
<div class="x-1">
<h4 class="text-4">events.</h4>
<template build-fn="docs:
modules/events.js,
modules/gestures.js,
modules/trap-focus.js,
modules/trigger.js,
modules/to-key.js,
modules/event.js
filter-function each" build-src="/fn/templates.html#{[type]}-template"></template>
</div>
<div class="x-1">
<h4 class="text-4">style.</h4>
<template build-fn="docs:
modules/classes.js,
modules/offset.js,
modules/prefix.js,
modules/rect.js,
modules/scroll-ratio.js,
modules/scroll.js,
modules/style.js
filter-function each" build-src="/fn/templates.html#{[type]}-template"></template>
</div>
</div>
<div class="x-1 3x @2-x-7 column-grid grid">
<div class="x-1">
<h4 class="text-4">animate.</h4>
<template build-fn="docs:
modules/animate.js,
modules/transition.js
filter-function each" build-src="/fn/templates.html#{[type]}-template"></template>
</div>
<div class="x-1">
<h4 class="text-4">HTML.</h4>
<template build-fn="docs:
modules/escape.js,
modules/fragments.js,
modules/parse.js
filter-function each" build-src="/fn/templates.html#{[type]}-template"></template>
</div>
</div>
</section>
<section class="x-1 3x @1-6x @2-9x @3-x-2 columns-grid grid" locateable id="attributes">
<header class="x-1 3x @1-4x block">
<h2 class="text-2">Attributes</h2>
<p>The library has a number of scripts for cheekily extending the
default behaviour of DOM elements, declared via 'behaviour' attributes.</p>
<!--p>Behaviours may be imported and used before
<code class="language-js">'DOMContentLoad'</code>, there are no
'setup' functions to run, and elements that are added
to the DOM later get to use them automatically.</p-->
<p>No style is given to make these behaviours do anything <i>visual</i>
however. Behaviours, largely, add and remove classes, how that <i>looks</i>
is up to your CSS. This is deliberate: by seperating style
and behaviour many different styles of interactive –
<a href="#example-menu">a menu</a>, <a href="#example-dialog">a dialog</a>,
<a href="#example-tooltip">a tooltip</a> – may share, for example,
<code class="language-js">popable</code> behaviour.</p>
<nav class="menu-toggle-block toggle-block block" popable id="example-menu">
<a class="menu-button button" href="#">One</a>
<a class="menu-button button" href="#">Two</a>
<a class="menu-button button" href="#">Three</a>
<a class="menu-button button" href="#">Boo</a>
</nav>
<section class="dialog" popable id="example-dialog">
Boo
</section>
<aside class="top-bubble bubble" popable id="example-tooltip">
Boo
</aside>
</header>
<div class="x-1 y-2 3x @2-4x">
<h3 class="text-4">Navigate</h3>
<template build-fn="docs:
js/locateable.js
each" build-src="/fn/templates.html#attribute-template"></template>
<h3 class="text-4">Hijack</h3>
<template build-fn="docs:
js/fullscreenable.js,
js/popable.js,
js/switchable.js,
js/toggleable.js
each" build-src="/fn/templates.html#attribute-template"></template>
</div>
<div class="x-1 y-2 3x @2-x-6 @2-4x">
<h3 class="text-4">Data</h3>
<template build-fn="docs:
js/draggable.js,
js/droppable.js
each" build-src="/fn/templates.html#attribute-template"></template>
<h3 class="text-4">Forms</h3>
<template build-fn="docs:
js/submittable.js,
js/validateable.js
each" build-src="/fn/templates.html#attribute-template"></template>
</div>
</section>
<!--section class="x-1 3x @1-6x @2-9x @3-x-2 columns-grid grid" locateable id="observer">
<header class="x-1 3x @1-4x">
<h2 class="text-2" style="font-size: 1.875rem;">Events</h2>
</header>
<div class="x-1 3x list-grid grid">
<template build-fn="docs:
js/dom-activate.js,
js/dom-gesture.js
each" build-src="/fn/templates.html#{[type]}-template"></template>
</div>
</section-->
<!--js/removeable.js,
js/submittable.js,
js/switchable.js,
js/toggleable.js,
js/validateable.js-->
<!-- Build document -->
<script type="module" build-remove>
import '../fn/docs-build.js';
</script>
<!-- Document interactivity -->
<script type="module">
import '../bolt/modules/device.js';
import '../bolt/modules/popable.js';
import '../bolt/modules/toggleable.js';
import '../bolt/modules/locateable.js';
import '../bolt/modules/submittable.js';
import '../bolt/modules/switchable.js';
import '../bolt/modules/fullscreenable.js';
import '../bolt/modules/validateable.js';
import * as dom from './module.js';
Object.assign(window, dom);
</script>
</body>