-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
1992 lines (1789 loc) · 81.1 KB
/
Copy pathindex.html
File metadata and controls
1992 lines (1789 loc) · 81.1 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
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
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Carpenter — Construction Carpentry Resources & Tools</title>
<meta name="description" content="An interactive construction carpentry resource and tool suite: framing, joinery, calculators, span tables, and a live wall framing visualizer." />
<meta name="author" content="GuildMasterDev" />
<meta name="theme-color" content="#d4a574" />
<meta name="color-scheme" content="dark" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="apple-mobile-web-app-title" content="Carpenter" />
<link rel="manifest" href="manifest.json" />
<link rel="apple-touch-icon" href="icons/icon-192.png" />
<meta property="og:type" content="website" />
<meta property="og:title" content="Carpenter — Construction Carpentry Resources & Tools" />
<meta property="og:description" content="Reference guides, real-world calculators, and a live wall-framing visualizer. Single-page, no dependencies." />
<meta property="og:url" content="https://guildmasterdev.github.io/Carpenter" />
<meta property="og:image" content="https://guildmasterdev.github.io/Carpenter/og-image.svg" />
<meta property="og:site_name" content="Carpenter" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="Carpenter — Construction Carpentry Resources & Tools" />
<meta name="twitter:description" content="Reference guides, real-world calculators, and a live wall-framing visualizer." />
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'><rect width='64' height='64' rx='10' fill='%230a0a0f'/><g stroke='%23d4a574' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' fill='none'><path d='M14 40 L40 14'/><path d='M40 14 L50 24 L24 50 L14 40 Z' fill='%23d4a574' fill-opacity='0.25'/><path d='M16 42 L22 48' stroke-width='2'/><path d='M20 38 L26 44' stroke-width='2'/><path d='M24 34 L30 40' stroke-width='2'/></g></svg>" />
<style>
:root {
--bg: #0a0a0f;
--bg-elev: #14141c;
--bg-elev-2: #1d1d28;
--border: #2a2a38;
--text: #e8e4dc;
--text-dim: #9a9486;
--accent: #d4a574;
--accent-bright: #e8b988;
--accent-dim: #8d6f4d;
--good: #7fb069;
--warn: #e0a458;
--bad: #c45b5b;
--plate: #8b5a2b;
--stud: #d4a574;
--king: #7fb069;
--trimmer: #5b9bd5;
--header-color: #c45b5b;
--cripple: #888;
--sill: #b58860;
--shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
--radius: 8px;
--radius-sm: 4px;
}
* { box-sizing: border-box; }
html, body {
margin: 0;
padding: 0;
background: var(--bg);
color: var(--text);
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
line-height: 1.55;
min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-bright); text-decoration: underline; }
header.site-header {
padding: 32px 24px 20px;
text-align: center;
border-bottom: 1px solid var(--border);
background: linear-gradient(180deg, #15151f 0%, #0a0a0f 100%);
}
header.site-header h1 {
margin: 0 0 6px;
font-size: 2.4rem;
letter-spacing: 0.5px;
color: var(--accent);
font-weight: 700;
}
header.site-header .subtitle {
margin: 0;
color: var(--text-dim);
font-size: 1.05rem;
letter-spacing: 0.3px;
}
nav.tabs {
display: flex;
justify-content: center;
gap: 4px;
padding: 16px 12px 0;
flex-wrap: wrap;
border-bottom: 1px solid var(--border);
background: var(--bg);
position: sticky;
top: 0;
z-index: 50;
}
nav.tabs button {
background: transparent;
border: none;
color: var(--text-dim);
padding: 12px 20px;
font-size: 0.98rem;
font-weight: 500;
cursor: pointer;
border-bottom: 3px solid transparent;
border-radius: var(--radius-sm) var(--radius-sm) 0 0;
transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
nav.tabs button:hover {
color: var(--text);
background: rgba(212, 165, 116, 0.06);
}
nav.tabs button.active {
color: var(--accent);
border-bottom-color: var(--accent);
}
main {
max-width: 1200px;
margin: 0 auto;
padding: 28px 20px 60px;
}
section.tab-panel {
display: none;
animation: fadeIn 0.25s ease;
}
section.tab-panel.active { display: block; }
@keyframes fadeIn {
from { opacity: 0; transform: translateY(4px); }
to { opacity: 1; transform: translateY(0); }
}
h2.section-title {
margin: 8px 0 6px;
font-size: 1.6rem;
color: var(--text);
border-bottom: 1px solid var(--border);
padding-bottom: 8px;
}
p.section-blurb {
margin: 0 0 24px;
color: var(--text-dim);
max-width: 720px;
}
.category {
margin-bottom: 32px;
}
.category h3 {
margin: 0 0 12px;
color: var(--accent);
font-size: 1.2rem;
letter-spacing: 0.4px;
}
.card-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
gap: 14px;
}
.card {
background: var(--bg-elev);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 16px;
display: flex;
flex-direction: column;
transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover {
border-color: var(--accent-dim);
transform: translateY(-1px);
}
.card .icon {
font-size: 1.6rem;
margin-bottom: 6px;
}
.card h4 {
margin: 0 0 6px;
font-size: 1.05rem;
color: var(--text);
}
.card p {
margin: 0 0 12px;
font-size: 0.92rem;
color: var(--text-dim);
flex: 1;
}
.card .learn {
align-self: flex-start;
font-size: 0.88rem;
font-weight: 500;
}
/* Calculators */
.calc {
background: var(--bg-elev);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 20px;
margin-bottom: 22px;
}
.calc h3 {
margin: 0 0 4px;
color: var(--accent);
font-size: 1.2rem;
}
.calc .desc {
margin: 0 0 16px;
color: var(--text-dim);
font-size: 0.92rem;
}
.calc-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 18px;
}
@media (max-width: 720px) {
.calc-grid { grid-template-columns: 1fr; }
}
.input-group {
display: flex;
flex-direction: column;
gap: 12px;
}
.field {
display: flex;
flex-direction: column;
gap: 4px;
}
.field label {
font-size: 0.85rem;
color: var(--text-dim);
font-weight: 500;
}
.field input,
.field select {
background: var(--bg);
border: 1px solid var(--border);
color: var(--text);
padding: 8px 10px;
border-radius: var(--radius-sm);
font-size: 0.95rem;
font-family: inherit;
}
.field input:focus,
.field select:focus {
outline: none;
border-color: var(--accent);
}
.output {
background: var(--bg);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
padding: 14px 16px;
position: relative;
}
.output .out-line {
display: flex;
justify-content: space-between;
padding: 4px 0;
font-size: 0.95rem;
border-bottom: 1px dashed var(--border);
}
.output .out-line:last-child { border-bottom: none; }
.output .out-line .lbl { color: var(--text-dim); }
.output .out-line .val { color: var(--accent-bright); font-weight: 600; font-variant-numeric: tabular-nums; }
.output .breakdown {
margin-top: 10px;
padding-top: 10px;
border-top: 1px solid var(--border);
font-size: 0.82rem;
color: var(--text-dim);
line-height: 1.6;
}
.copy-btn {
background: var(--bg-elev-2);
border: 1px solid var(--border);
color: var(--text-dim);
padding: 5px 12px;
border-radius: var(--radius-sm);
font-size: 0.82rem;
cursor: pointer;
transition: all 0.15s ease;
}
.copy-btn:hover {
color: var(--accent);
border-color: var(--accent-dim);
}
.copy-btn.copied { color: var(--good); border-color: var(--good); }
.copy-row {
display: flex;
justify-content: flex-end;
margin-top: 10px;
}
/* Materials list keeps the floating button — its content is monospace text */
.materials-list .copy-btn {
position: absolute;
top: 8px;
right: 8px;
}
.badge {
display: inline-block;
padding: 2px 8px;
border-radius: 999px;
font-size: 0.78rem;
font-weight: 600;
margin-left: 8px;
}
.badge.ok { background: rgba(127, 176, 105, 0.18); color: var(--good); }
.badge.bad { background: rgba(196, 91, 91, 0.18); color: var(--bad); }
.badge.warn { background: rgba(224, 164, 88, 0.18); color: var(--warn); }
.disclaimer {
margin-top: 12px;
padding: 10px 12px;
background: rgba(224, 164, 88, 0.08);
border-left: 3px solid var(--warn);
border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
font-size: 0.85rem;
color: var(--text-dim);
}
.calc-svg {
width: 100%;
height: 220px;
background: var(--bg);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
margin-top: 10px;
}
/* Reference tables */
.ref-section {
background: var(--bg-elev);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 20px;
margin-bottom: 22px;
}
.ref-section h3 {
margin: 0 0 4px;
color: var(--accent);
font-size: 1.2rem;
}
.ref-section .desc {
margin: 0 0 14px;
color: var(--text-dim);
font-size: 0.92rem;
}
table.ref-table {
width: 100%;
border-collapse: collapse;
font-size: 0.92rem;
}
table.ref-table th, table.ref-table td {
text-align: left;
padding: 10px 12px;
border-bottom: 1px solid var(--border);
}
table.ref-table th {
color: var(--accent);
font-weight: 600;
background: var(--bg);
position: sticky;
top: 0;
}
table.ref-table tr:hover td { background: rgba(212, 165, 116, 0.04); }
table.ref-table td.num { font-variant-numeric: tabular-nums; text-align: right; }
/* Demo */
.demo-controls {
background: var(--bg-elev);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 18px;
margin-bottom: 18px;
}
.demo-controls .grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
gap: 14px;
}
.demo-canvas-wrap {
background: var(--bg-elev);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 16px;
overflow-x: auto;
}
#framing-svg {
width: 100%;
min-height: 360px;
display: block;
background: #f4ecd8;
border-radius: var(--radius-sm);
}
.legend {
display: flex;
flex-wrap: wrap;
gap: 12px;
margin-top: 14px;
font-size: 0.85rem;
}
.legend .swatch {
display: inline-flex;
align-items: center;
gap: 6px;
color: var(--text-dim);
}
.legend .swatch span.box {
width: 14px; height: 14px;
border-radius: 3px;
border: 1px solid rgba(0,0,0,0.4);
display: inline-block;
}
.tooltip {
position: fixed;
pointer-events: none;
background: #15151f;
color: var(--text);
border: 1px solid var(--accent-dim);
padding: 6px 10px;
border-radius: var(--radius-sm);
font-size: 0.85rem;
z-index: 100;
max-width: 240px;
box-shadow: var(--shadow);
opacity: 0;
transition: opacity 0.1s ease;
}
.tooltip.show { opacity: 1; }
.btn {
background: var(--accent);
color: #1a1208;
border: none;
padding: 9px 16px;
border-radius: var(--radius-sm);
font-size: 0.95rem;
font-weight: 600;
cursor: pointer;
transition: background 0.15s ease;
}
.btn:hover { background: var(--accent-bright); }
.btn.ghost {
background: transparent;
color: var(--accent);
border: 1px solid var(--accent-dim);
}
.btn.ghost:hover {
background: rgba(212, 165, 116, 0.08);
color: var(--accent-bright);
}
.materials-list {
display: none;
background: var(--bg);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
padding: 14px;
margin-top: 14px;
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
font-size: 0.88rem;
white-space: pre-wrap;
color: var(--text);
position: relative;
}
.materials-list.show { display: block; }
.openings-table {
margin-top: 16px;
width: 100%;
border-collapse: collapse;
font-size: 0.88rem;
}
.openings-table th, .openings-table td {
padding: 6px 8px;
border-bottom: 1px solid var(--border);
text-align: left;
}
.openings-table th {
color: var(--text-dim);
font-weight: 500;
font-size: 0.78rem;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.openings-table input, .openings-table select {
background: var(--bg);
border: 1px solid var(--border);
color: var(--text);
padding: 4px 6px;
border-radius: var(--radius-sm);
font-size: 0.88rem;
width: 100%;
font-family: inherit;
}
.openings-table input:focus, .openings-table select:focus {
outline: none;
border-color: var(--accent);
}
.openings-table .col-pos { width: 16%; }
.openings-table .col-w { width: 14%; }
.openings-table .col-h { width: 14%; }
.openings-table .col-sill { width: 14%; }
.openings-table .col-type { width: 18%; }
.openings-table .col-del { width: 8%; text-align: right; }
.icon-btn {
background: transparent;
border: 1px solid var(--border);
color: var(--text-dim);
width: 26px; height: 26px;
border-radius: var(--radius-sm);
cursor: pointer;
font-size: 0.95rem;
line-height: 1;
transition: all 0.15s ease;
}
.icon-btn:hover { color: var(--bad); border-color: var(--bad); }
.icon-btn.add:hover { color: var(--good); border-color: var(--good); }
.demo-toolbar {
display: flex;
gap: 10px;
margin-top: 14px;
flex-wrap: wrap;
}
/* SVG framing member styles */
#framing-svg .fm-plate { fill: #8b5a2b; stroke: #5a3a1c; stroke-width: 0.4; }
#framing-svg .fm-stud { fill: #d4a574; stroke: #8d6f4d; stroke-width: 0.3; }
#framing-svg .fm-king { fill: #7fb069; stroke: #4f7a3f; stroke-width: 0.3; }
#framing-svg .fm-trimmer { fill: #5b9bd5; stroke: #2f6293; stroke-width: 0.3; }
#framing-svg .fm-header { fill: #c45b5b; stroke: #7a2e2e; stroke-width: 0.4; }
#framing-svg .fm-cripple { fill: #888; stroke: #555; stroke-width: 0.3; }
#framing-svg .fm-sill { fill: #b58860; stroke: #6e4f31; stroke-width: 0.3; }
#framing-svg .fm-opening { fill: rgba(255,255,255,0.55); stroke: #444; stroke-width: 0.3; stroke-dasharray: 1,1; }
#framing-svg rect { transition: filter 0.1s ease; }
#framing-svg rect.fm:hover { filter: brightness(1.25); cursor: crosshair; }
#framing-svg .dim-line { stroke: #444; stroke-width: 0.3; }
#framing-svg .dim-text { fill: #333; font-size: 6px; font-family: ui-monospace, Menlo, monospace; }
#framing-svg .opening-label { fill: #333; font-size: 6px; font-family: ui-monospace, Menlo, monospace; text-anchor: middle; }
footer.site-footer {
text-align: center;
padding: 24px 16px;
color: var(--text-dim);
font-size: 0.88rem;
border-top: 1px solid var(--border);
margin-top: 30px;
}
footer.site-footer .author { color: var(--accent); }
/* Print */
@media print {
body { background: #fff; color: #000; }
nav.tabs, header.site-header, footer.site-footer, .copy-btn, .btn { display: none !important; }
section.tab-panel { display: block !important; page-break-after: always; }
.card, .calc, .ref-section, .demo-canvas-wrap, .demo-controls { background: #fff; color: #000; border: 1px solid #ccc; }
.out-line .val, .calc h3, .ref-section h3, .category h3 { color: #000 !important; }
a { color: #000; text-decoration: underline; }
table.ref-table th { background: #eee; color: #000; }
#framing-svg { background: #fff; }
}
</style>
</head>
<body>
<header class="site-header">
<h1>🪚 Carpenter</h1>
<p class="subtitle">Construction Carpentry Resources & Tools</p>
</header>
<nav class="tabs" role="tablist">
<button class="tab-btn active" data-tab="resources" role="tab">Resources</button>
<button class="tab-btn" data-tab="calculators" role="tab">Calculators</button>
<button class="tab-btn" data-tab="reference" role="tab">Reference</button>
<button class="tab-btn" data-tab="demo" role="tab">Demo</button>
</nav>
<main>
<!-- ============ RESOURCES TAB ============ -->
<section class="tab-panel active" id="tab-resources">
<h2 class="section-title">Resources</h2>
<p class="section-blurb">A curated reference library for construction carpentry. Each card links out to a trusted source — Fine Homebuilding, JLC, Family Handyman, and others.</p>
<div class="category">
<h3>Framing</h3>
<div class="card-grid">
<div class="card">
<div class="icon">🧱</div>
<h4>Wall Framing Basics</h4>
<p>Top & bottom plates, studs at 16" or 24" OC, double top plate, blocking — the anatomy of a stud wall.</p>
<a class="learn" href="https://www.finehomebuilding.com/project-guides/framing/framing-walls" target="_blank" rel="noopener">Fine Homebuilding →</a>
</div>
<div class="card">
<div class="icon">📏</div>
<h4>Header Sizing</h4>
<p>Sizing rough-opening headers from span and load. Built-up 2x with plywood spacers vs engineered LVL.</p>
<a class="learn" href="https://www.finehomebuilding.com/2017/10/06/sizing-engineered-headers-and-beams" target="_blank" rel="noopener">Fine Homebuilding →</a>
</div>
<div class="card">
<div class="icon">🏗️</div>
<h4>Load-Bearing Walls</h4>
<p>How to identify load-bearing walls before you cut. Look at joist direction, foundation plan, and ridge alignment.</p>
<a class="learn" href="https://www.familyhandyman.com/article/how-to-tell-if-a-wall-is-load-bearing/" target="_blank" rel="noopener">Family Handyman →</a>
</div>
<div class="card">
<div class="icon">🪜</div>
<h4>Balloon vs Platform</h4>
<p>Why platform framing replaced balloon framing — fire-stopping, lift-ability, lumber length, and modern practice.</p>
<a class="learn" href="https://www.thisoldhouse.com/framing/21015050/all-about-house-framing" target="_blank" rel="noopener">This Old House →</a>
</div>
</div>
</div>
<div class="category">
<h3>Joinery</h3>
<div class="card-grid">
<div class="card">
<div class="icon">🔗</div>
<h4>Common Joints</h4>
<p>Butt, lap, dado, rabbet, mortise & tenon, dovetail. Quick visual catalog of woodworking joints and uses.</p>
<a class="learn" href="https://www.finewoodworking.com/2014/07/15/the-essential-joinery-illustrated" target="_blank" rel="noopener">Fine Woodworking →</a>
</div>
<div class="card">
<div class="icon">🪵</div>
<h4>Mortise & Tenon</h4>
<p>The classic frame joint — proportions, glue surface, and when to pin. Strong in compression and shear.</p>
<a class="learn" href="https://www.popularwoodworking.com/techniques/mortise-tenon-joints-the-basics/" target="_blank" rel="noopener">Popular Woodworking →</a>
</div>
<div class="card">
<div class="icon">🦅</div>
<h4>Dovetails</h4>
<p>Through, half-blind, and sliding dovetails — the strongest mechanical joint for resisting tension.</p>
<a class="learn" href="https://www.finewoodworking.com/2010/06/24/3-essential-dovetail-tips" target="_blank" rel="noopener">Fine Woodworking →</a>
</div>
<div class="card">
<div class="icon">🔩</div>
<h4>Pocket Screws</h4>
<p>Quick, strong joinery for cabinetry and face frames. Hole size and screw length per material thickness.</p>
<a class="learn" href="https://www.kregtool.com/learn/pocket-hole-joinery-101/" target="_blank" rel="noopener">Kreg Tool →</a>
</div>
<div class="card">
<div class="icon">⚖️</div>
<h4>Joint Strength</h4>
<p>Comparative strength testing of common joints — what actually fails first under load and why.</p>
<a class="learn" href="https://www.finewoodworking.com/2007/08/22/which-joint-is-the-strongest" target="_blank" rel="noopener">Fine Woodworking →</a>
</div>
</div>
</div>
<div class="category">
<h3>Roofing</h3>
<div class="card-grid">
<div class="card">
<div class="icon">📐</div>
<h4>Rafter Layout</h4>
<p>Laying out common rafters from rise/run, plumb cut, seat cut, and tail. Use a framing square or speed square.</p>
<a class="learn" href="https://www.finehomebuilding.com/2017/03/16/rafter-layout-step-by-step" target="_blank" rel="noopener">Fine Homebuilding →</a>
</div>
<div class="card">
<div class="icon">🏠</div>
<h4>Ridge Beam vs Ridge Board</h4>
<p>Structural ridge beam supports rafters; ridge board is a nailing surface only — ceiling joists or ties resist thrust.</p>
<a class="learn" href="https://www.jlconline.com/how-to/framing/the-difference-between-a-ridge-board-and-a-ridge-beam_o" target="_blank" rel="noopener">JLC →</a>
</div>
<div class="card">
<div class="icon">🔻</div>
<h4>Hip & Valley Rafters</h4>
<p>Calculating hip and valley lengths — the 17-inch unit run, side-cut angles, and jack rafter step-down.</p>
<a class="learn" href="https://www.finehomebuilding.com/project-guides/framing/framing-a-hip-roof" target="_blank" rel="noopener">Fine Homebuilding →</a>
</div>
<div class="card">
<div class="icon">🐦</div>
<h4>Bird's Mouth Cut</h4>
<p>The seat and heel cut where the rafter sits on the wall plate. Don't overcut — keep at least 2/3 of the rafter depth.</p>
<a class="learn" href="https://www.finehomebuilding.com/2018/02/27/cutting-the-birds-mouth" target="_blank" rel="noopener">Fine Homebuilding →</a>
</div>
</div>
</div>
<div class="category">
<h3>Decks & Stairs</h3>
<div class="card-grid">
<div class="card">
<div class="icon">📏</div>
<h4>Stringer Calculation</h4>
<p>Total rise ÷ ideal riser height = number of risers. Stringer length follows from rise² + run² (pythagorean).</p>
<a class="learn" href="https://www.finehomebuilding.com/2017/02/02/laying-out-stair-stringers" target="_blank" rel="noopener">Fine Homebuilding →</a>
</div>
<div class="card">
<div class="icon">⚖️</div>
<h4>IRC Stair Code</h4>
<p>Risers max 7¾", treads min 10", max variance 3/8" within a flight. Headroom 6'-8" minimum.</p>
<a class="learn" href="https://codes.iccsafe.org/content/IRC2021P2/chapter-3-building-planning#IRC2021P2_Pt03_Ch03_SecR311" target="_blank" rel="noopener">IRC R311.7 →</a>
</div>
<div class="card">
<div class="icon">🔩</div>
<h4>Ledger Attachment</h4>
<p>Ledger boards must be lagged or through-bolted to rim joist with proper flashing. No nails, no exceptions.</p>
<a class="learn" href="https://www.deckmagazine.com/design-construction/framing/proper-ledger-attachment_o" target="_blank" rel="noopener">Deck Magazine →</a>
</div>
<div class="card">
<div class="icon">📊</div>
<h4>Joist Spacing</h4>
<p>Deck joist spans depend on species, size, and spacing. Use AWC's DCA-6 prescriptive guide for residential decks.</p>
<a class="learn" href="https://awc.org/codes-standards/publications/dca6" target="_blank" rel="noopener">AWC DCA-6 →</a>
</div>
</div>
</div>
<div class="category">
<h3>Tools</h3>
<div class="card-grid">
<div class="card">
<div class="icon">🔨</div>
<h4>Essential Hand Tools</h4>
<p>Framing hammer, tape, speed square, chalk line, utility knife, chisels, pry bar — the daily kit.</p>
<a class="learn" href="https://www.finehomebuilding.com/2019/04/25/the-essential-carpenters-tool-list" target="_blank" rel="noopener">Fine Homebuilding →</a>
</div>
<div class="card">
<div class="icon">⚡</div>
<h4>Essential Power Tools</h4>
<p>Circular saw, miter saw, drill/driver, impact driver, recip saw, table saw, router. What every framer carries.</p>
<a class="learn" href="https://www.protoolreviews.com/best-power-tools-for-carpenters/" target="_blank" rel="noopener">Pro Tool Reviews →</a>
</div>
<div class="card">
<div class="icon">📐</div>
<h4>Layout Tools</h4>
<p>Framing square, speed square, combination square, levels, plumb bob, laser level, story pole.</p>
<a class="learn" href="https://www.thisoldhouse.com/tools/21015108/best-layout-tools-for-carpenters" target="_blank" rel="noopener">This Old House →</a>
</div>
<div class="card">
<div class="icon">🦺</div>
<h4>Safety Equipment</h4>
<p>Eye, ear, and lung protection. Hard hats, fall arrest, knee pads, gloves. ANSI ratings matter.</p>
<a class="learn" href="https://www.osha.gov/sites/default/files/publications/OSHA3252.pdf" target="_blank" rel="noopener">OSHA Construction PPE →</a>
</div>
</div>
</div>
</section>
<!-- ============ CALCULATORS TAB ============ -->
<section class="tab-panel" id="tab-calculators">
<h2 class="section-title">Calculators</h2>
<p class="section-blurb">Real construction math. All inputs update results instantly — no submit buttons.</p>
<div id="calculators-root"></div>
</section>
<!-- ============ REFERENCE TAB ============ -->
<section class="tab-panel" id="tab-reference">
<h2 class="section-title">Reference</h2>
<p class="section-blurb">Quick-reference tables and visual guides for the field.</p>
<div id="reference-root"></div>
</section>
<!-- ============ DEMO TAB ============ -->
<section class="tab-panel" id="tab-demo">
<h2 class="section-title">Wall Framing Visualizer</h2>
<p class="section-blurb">Adjust the controls to see a live front-elevation drawing of a framed wall — plates, studs, rough openings, headers, and cripples. Hover any member for details.</p>
<div id="demo-root"></div>
</section>
</main>
<footer class="site-footer">
Built by <span class="author">GuildMasterDev</span> • Not a substitute for professional engineering
</footer>
<div class="tooltip" id="tooltip"></div>
<script>
/* ---------- Tab Switching ---------- */
document.querySelectorAll('.tab-btn').forEach(btn => {
btn.addEventListener('click', () => {
const target = btn.dataset.tab;
document.querySelectorAll('.tab-btn').forEach(b => b.classList.toggle('active', b === btn));
document.querySelectorAll('.tab-panel').forEach(p => p.classList.toggle('active', p.id === 'tab-' + target));
window.scrollTo({ top: 0, behavior: 'smooth' });
});
});
/* ---------- Helpers ---------- */
function el(tag, props = {}, ...children) {
const node = document.createElement(tag);
for (const [k, v] of Object.entries(props)) {
if (k === 'class') node.className = v;
else if (k === 'style' && typeof v === 'object') Object.assign(node.style, v);
else if (k.startsWith('on') && typeof v === 'function') node.addEventListener(k.slice(2).toLowerCase(), v);
else if (k === 'html') node.innerHTML = v;
else if (v !== undefined && v !== null) node.setAttribute(k, v);
}
for (const c of children.flat()) {
if (c == null) continue;
node.appendChild(typeof c === 'string' ? document.createTextNode(c) : c);
}
return node;
}
function fmt(n, decimals = 2) {
if (!isFinite(n)) return '—';
return Number(n).toLocaleString(undefined, { maximumFractionDigits: decimals, minimumFractionDigits: 0 });
}
function inchesToFeetInches(totalInches) {
if (!isFinite(totalInches)) return '—';
const sign = totalInches < 0 ? '-' : '';
const t = Math.abs(totalInches);
const ft = Math.floor(t / 12);
const inch = t - ft * 12;
const inchRounded = Math.round(inch * 16) / 16;
return `${sign}${ft}' ${fmt(inchRounded, 4)}"`;
}
function makeCopyButton(getText) {
const btn = el('button', { class: 'copy-btn', title: 'Copy result to clipboard' }, 'Copy');
btn.addEventListener('click', async () => {
try {
await navigator.clipboard.writeText(getText());
btn.classList.add('copied');
btn.textContent = 'Copied';
setTimeout(() => { btn.classList.remove('copied'); btn.textContent = 'Copy'; }, 1400);
} catch (e) {
btn.textContent = 'Err';
setTimeout(() => { btn.textContent = 'Copy'; }, 1400);
}
});
return btn;
}
function field(label, input) {
return el('div', { class: 'field' }, el('label', {}, label), input);
}
function numberInput(value, opts = {}) {
const inp = el('input', { type: 'number', step: opts.step || '1', min: opts.min, max: opts.max, value });
return inp;
}
/* ---------- Calculator: Lumber Estimator ---------- */
function buildLumberEstimator() {
const container = el('div', { class: 'calc' });
container.appendChild(el('h3', {}, '1. Lumber Estimator'));
container.appendChild(el('p', { class: 'desc' }, 'Stud count and plate footage for a stud wall, including king and trimmer studs around openings.'));
const wallLen = numberInput(20, { step: '0.5', min: '1', max: '200' });
const wallHt = numberInput(8, { step: '0.5', min: '4', max: '20' });
const spacing = el('select', {},
el('option', { value: '16' }, '16" OC'),
el('option', { value: '24' }, '24" OC')
);
const windows = numberInput(1, { step: '1', min: '0', max: '20' });
const doors = numberInput(1, { step: '1', min: '0', max: '10' });
const out = el('div', { class: 'output' });
const breakdown = el('div', { class: 'breakdown' });
let copyText = '';
const copyRow = el('div', { class: 'copy-row' }, makeCopyButton(() => copyText));
function recompute() {
const L = parseFloat(wallLen.value) || 0;
const H = parseFloat(wallHt.value) || 0;
const sp = parseInt(spacing.value, 10);
const win = Math.max(0, parseInt(windows.value, 10) || 0);
const dr = Math.max(0, parseInt(doors.value, 10) || 0);
// Common studs at spacing + 1 (start) + corner studs (3 typical), simplified
const ocFt = sp / 12;
const commonStuds = Math.ceil(L / ocFt) + 1;
const cornerStuds = 3; // corner/end blocking
// Each opening: 2 king + 2 trimmer (jacks), header above, cripples
const kingStuds = (win + dr) * 2;
const trimmerStuds = (win + dr) * 2;
const cripples = win * 2 + dr * 1; // rough estimate of short studs above headers
const totalStuds = commonStuds + cornerStuds + kingStuds + trimmerStuds + cripples;
// Plates: bottom + double top = 3 × wall length
const plateLF = L * 3;
// Header material — rough estimate: 4 ft per opening of 2x doubled
const headerLF = (win + dr) * 4;
out.innerHTML = '';
out.appendChild(el('div', { class: 'out-line' }, el('span', { class: 'lbl' }, 'Common studs'), el('span', { class: 'val' }, String(commonStuds))));
out.appendChild(el('div', { class: 'out-line' }, el('span', { class: 'lbl' }, 'Corner / end studs'), el('span', { class: 'val' }, String(cornerStuds))));
out.appendChild(el('div', { class: 'out-line' }, el('span', { class: 'lbl' }, 'King studs'), el('span', { class: 'val' }, String(kingStuds))));
out.appendChild(el('div', { class: 'out-line' }, el('span', { class: 'lbl' }, 'Trimmer (jack) studs'), el('span', { class: 'val' }, String(trimmerStuds))));
out.appendChild(el('div', { class: 'out-line' }, el('span', { class: 'lbl' }, 'Cripple studs (est.)'), el('span', { class: 'val' }, String(cripples))));
out.appendChild(el('div', { class: 'out-line' }, el('span', { class: 'lbl' }, 'Total studs (' + H + ' ft)'), el('span', { class: 'val' }, String(totalStuds))));
out.appendChild(el('div', { class: 'out-line' }, el('span', { class: 'lbl' }, 'Plate stock (linear ft)'), el('span', { class: 'val' }, fmt(plateLF, 1) + ' ft')));
out.appendChild(el('div', { class: 'out-line' }, el('span', { class: 'lbl' }, 'Header stock (linear ft)'), el('span', { class: 'val' }, fmt(headerLF, 1) + ' ft')));
breakdown.innerHTML = `
<strong>Math:</strong><br>
Common studs = ⌈${L} ft ÷ ${ocFt.toFixed(2)} ft⌉ + 1 = ${commonStuds}<br>
Corner/end studs assumed = 3 (adjust for layout)<br>
Each opening: 2 king + 2 trimmer studs → ${win + dr} openings × 4 = ${(win + dr) * 4}<br>
Plates = bottom + 2× top = 3 × ${L} ft = ${plateLF.toFixed(1)} ft<br>
Header stock estimated at 4 ft per opening (size to span + 6")
`;
out.appendChild(breakdown);
copyText = `Lumber Estimate (${L}' × ${H}' wall, ${sp}" OC)\n` +
`Total studs: ${totalStuds}\n` +
` Common: ${commonStuds}\n Corner/end: ${cornerStuds}\n King: ${kingStuds}\n Trimmer: ${trimmerStuds}\n Cripples: ${cripples}\n` +
`Plate stock: ${plateLF.toFixed(1)} linear ft\n` +
`Header stock: ${headerLF.toFixed(1)} linear ft`;
}
[wallLen, wallHt, spacing, windows, doors].forEach(i => i.addEventListener('input', recompute));
const inputs = el('div', { class: 'input-group' },
field('Wall length (ft)', wallLen),
field('Wall height (ft)', wallHt),
field('Stud spacing', spacing),
field('Number of windows', windows),
field('Number of doors', doors)
);
container.appendChild(el('div', { class: 'calc-grid' }, inputs, el('div', {}, out, copyRow)));
recompute();
return container;
}
/* ---------- Calculator: Stair Calculator ---------- */
function buildStairCalculator() {
const container = el('div', { class: 'calc' });
container.appendChild(el('h3', {}, '2. Stair Calculator'));
container.appendChild(el('p', { class: 'desc' }, 'Compute risers, treads, total run, and stringer length from total rise. IRC code limits: riser 4–7¾", tread ≥ 10".'));
const totalRise = numberInput(108, { step: '0.125', min: '12', max: '240' });
const treadDepth = numberInput(10, { step: '0.125', min: '9', max: '14' });
const out = el('div', { class: 'output' });
const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
svg.setAttribute('class', 'calc-svg');
svg.setAttribute('viewBox', '0 0 400 220');
svg.setAttribute('preserveAspectRatio', 'xMidYMid meet');
let copyText = '';
const copyRow = el('div', { class: 'copy-row' }, makeCopyButton(() => copyText));
function recompute() {
const rise = parseFloat(totalRise.value) || 0;
const tread = parseFloat(treadDepth.value) || 10;
// Aim for ideal riser ~7"
const idealRiser = 7;
let nRisers = Math.round(rise / idealRiser);
if (nRisers < 1) nRisers = 1;
const riserHt = rise / nRisers;
const nTreads = nRisers - 1;
const totalRun = nTreads * tread;
const stringer = Math.sqrt(rise * rise + totalRun * totalRun);
const riserOK = riserHt >= 4 && riserHt <= 7.75;
const treadOK = tread >= 10;
// Rule of thumb: 2R + T ≈ 24–25"
const rule = 2 * riserHt + tread;
const ruleOK = rule >= 23 && rule <= 25.5;
out.innerHTML = '';
out.appendChild(el('div', { class: 'out-line' }, el('span', { class: 'lbl' }, 'Number of risers'), el('span', { class: 'val' }, String(nRisers))));
out.appendChild(el('div', { class: 'out-line' }, el('span', { class: 'lbl' }, 'Number of treads'), el('span', { class: 'val' }, String(nTreads))));
const riseLine = el('div', { class: 'out-line' }, el('span', { class: 'lbl' }, 'Riser height'), el('span', { class: 'val' }, fmt(riserHt, 3) + '"'));
riseLine.querySelector('.val').appendChild(el('span', { class: 'badge ' + (riserOK ? 'ok' : 'bad') }, riserOK ? 'CODE OK' : 'OUT OF CODE'));
out.appendChild(riseLine);
const treadLine = el('div', { class: 'out-line' }, el('span', { class: 'lbl' }, 'Tread depth'), el('span', { class: 'val' }, fmt(tread, 3) + '"'));
treadLine.querySelector('.val').appendChild(el('span', { class: 'badge ' + (treadOK ? 'ok' : 'bad') }, treadOK ? 'CODE OK' : 'TOO SHALLOW'));
out.appendChild(treadLine);
out.appendChild(el('div', { class: 'out-line' }, el('span', { class: 'lbl' }, 'Total run'), el('span', { class: 'val' }, fmt(totalRun, 2) + '" (' + inchesToFeetInches(totalRun) + ')')));
out.appendChild(el('div', { class: 'out-line' }, el('span', { class: 'lbl' }, 'Stringer length'), el('span', { class: 'val' }, fmt(stringer, 2) + '" (' + inchesToFeetInches(stringer) + ')')));
const ruleLine = el('div', { class: 'out-line' }, el('span', { class: 'lbl' }, '2R + T (target 24–25")'), el('span', { class: 'val' }, fmt(rule, 2) + '"'));
ruleLine.querySelector('.val').appendChild(el('span', { class: 'badge ' + (ruleOK ? 'ok' : 'warn') }, ruleOK ? 'COMFORTABLE' : 'CHECK'));
out.appendChild(ruleLine);
out.appendChild(el('div', { class: 'breakdown', html:
`<strong>Math:</strong><br>