File size: 15,921 Bytes
b9e9c4f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Masterspec PDF Export</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/font/bootstrap-icons.css" rel="stylesheet">
    <style>
        .preview-drawer {
            width: 400px;
            height: 100vh;
            position: fixed;
            top: 0;
            right: -400px;
            background: white;
            box-shadow: -5px 0 15px rgba(0,0,0,0.1);
            transition: right 0.3s ease;
            z-index: 1000;
            overflow-y: auto;
            padding: 20px;
        }
        .preview-drawer.open {
            right: 0;
        }
        .cover-thumbnail {
            width: 100px;
            height: 140px;
            object-fit: cover;
            border: 1px solid #ddd;
            margin-bottom: 10px;
        }
    </style>
</head>
<body class="bg-light">
    <div class="container-fluid py-4">
        <div class="row">
            <div class="col-lg-8">
                <div class="card shadow-sm mb-4">
                    <div class="card-header bg-primary text-white">
                        <h4 class="mb-0">Masterspec PDF Export</h4>
                    </div>
                    <div class="card-body">
                        <form id="exportForm">
                            <!-- Export Format -->
                            <div class="mb-4">
                                <h5 class="mb-3">Export Format</h5>
                                <select class="form-select" id="exportFormat">
                                    <option value="pdf">PDF</option>
                                    <option value="cloud">Cloud Issue</option>
                                    <option value="both">PDF + Cloud Issue</option>
                                </select>
                            </div>

                            <!-- Content Selection -->
                            <div class="mb-4">
                                <h5 class="mb-3">Content Selection</h5>
                                <div class="form-check form-switch mb-2">
                                    <input class="form-check-input" type="checkbox" id="specDocument" checked>
                                    <label class="form-check-label" for="specDocument">Specification Document</label>
                                </div>
                                <div class="form-check form-switch mb-2">
                                    <input class="form-check-input" type="checkbox" id="contractAppendix">
                                    <label class="form-check-label" for="contractAppendix">Contract Appendix</label>
                                </div>
                                <div class="form-check form-switch mb-2">
                                    <input class="form-check-input" type="checkbox" id="manufacturerInfo">
                                    <label class="form-check-label" for="manufacturerInfo">Manufacturer Information</label>
                                </div>
                                <div class="form-check form-switch mb-2">
                                    <input class="form-check-input" type="checkbox" id="envCertifications">
                                    <label class="form-check-label" for="envCertifications">Environmental Certifications</label>
                                </div>
                                <div class="form-check form-switch mb-2">
                                    <input class="form-check-input" type="checkbox" id="nzcicGuidelines">
                                    <label class="form-check-label" for="nzcicGuidelines">NZCIC Guidelines</label>
                                </div>
                            </div>

                            <!-- Style Options -->
                            <div class="mb-4">
                                <h5 class="mb-3">Document Style</h5>
                                <select class="form-select" id="documentStyle">
                                    <option value="compact">Compact</option>
                                    <option value="classic">Classic</option>
                                </select>
                            </div>

                            <!-- Cover Page -->
                            <div class="mb-4">
                                <h5 class="mb-3">Cover Page Template</h5>
                                <div class="row">
                                    <div class="col-md-3 mb-3">
                                        <div class="card">
                                            <img src="http://static.photos/office/200x200/1" class="cover-thumbnail" alt="Classic Professional">
                                            <div class="card-body p-2">
                                                <div class="form-check">
                                                    <input class="form-check-input" type="radio" name="coverTemplate" id="cover1" value="classic" checked>
                                                    <label class="form-check-label small" for="cover1">Classic Professional</label>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-3 mb-3">
                                        <div class="card">
                                            <img src="http://static.photos/office/200x200/2" class="cover-thumbnail" alt="Project Branded">
                                            <div class="card-body p-2">
                                                <div class="form-check">
                                                    <input class="form-check-input" type="radio" name="coverTemplate" id="cover2" value="branded">
                                                    <label class="form-check-label small" for="cover2">Project Branded</label>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-3 mb-3">
                                        <div class="card">
                                            <img src="http://static.photos/office/200x200/3" class="cover-thumbnail" alt="Technical Snapshot">
                                            <div class="card-body p-2">
                                                <div class="form-check">
                                                    <input class="form-check-input" type="radio" name="coverTemplate" id="cover3" value="technical">
                                                    <label class="form-check-label small" for="cover3">Technical Snapshot</label>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-3 mb-3">
                                        <div class="card">
                                            <img src="http://static.photos/office/200x200/4" class="cover-thumbnail" alt="Custom">
                                            <div class="card-body p-2">
                                                <div class="form-check">
                                                    <input class="form-check-input" type="radio" name="coverTemplate" id="cover4" value="custom">
                                                    <label class="form-check-label small" for="cover4">Upload Custom</label>
                                                </div>
                                                <input type="file" class="form-control form-control-sm d-none" id="customCoverUpload">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <!-- Font Customization -->
                            <div class="mb-4">
                                <h5 class="mb-3">Font Customization</h5>
                                <div class="row">
                                    <div class="col-md-6 mb-3">
                                        <label for="headingFont" class="form-label">Heading Font</label>
                                        <select class="form-select" id="headingFont">
                                            <option>Arial</option>
                                            <option>Arial Nova</option>
                                            <option>Calibri</option>
                                            <option>Georgia</option>
                                            <option>Open Sans</option>
                                            <option>Roboto</option>
                                        </select>
                                    </div>
                                    <div class="col-md-6 mb-3">
                                        <label for="headingSize" class="form-label">Heading Size (px)</label>
                                        <input type="number" class="form-control" id="headingSize" value="16">
                                    </div>
                                    <div class="col-md-6 mb-3">
                                        <label for="bodyFont" class="form-label">Body Font</label>
                                        <select class="form-select" id="bodyFont">
                                            <option>Arial</option>
                                            <option>Arial Nova</option>
                                            <option>Calibri</option>
                                            <option>Georgia</option>
                                            <option>Open Sans</option>
                                            <option>Roboto</option>
                                        </select>
                                    </div>
                                    <div class="col-md-6 mb-3">
                                        <label for="bodySize" class="form-label">Body Size (px)</label>
                                        <input type="number" class="form-control" id="bodySize" value="12">
                                    </div>
                                </div>
                            </div>

                            <!-- Document Headers/Footers -->
                            <div class="mb-4">
                                <h5 class="mb-3">Document Headers & Footers</h5>
                                <div class="mb-3">
                                    <label for="documentHeader" class="form-label">Document Header</label>
                                    <textarea class="form-control" id="documentHeader" rows="3"></textarea>
                                </div>
                                <div class="mb-3">
                                    <label for="documentFooter" class="form-label">Document Footer</label>
                                    <textarea class="form-control" id="documentFooter" rows="3"></textarea>
                                </div>
                                <div class="mb-3">
                                    <label class="form-label">QR Code Placement</label>
                                    <div class="form-check">
                                        <input class="form-check-input" type="radio" name="qrPlacement" id="qrLeft" value="left" checked>
                                        <label class="form-check-label" for="qrLeft">Left Align</label>
                                    </div>
                                    <div class="form-check">
                                        <input class="form-check-input" type="radio" name="qrPlacement" id="qrRight" value="right">
                                        <label class="form-check-label" for="qrRight">Right Align</label>
                                    </div>
                                </div>
                            </div>

                            <!-- Additional Options -->
                            <div class="mb-4">
                                <h5 class="mb-3">Additional Options</h5>
                                <div class="form-check form-switch mb-2">
                                    <input class="form-check-input" type="checkbox" id="part4Only">
                                    <label class="form-check-label" for="part4Only">Part 4 Only</label>
                                </div>
                                <div class="form-check form-switch mb-2">
                                    <input class="form-check-input" type="checkbox" id="highlighting">
                                    <label class="form-check-label" for="highlighting">Highlighting</label>
                                </div>
                                <div class="mb-3">
                                    <label for="exportNotes" class="form-label">Export Notes</label>
                                    <textarea class="form-control" id="exportNotes" rows="3"></textarea>
                                </div>
                            </div>

                            <div class="d-flex justify-content-between mt-4">
                                <button type="button" class="btn btn-outline-primary" id="previewBtn">
                                    <i class="bi bi-eye-fill me-2"></i>Live Preview
                                </button>
                                <button type="submit" class="btn btn-primary">
                                    <i class="bi bi-file-earmark-pdf-fill me-2"></i>Export to PDF
                                </button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- Preview Drawer -->
    <div class="preview-drawer" id="previewDrawer">
        <div class="d-flex justify-content-between align-items-center mb-3">
            <h5>Document Preview</h5>
            <button type="button" class="btn-close" id="closePreview"></button>
        </div>
        <div class="preview-content border p-3" id="previewContent">
            <div class="text-center mb-4">
                <h4>Document Preview</h4>
                <p class="text-muted">Changes will appear here as you adjust settings</p>
            </div>
            <div class="placeholder-content" style="height: 800px; background-color: #f8f9fa;"></div>
        </div>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    <script>
        document.getElementById('previewBtn').addEventListener('click', function() {
            document.getElementById('previewDrawer').classList.add('open');
        });

        document.getElementById('closePreview').addEventListener('click', function() {
            document.getElementById('previewDrawer').classList.remove('open');
        });

        document.getElementById('cover4').addEventListener('change', function() {
            if (this.checked) {
                document.getElementById('customCoverUpload').classList.remove('d-none');
            } else {
                document.getElementById('customCoverUpload').classList.add('d-none');
            }
        });
    </script>
</body>
</html>