GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — tilewright/index.html at main · Ax1zz/tilewright

Expand file tree

/

index.html

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
404 lines (382 loc) · 16.3 KB
/

index.html

Copy path

File metadata and controls

404 lines (382 loc) · 16.3 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>TileWright — layer-preserving PDF pattern tiler</title>
<meta name="description" content="Slice a large-format PDF sewing pattern into print-at-home pages without destroying the size layers. Runs entirely in your browser; nothing is uploaded.">
<style>
/* ---------------------------------------------------------------------------
TileWright.
The register here is drafting table, not dashboard: paper-white ground,
graphite ink, one chalk-blue accent, and monospaced numerals because every
number on this screen is a measurement someone will cut fabric against.
No web fonts are required — the app must work offline, from file://.
--------------------------------------------------------------------------- */
:root{
--paper:#FBFAF8; --surface:#FFFFFF; --surface-2:#F5F3EF;
--ink:#16181B; --ink-2:#3D424A; --muted:#767C85;
--line:#E4E0D9; --line-2:#D2CDC3;
--accent:#1D6E8B; --accent-soft:#E8F1F4;
--trim:#C2542F; --good:#2E7D5B;
--shadow:0 1px 2px rgba(20,22,26,.04), 0 8px 24px -12px rgba(20,22,26,.18);
--sans:ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Inter,Roboto,"Helvetica Neue",Arial,sans-serif;
--mono:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
margin:0; background:var(--paper); color:var(--ink);
font-family:var(--sans); font-size:14px; line-height:1.5;
-webkit-font-smoothing:antialiased;
}
button,input,select{font:inherit;color:inherit}
/* ---------- shell ---------- */
.app{display:flex;flex-direction:column;height:100vh;overflow:hidden}
header{
display:flex;align-items:center;gap:16px;
padding:0 22px;height:58px;flex:0 0 58px;
background:var(--surface);border-bottom:1px solid var(--line);
}
.brand{display:flex;align-items:baseline;gap:10px}
.brand h1{
margin:0;font-size:16px;font-weight:650;letter-spacing:-.015em;
}
.brand .mark{
display:inline-grid;place-items:center;width:24px;height:24px;
border:1.5px solid var(--ink);border-radius:3px;margin-right:2px;
position:relative;flex:0 0 24px;align-self:center;
}
.brand .mark::before,.brand .mark::after{
content:"";position:absolute;background:var(--ink);opacity:.55;
}
.brand .mark::before{left:calc(50% - .75px);top:2px;bottom:2px;width:1.5px}
.brand .mark::after{top:calc(50% - .75px);left:2px;right:2px;height:1.5px}
.brand small{color:var(--muted);font-size:12.5px}
header .spacer{flex:1}
header a{
color:var(--muted);text-decoration:none;font-size:12.5px;
border:1px solid var(--line);padding:5px 11px;border-radius:6px;
transition:.15s;
}
header a:hover{color:var(--ink);border-color:var(--line-2);background:var(--surface-2)}
main{display:flex;flex:1;min-height:0}
/* ---------- sidebar ---------- */
.panel{
width:352px;flex:0 0 352px;overflow-y:auto;
background:var(--surface);border-right:1px solid var(--line);
padding:18px 20px 28px;
}
.step{margin-bottom:22px}
.step-head{
display:flex;align-items:center;gap:8px;margin-bottom:10px;
}
.step-num{
width:18px;height:18px;border-radius:50%;flex:0 0 18px;
background:var(--ink);color:#fff;font-size:10.5px;font-weight:600;
display:grid;place-items:center;font-family:var(--mono);
}
.step-head h2{
margin:0;font-size:11.5px;font-weight:650;letter-spacing:.07em;
text-transform:uppercase;color:var(--ink-2);
}
/* drop zone */
.drop{
border:1.5px dashed var(--line-2);border-radius:9px;
padding:22px 16px;text-align:center;cursor:pointer;
background:var(--surface-2);transition:.16s;
}
.drop:hover,.drop.over{border-color:var(--accent);background:var(--accent-soft)}
.drop strong{display:block;font-size:13.5px;font-weight:600;margin-bottom:3px}
.drop span{color:var(--muted);font-size:12px}
.drop input{
/* Visually hidden rather than display:none — a display:none input is
removed from the a11y tree and cannot be focused or driven by tooling. */
position:absolute;width:1px;height:1px;padding:0;margin:-1px;
overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;
}
.trysample{
margin-top:8px;text-align:center;font-size:11.5px;color:var(--muted);
}
.trysample .linkish{font-size:11.5px}
.filecard{
border:1px solid var(--line);border-radius:9px;padding:12px 13px;background:var(--surface);
}
.filecard .name{
font-weight:600;font-size:13px;margin-bottom:8px;
display:flex;flex-direction:column;align-items:flex-start;gap:6px;
/* break long filenames between characters only as a last resort, and never
hyphenate the badge mid-word */
overflow-wrap:anywhere;word-break:normal;line-height:1.35;
}
.filecard .fname{max-width:100%}
.filecard dl{display:grid;grid-template-columns:auto 1fr;gap:3px 12px;margin:0;font-size:12px}
.filecard dt{color:var(--muted)}
.filecard dd{margin:0;font-family:var(--mono);font-size:11.5px}
.badge{
display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:600;
padding:3px 9px;border-radius:20px;letter-spacing:.01em;
white-space:nowrap;flex:0 0 auto;
}
.badge.layers{background:#E7F3EC;color:var(--good)}
.badge.nolayers{background:var(--surface-2);color:var(--muted)}
.linkish{
background:none;border:none;padding:0;color:var(--accent);
font-size:12px;cursor:pointer;text-decoration:underline;text-underline-offset:2px;
}
/* fields */
.row{display:flex;gap:9px}
.row>*{flex:1;min-width:0}
label.f{display:block;margin-bottom:11px}
label.f .lab{
display:block;font-size:11.5px;color:var(--muted);margin-bottom:4px;
letter-spacing:.01em;
}
input[type=number],input[type=text],select{
width:100%;padding:7px 9px;border:1px solid var(--line-2);border-radius:7px;
background:var(--surface);font-family:var(--mono);font-size:12.5px;
transition:.14s;
}
input[type=number]:focus,input[type=text]:focus,select:focus{
outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft);
}
select{font-family:var(--sans);cursor:pointer}
.seg{display:flex;border:1px solid var(--line-2);border-radius:7px;overflow:hidden}
.seg button{
flex:1;padding:6px 4px;background:var(--surface);border:none;cursor:pointer;
font-size:12px;color:var(--muted);border-right:1px solid var(--line);transition:.13s;
}
.seg button:last-child{border-right:none}
.seg button[aria-pressed=true]{background:var(--ink);color:#fff;font-weight:600}
.seg button:hover:not([aria-pressed=true]){background:var(--surface-2);color:var(--ink)}
.checks{display:grid;gap:7px}
.chk{display:flex;align-items:flex-start;gap:8px;cursor:pointer;font-size:12.5px}
.chk input{margin:2px 0 0;accent-color:var(--accent);cursor:pointer;flex:0 0 auto}
.chk .d{color:var(--muted);font-size:11.5px;display:block;line-height:1.35}
/* action */
.go{
width:100%;padding:11px;border:none;border-radius:8px;cursor:pointer;
background:var(--ink);color:#fff;font-weight:600;font-size:13.5px;
transition:.16s;letter-spacing:-.005em;
}
.go:hover:not(:disabled){background:#000;transform:translateY(-1px);box-shadow:var(--shadow)}
.go:disabled{background:var(--line-2);cursor:not-allowed}
.go.done{background:var(--good)}
.hint{margin-top:9px;font-size:11.5px;color:var(--muted);text-align:center;line-height:1.45}
.err{
margin-top:11px;padding:10px 12px;border-radius:8px;font-size:12.5px;
background:#FDF0EC;color:#9B3A1C;border:1px solid #F3D6CB;
}
.warn{
margin-top:9px;padding:9px 11px;border-radius:8px;font-size:11.5px;
background:#FDF8EC;color:#7A5B1E;border:1px solid #EFE3C4;
}
/* ---------- stage ---------- */
.stage{
flex:1;min-width:0;display:flex;flex-direction:column;
/* Gradients first — an opaque paper layer on top hid the drafting grid. */
background-image:
repeating-linear-gradient(0deg,transparent 0 23px,rgba(20,22,26,.045) 23px 24px),
repeating-linear-gradient(90deg,transparent 0 23px,rgba(20,22,26,.045) 23px 24px);
background-color:var(--paper);
position:relative;
}
.stage-inner{flex:1;display:grid;place-items:center;padding:26px;min-height:0;overflow:auto}
.sheet{
position:relative;box-shadow:var(--shadow);background:#fff;
border:1px solid var(--line-2);
}
.sheet canvas{display:block;position:absolute;inset:0;width:100%;height:100%}
.sheet canvas.grid{pointer-events:none}
.empty{
text-align:center;max-width:400px;color:var(--muted);
}
.empty .glyph{
width:78px;height:78px;margin:0 auto 18px;border:2px solid var(--line-2);
border-radius:6px;position:relative;background:#fff;
}
.empty .glyph i{position:absolute;background:var(--line-2)}
.empty .glyph i:nth-child(1){left:33%;top:0;bottom:0;width:2px}
.empty .glyph i:nth-child(2){left:66%;top:0;bottom:0;width:2px}
.empty .glyph i:nth-child(3){top:50%;left:0;right:0;height:2px}
.empty h3{margin:0 0 7px;color:var(--ink);font-size:16px;font-weight:600}
.empty p{margin:0;font-size:13px;line-height:1.55}
/* readout bar */
.readout{
flex:0 0 auto;display:flex;align-items:center;gap:0;
border-top:1px solid var(--line);background:var(--surface);
padding:0 6px;overflow-x:auto;
}
.metric{padding:9px 16px;border-right:1px solid var(--line);white-space:nowrap}
.metric:last-child{border-right:none}
.metric .k{
display:block;font-size:10px;text-transform:uppercase;letter-spacing:.075em;
color:var(--muted);margin-bottom:1px;
}
.metric .v{font-family:var(--mono);font-size:13px;font-weight:600}
.metric .v.ok{color:var(--good)}
.metric .v.dim{color:var(--muted);font-weight:500}
.legend{
position:absolute;right:18px;top:18px;background:rgba(255,255,255,.94);
border:1px solid var(--line);border-radius:8px;padding:9px 11px;
font-size:11px;color:var(--ink-2);backdrop-filter:blur(6px);
box-shadow:var(--shadow);
}
.legend div{display:flex;align-items:center;gap:7px;margin-bottom:4px}
.legend div:last-child{margin-bottom:0}
.legend .sw{width:15px;height:9px;border-radius:2px;flex:0 0 15px}
.spinner{
width:15px;height:15px;border:2px solid rgba(255,255,255,.35);
border-top-color:#fff;border-radius:50%;display:inline-block;
animation:spin .7s linear infinite;vertical-align:-3px;margin-right:7px;
}
@keyframes spin{to{transform:rotate(360deg)}}
.vh{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
@media (max-width:900px){
main{flex-direction:column}
.panel{width:100%;flex:0 0 auto;border-right:none;border-bottom:1px solid var(--line)}
.stage{min-height:340px}
}
</style>
</head>
<body>
<div class="app">
<header>
<div class="brand">
<span class="mark" aria-hidden="true"></span>
<h1>TileWright</h1>
<small>layer-preserving PDF pattern tiler</small>
</div>
<div class="spacer"></div>
<a id="repoLink" href="https://github.com/Ax1zz/tilewright" target="_blank" rel="noopener noreferrer">Source</a>
</header>
<main>
<section class="panel">
<!-- 1 -->
<div class="step">
<div class="step-head"><span class="step-num">1</span><h2>Pattern</h2></div>
<div id="dropzone" class="drop" tabindex="0" role="button" aria-label="Choose a PDF pattern">
<strong>Drop a PDF here</strong>
<span>or click to choose &middot; never uploaded</span>
<input type="file" id="fileInput" accept="application/pdf,.pdf">
</div>
<div class="trysample">
no pattern handy?
<button type="button" class="linkish" id="sampleBtn">try a sample graded bodice</button>
</div>
<div id="fileCard" hidden></div>
</div>
<!-- 2 -->
<div class="step">
<div class="step-head"><span class="step-num">2</span><h2>Paper</h2></div>
<div class="row">
<label class="f" style="flex:1.4">
<span class="lab">Size</span>
<select id="paper">
<option value="A4" selected>A4</option>
<option value="LETTER">US Letter</option>
<option value="A3">A3</option>
<option value="LEGAL">US Legal</option>
<option value="TABLOID">Tabloid</option>
<option value="A2">A2</option>
<option value="A1">A1</option>
<option value="A0">A0 (copyshop)</option>
</select>
</label>
<label class="f">
<span class="lab">Units</span>
<select id="unit">
<option value="mm" selected>mm</option>
<option value="cm">cm</option>
<option value="in">in</option>
</select>
</label>
</div>
<label class="f">
<span class="lab">Orientation</span>
<div class="seg" id="orient">
<button type="button" data-v="portrait" aria-pressed="true">Portrait</button>
<button type="button" data-v="landscape" aria-pressed="false">Landscape</button>
</div>
</label>
</div>
<!-- 3 -->
<div class="step">
<div class="step-head"><span class="step-num">3</span><h2>Fit</h2></div>
<div class="row">
<label class="f">
<span class="lab">Overlap</span>
<input type="number" id="overlap" value="15" min="0" step="1">
</label>
<label class="f">
<span class="lab">Printer margin</span>
<input type="number" id="margin" value="0" min="0" step="1">
</label>
<label class="f">
<span class="lab">Scale %</span>
<input type="number" id="scale" value="100" min="1" max="1000" step="1">
</label>
</div>
</div>
<!-- 4 -->
<div class="step">
<div class="step-head"><span class="step-num">4</span><h2>What to print</h2></div>
<div class="checks">
<label class="chk"><input type="checkbox" id="optCal" checked>
<span>Print-scale check page
<span class="d">A 10&nbsp;cm / 4&nbsp;in square to prove the printer isn't scaling.</span></span></label>
<label class="chk"><input type="checkbox" id="optMap" checked>
<span>Assembly map
<span class="d">Diagram of how the sheets lay out.</span></span></label>
<label class="chk"><input type="checkbox" id="optMarks" checked>
<span>Trim lines &amp; match marks
<span class="d">Cut guides, overlap shading, edge triangles.</span></span></label>
<label class="chk"><input type="checkbox" id="optSkip" checked>
<span>Skip blank sheets
<span class="d">Leave out tiles with no pattern on them.</span></span></label>
</div>
</div>
<button class="go" id="goBtn" disabled>Tile PDF</button>
<div class="hint" id="hint">Choose a pattern to begin.</div>
<div class="err" id="err" hidden></div>
<div class="warn" id="warn" hidden></div>
</section>
<section class="stage">
<div class="stage-inner" id="stageInner">
<div class="empty" id="empty">
<div class="glyph"><i></i><i></i><i></i></div>
<h3>Nothing loaded yet</h3>
<p>Drop a large-format pattern PDF on the left. You'll see the sheet
grid laid over it here before anything is written.</p>
</div>
<div class="sheet" id="sheet" hidden>
<canvas id="pageCanvas"></canvas>
<canvas id="gridCanvas" class="grid"></canvas>
</div>
</div>
<div class="legend" id="legend" hidden>
<div><span class="sw" style="background:#C2542F"></span> trim line</div>
<div><span class="sw" style="background:#EFEAE1"></span> overlap</div>
<div><span class="sw" style="background:#DDE7EB;border:1px solid #9FBCC7"></span> blank, skipped</div>
</div>
<div class="readout" id="readout">
<div class="metric"><span class="k">Sheets</span><span class="v dim" id="mSheets">—</span></div>
<div class="metric"><span class="k">Grid</span><span class="v dim" id="mGrid">—</span></div>
<div class="metric"><span class="k">Pattern size</span><span class="v dim" id="mSize">—</span></div>
<div class="metric"><span class="k">Layers</span><span class="v dim" id="mLayers">—</span></div>
<div class="metric"><span class="k">Output</span><span class="v dim" id="mOut">—</span></div>
</div>
</section>
</main>
</div>
<script src="vendor/pdf-lib.min.js"></script>
<script src="vendor/pdf.min.js"></script>
<script src="src/sample.js"></script>
<script src="src/units.js"></script>
<script src="src/grid.js"></script>
<script src="src/layers.js"></script>
<script src="src/furniture.js"></script>
<script src="src/tiler.js"></script>
<script src="src/ui.js"></script>
</body>
</html>
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.