Skip to content

Commit 5ebdda1

Browse files
committed
Better API description
1 parent c894960 commit 5ebdda1

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

docs/api.html

+7-6
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
<div class="main-content">
7474
<div class="container bloc">
7575
<h1>API</h1>
76-
<h2>Options</h2>
76+
<h2>options</h2>
7777
<p>All the global options available.</p>
7878
<table class="api-list">
7979
<thead>
@@ -99,7 +99,8 @@ <h2>Options</h2>
9999
<td>false</td>
100100
<td>String</td>
101101
<td>
102-
This is the name used to add a dark / light class on the body depending on the gradient lightness,
102+
This is the prefix used for the dark / light class name added
103+
on the <span class="snippet">options.elToSetClassOn</span> element depending on the average gradient lightness,
103104
the class will be updated during the animation.
104105
If you don't set a name, the class won't be set.
105106
</td>
@@ -110,7 +111,7 @@ <h2>Options</h2>
110111
<td>String</td>
111112
<td>
112113
The element to set the dark / light class on (e.g. <span class="snippet">'#canvas-wrapper'</span>).
113-
Is useful only if you set a <span class="snippet">name</span>.
114+
Is useful only if you set a <span class="snippet">options.name</span>.
114115
</td>
115116
</tr>
116117
<tr>
@@ -161,7 +162,7 @@ <h2>Options</h2>
161162
</table>
162163
</div>
163164
<div class="container bloc">
164-
<h2>States</h2>
165+
<h2>options.states</h2>
165166
<p>
166167
All the options available to customize the states and
167168
the different gradients.<br>
@@ -274,8 +275,8 @@ <h2>Methods</h2>
274275
granimInstance.clear();</code></pre>
275276
</div>
276277
<div class="container bloc">
277-
<h2>Default configuration</h2>
278-
<p>Default configuration with two states and callbacks set.</p>
278+
<h2>Basic configuration</h2>
279+
<p>Basic configuration with two states and callbacks set.</p>
279280
<pre><code class="language-js">var granimInstance = new Granim({
280281
element: '',
281282
name: 'granim',

docs/assets/pug/api.pug

+7-6
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ html(lang="en")
3636
.main-content
3737
.container.bloc
3838
h1 API
39-
h2 Options
39+
h2 options
4040
p All the global options available.
4141
table.api-list
4242
thead
@@ -58,7 +58,8 @@ html(lang="en")
5858
td false
5959
td String
6060
td
61-
| This is the name used to add a dark / light class on the body depending on the gradient lightness,
61+
| This is the prefix used for the dark / light class name added
62+
| on the <span class="snippet">options.elToSetClassOn</span> element depending on the average gradient lightness,
6263
| the class will be updated during the animation.
6364
| If you don't set a name, the class won't be set.
6465
tr
@@ -67,7 +68,7 @@ html(lang="en")
6768
td String
6869
td
6970
| The element to set the dark / light class on (e.g. <span class="snippet">'#canvas-wrapper'</span>).
70-
| Is useful only if you set a <span class="snippet">name</span>.
71+
| Is useful only if you set a <span class="snippet">options.name</span>.
7172
tr
7273
td direction
7374
td 'diagonal'
@@ -109,7 +110,7 @@ html(lang="en")
109110

110111

111112
.container.bloc
112-
h2 States
113+
h2 options.states
113114
p
114115
| All the options available to customize the states and
115116
| the different gradients.<br>
@@ -211,8 +212,8 @@ html(lang="en")
211212
| granimInstance.clear();
212213

213214
.container.bloc
214-
h2 Default configuration
215-
p Default configuration with two states and callbacks set.
215+
h2 Basic configuration
216+
p Basic configuration with two states and callbacks set.
216217
pre
217218
code.language-js
218219
| var granimInstance = new Granim({

0 commit comments

Comments
 (0)