-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhelp.html
More file actions
357 lines (304 loc) · 17.2 KB
/
help.html
File metadata and controls
357 lines (304 loc) · 17.2 KB
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
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; font-src 'self'; img-src 'self' data: blob:; connect-src 'self'; object-src 'none'; base-uri 'self'; form-action 'none'; frame-ancestors 'none';">
<title>Help - Motif</title>
<meta name="description" content="Learn how to use Motif pattern editor">
<link rel="stylesheet" href="/src/assets/fonts/fonts.css">
<link rel="stylesheet" href="/src/styles/main.css">
<style>
/* Table of contents styling */
.toc {
background: transparent !important;
padding: 0 !important;
margin: 2.5rem 0 !important;
border-left: 3px solid var(--color-primary) !important;
padding-left: 1.5rem !important;
}
.toc h2 {
font-size: 1.5rem !important;
font-weight: 700 !important;
margin: 0 0 1rem 0 !important;
color: var(--color-text-primary);
border: none !important;
}
.toc ul {
list-style: none !important;
padding: 0 !important;
margin: 0 !important;
}
.toc li {
margin: 0 0 0.6rem 0 !important;
}
.toc a {
text-decoration: none;
color: var(--color-text);
font-size: 1rem;
font-weight: 500;
transition: color 0.2s ease;
display: inline-block;
}
.toc a:hover {
color: var(--color-primary);
}
/* Back to contents link */
.back-to-contents {
font-size: 0.875rem;
color: var(--color-text-secondary);
text-decoration: none;
margin-left: 1rem;
transition: color 0.2s ease;
}
.back-to-contents:hover {
color: var(--color-primary);
}
/* Input mode toggle */
.input-mode-toggle {
display: flex;
gap: 0;
margin: 1.5rem 0;
border: 1px solid var(--color-border);
border-radius: 6px;
overflow: hidden;
width: fit-content;
}
.input-mode-btn {
padding: 0.5rem 1.5rem;
background: var(--color-bg);
border: none;
cursor: pointer;
font-size: 0.9rem;
font-weight: 500;
color: var(--color-text);
transition: all 0.2s ease;
border-right: 1px solid var(--color-border);
}
.input-mode-btn:last-child {
border-right: none;
}
.input-mode-btn:hover {
background: var(--color-bg-secondary, #f5f5f5);
}
.input-mode-btn.active {
background: var(--color-primary);
color: white;
}
.input-mode-btn:focus {
outline: 2px solid var(--color-primary);
outline-offset: -2px;
z-index: 1;
}
/* Content visibility based on input mode */
body[data-input-mode="desktop"] .touch-only {
display: none;
}
body[data-input-mode="touch"] .desktop-only {
display: none;
}
/* .both is always visible */
/* UI element references */
.ui-element {
font-weight: 600;
color: var(--color-primary);
white-space: nowrap;
}
</style>
</head>
<body>
<div class="content-page">
<a href="/" class="back-link">← Back to Motif</a>
<h1>Help</h1>
<div class="toc">
<h2>Contents</h2>
<ul>
<li><a href="#pattern">Pattern</a></li>
<li><a href="#preview">Preview</a></li>
<li><a href="#colours">Colours</a></li>
<li><a href="#undo">Undo and redo</a></li>
<li><a href="#download">Download</a></li>
<li><a href="#settings">Settings</a></li>
<li class="desktop-only"><a href="#shortcuts">Keyboard shortcuts</a></li>
</ul>
</div>
<div class="input-mode-toggle" role="tablist" aria-label="Input mode selection">
<button class="input-mode-btn" data-mode="desktop" role="tab" aria-selected="false" aria-controls="help-content">Desktop</button>
<button class="input-mode-btn" data-mode="touch" role="tab" aria-selected="false" aria-controls="help-content">Touch</button>
</div>
<h2 id="pattern">Pattern <a href="#" class="back-to-contents">↑</a></h2>
<p class="both">Draw a single repeat of your pattern—the preview will show how it tiles.</p>
<h3>Paint</h3>
<p class="desktop-only">Click a cell to paint it with the active pattern colour. Click and drag to paint multiple cells at once.</p>
<p class="touch-only">Tap a cell to paint it with the active colour.</p>
<h3>Erase</h3>
<p class="desktop-only">Click a painted cell to toggle between the background colour and the active pattern colour.</p>
<p class="desktop-only">Hold <kbd>Shift</kbd> and click cells to paint with the background colour instead of the active colour.</p>
<p class="desktop-only">Click the × below the pattern to clear the entire pattern to the background colour.</p>
<p class="touch-only">Tap a painted cell to toggle between background colour and the active pattern colour.</p>
<p class="touch-only">Tap the × below the pattern to clear the entire pattern to the background colour.</p>
<h3>Resize</h3>
<div class="desktop-only">
<p>To resize the pattern grid, you can:</p>
<ul>
<li>Click the arrows above the pattern grid to add a row or column. Hold <kbd>Shift</kbd> and click to remove.</li>
<li>Enter the number of rows and columns desired.</li>
<li>Drag the edges of the pattern grid to shrink and enlarge it.</li>
</ul>
</div>
<div class="touch-only">
<p>To resize the pattern grid, you can:</p>
<ul>
<li>Tap the arrows above the pattern grid to add a row or column. Long-press and tap to remove.</li>
<li>Enter the number of rows and columns desired.</li>
<li>Drag the edges of the pattern grid to shrink and enlarge it.</li>
</ul>
</div>
<h2 id="preview">Preview <a href="#" class="back-to-contents">↑</a></h2>
<p class="both">The preview shows several repeats of your pattern, so you can see how your it connects when repeating and catch problems that only appear when the pattern is tiled.</p>
<h3>Adjusting preview repeats</h3>
<p class="both">You can change how many times the pattern repeats horizontally and vertically by entering the desired number of repeats.</p>
<p class="both">The maximum number of repeats depends on your pattern's largest dimension to keep the preview running smoothly:</p>
<table class="both">
<thead>
<tr>
<th>Largest Dimension</th>
<th>Maximum Repeats</th>
</tr>
</thead>
<tbody>
<tr>
<td>15 and smaller</td>
<td>10×10</td>
</tr>
<tr>
<td>16 to 19</td>
<td>8×8</td>
</tr>
<tr>
<td>20 to 26</td>
<td>6×6</td>
</tr>
<tr>
<td>27 to 31</td>
<td>5×5</td>
</tr>
<tr>
<td>32 to 39</td>
<td>4×4</td>
</tr>
<tr>
<td>40 to 52</td>
<td>3×3</td>
</tr>
<tr>
<td>53 to 79</td>
<td>2×2</td>
</tr>
<tr>
<td>80 and larger</td>
<td>1×1</td>
</tr>
</tbody>
</table>
<p class="both">For example, a 2×20 pattern has a largest dimension of 20, so it allows up to 6×6 repeats.</p>
<p class="both">When you resize your pattern larger, the preview repeats will automatically reduce if needed. A status message appears when you're near or at the maximum for your pattern size.</p>
<h2 id="colours">Colours <a href="#" class="back-to-contents">↑</a></h2>
<p class="both">The pattern colours are displayed in circles at the top of the screen. The active pattern colour is indicated by a larger circle. Motif keeps track of what cells use what pattern colour, so you can easily change them all at once and try new combinations.</p>
<p class="both">If there are more pattern colours than can be displayed next to each other, an overflow menu will show the remaining colours.</p>
<h3>Changing and deleting pattern colours</h3>
<p class="desktop-only">Click any pattern colour to select, edit or delete it.</p>
<p class="desktop-only">You can also directly select a pattern colour using the keyboard: <kbd>1</kbd>-<kbd>9</kbd>, <kbd>0</kbd> for pattern colours 1-10, and the same with <kbd>Shift</kbd> for pattern colour 11-20.
<p class="touch-only">Tap any pattern colour to select, edit or delete it.</p>
<h3>Adding pattern colours</h3>
<p class="desktop-only">Click the + button to add a new pattern colour. You can add up to 20 colours per pattern.</p>
<p class="touch-only">Tap the + button to add a new pattern colour. You can add up to 20 colours per pattern.</p>
<h3>Swapping colours</h3>
<p class="both">Drag one pattern colour onto another to merge their positions and remove the target colour. You can also drag pattern colours to the background colour to merge them.</p>
<h3>Background colour</h3>
<p class="both">This is the default colour for cells. It is displayed in a square.</p>
<p class="desktop-only">Click a painted cell to toggle between the background colour and the active pattern colour. Hold <kbd>Shift</kbd> and click cells to turn them into background.</p>
<p class="touch-only">Tap a painted cell to toggle between the background colour and the active pattern colour. Long-press the background colour and then tap cells to turn them into background.</p>
<h3>Palette</h3>
<p class="both">The palette button shows you a small preview of the selected palette. Palettes are curated selections of colours you can easily apply to your pattern colours.</p>
<p class="desktop-only">Click the palette button to see the current palette or select another one.</p>
<p class="touch-only">Tap the palette button to see the current palette or select another one.</p>
<p class="desktop-only">Click a palette colour to set it as the active pattern colour.</p>
<p class="desktop-only">Hold <kbd>Shift</kbd> and click a palette colour to set it as the background colour.</p>
<p class="touch-only">Tap a palette colour to set it as the active pattern colour.</p>
<p class="touch-only">Long-press a palette colour to set it as the background colour.</p>
<p class="desktop-only">Click <span class="ui-element">Load palette</span> to apply the current palette to the pattern colours, replacing them.</p>
<p class="touch-only">Tap <span class="ui-element">Load palette</span> to apply the current palette to the pattern colours, replacing them.</p>
<p class="desktop-only">Click <span class="ui-element">Custom</span> to edit your own palette. Click a colour in the custom palette to select, edit or delete it. Click the plus button to add a new colour to the custom palette.</p>
<p class="touch-only">Tap <span class="ui-element">Custom</span> to edit your own palette. Tap a colour in the custom palette to select, edit or delete it. Tap the plus button to add a new colour to the custom palette.</p>
<h2 id="undo">Undo and Redo <a href="#" class="back-to-contents">↑</a></h2>
<p class="desktop-only">Click the curved arrow buttons below the canvas to undo and redo your changes.</p>
<p class="desktop-only">You can also use <kbd>Cmd/Ctrl</kbd> + <kbd>Z</kbd> to undo and <kbd>Cmd/Ctrl</kbd> + <kbd>Y</kbd> to redo.</p>
<p class="touch-only">Tap the curved arrow buttons below the canvas to undo and redo your changes.</p>
<h2 id="download">Download<a href="#" class="back-to-contents">↑</a></h2>
<p class="desktop-only">Click the <span class="ui-element">Download</span> button below the pattern to open the download dialogue.</p>
<p class="touch-only">Tap the <span class="ui-element">Download</span> button below the pattern to open the download dialogue.</p>
<h3>Download options</h3>
<ul class="both">
<li><strong>Source:</strong>
<ul>
<li><span class="ui-element">Pattern</span>: Single repeat of the pattern as shown in the pattern grid.</li>
<li><span class="ui-element">Pattern repeat with surroundings</span>: One repeat plus your selection of neighbouring rows or columns.</li>
<li><span class="ui-element">Preview</span>: Multiple tiled repeats as shown in the preview grid.</li>
</ul>
</li>
<li><strong>Format:</strong> Choose between <span class="ui-element">PNG</span> or <span class="ui-element">SVG</span>.</li>
<li><strong>Include row counts:</strong> Add row count numbers to the right side of your downloaded image.</li>
</ul>
<h3>Pattern repeat with surroundings</h3>
<p class="both">When you select <span class="ui-element">Pattern repeat with surroundings</span>, you can specify how many neighbouring rows and columns to include.</p>
<p class="both">For smaller patterns you'll see a visual selection mode where you can drag the edges on the preview to choose your surrounding area.</p>
<p class="both">For larger patterns, use the form inputs to enter the number of row/columns you want to include next to the pattern repeat.</p>
<h2 id="settings">Settings <a href="#" class="back-to-contents">↑</a></h2>
<p class="both">Access these options in the settings menu (☰):</p>
<h3>Import/Export</h3>
<p class="desktop-only">Click <span class="ui-element">Import JSON</span> to load a previously saved Motif JSON file. The JSON file contains your pattern dimensions, cell aspect ratio, colour palette, pattern data, and preview settings in a human-readable format that can be manipulated programmatically.</p>
<p class="desktop-only">Click <span class="ui-element">Export JSON</span> to create a JSON file you can import later.</p>
<p class="touch-only">Tap <span class="ui-element">Import JSON</span> to load a previously saved JSON file. The JSON file contains your pattern dimensions, cell aspect ratio, colour palette, pattern data, and preview settings in a human-readable format that can be manipulated programmatically.</p>
<p class="touch-only">Tap <span class="ui-element">Export JSON</span> to create a JSON file you can import later.</p>
<h3>Cell aspect ratio</h3>
<p class="desktop-only">Click the drop down to choose from preset ratios like "Square 1:1" or "Knit stitch 4:3". To set a custom aspect ratio, click <span class="ui-element">Custom</span> and enter a decimal (e.g. 1.25) or a ratio (e.g. 3:4). You can also drag the slider.</p>
<p class="touch-only">Tap the drop down to choose from preset ratios like "Square 1:1" or "Knit stitch 4:3". To set a custom aspect ratio, tap <span class="ui-element">Custom</span> and enter a decimal (e.g. 1.25) or a ratio (e.g. 3:4). You can also drag the slider.</p>
<div class="desktop-only">
<h2 id="shortcuts">Keyboard Shortcuts <a href="#" class="back-to-contents">↑</a></h2>
<table>
<thead>
<tr>
<th>Action</th>
<th>Shortcut</th>
</tr>
</thead>
<tbody>
<tr>
<td>Undo</td>
<td><kbd>Cmd/Ctrl</kbd> + <kbd>Z</kbd></td>
</tr>
<tr>
<td>Redo</td>
<td><kbd>Cmd/Ctrl</kbd> + <kbd>Y</kbd></td>
</tr>
<tr>
<td>Clear canvas</td>
<td><kbd>Delete</kbd> or <kbd>Backspace</kbd></td>
</tr>
<tr>
<td>Select pattern colours 1-10</td>
<td><kbd>1</kbd>-<kbd>9</kbd>, <kbd>0</kbd></td>
</tr>
<tr>
<td>Select pattern colours 11-20</td>
<td><kbd>Shift</kbd> + <kbd>1</kbd>-<kbd>9</kbd>, <kbd>0</kbd></td>
</tr>
</tbody>
</table>
</div>
<p style="margin-top: 2rem;"><a href="/">← Back to Motif</a></p>
</div>
<script type="module" src="/help.js"></script>
</body>
</html>