7#ifndef KICAD_TEMPLATE_DEFAULT_HTML_H
8#define KICAD_TEMPLATE_DEFAULT_HTML_H
19inline wxString GetCommonStyles()
23 "--bg-primary: #FFFFFF;"
24 "--bg-secondary: #F3F3F3;"
25 "--bg-elevated: #FFFFFF;"
26 "--text-primary: #545454;"
27 "--text-secondary: #848484;"
29 "--accent-subtle: rgba(26, 129, 196, 0.08);"
31 "--shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);"
34 "--bg-primary: #1E1E1E;"
35 "--bg-secondary: #2D2D2D;"
36 "--bg-elevated: #333333;"
37 "--text-primary: #DED3DD;"
38 "--text-secondary: #848484;"
40 "--accent-subtle: rgba(66, 184, 235, 0.1);"
42 "--shadow: 0 1px 3px rgba(0,0,0,0.2), 0 1px 2px rgba(0,0,0,0.15);"
44 "* { box-sizing: border-box; }"
46 "font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;"
49 "background: var(--bg-primary);"
50 "color: var(--text-primary);"
57inline wxString GetTemplateIcon()
60 "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" "
61 "stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">"
62 "<path d=\"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z\"/>"
63 "<polyline points=\"14 2 14 8 20 8\"/>"
64 "<line x1=\"16\" y1=\"13\" x2=\"8\" y2=\"13\"/>"
65 "<line x1=\"16\" y1=\"17\" x2=\"8\" y2=\"17\"/>"
66 "<polyline points=\"10 9 9 9 8 9\"/>"
72inline wxString GetSettingsIcon()
75 "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" "
76 "stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">"
77 "<circle cx=\"12\" cy=\"12\" r=\"3\"/>"
78 "<path d=\"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06"
79 "a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09"
80 "A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83"
81 "l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09"
82 "A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0"
83 "l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09"
84 "a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83"
85 "l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09"
86 "a1.65 1.65 0 0 0-1.51 1z\"/>"
92inline wxString GetLayersIcon()
95 "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" "
96 "stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">"
97 "<polygon points=\"12 2 2 7 12 12 22 7 12 2\"/>"
98 "<polyline points=\"2 17 12 22 22 17\"/>"
99 "<polyline points=\"2 12 12 17 22 12\"/>"
105inline wxString GetFolderIcon()
108 "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" "
109 "stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">"
110 "<path d=\"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z\"/>"
116inline wxString GetInfoIcon()
119 "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" "
120 "stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">"
121 "<circle cx=\"12\" cy=\"12\" r=\"10\"/>"
122 "<line x1=\"12\" y1=\"16\" x2=\"12\" y2=\"12\"/>"
123 "<line x1=\"12\" y1=\"8\" x2=\"12.01\" y2=\"8\"/>"
134 wxString bodyClass = aDarkMode ? wxS(
"kicad-dark" ) : wxS(
"" );
140 "<meta charset=\"UTF-8\">"
141 "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">"
142 "<title>KiCad Project Template Selector</title>"
144 + GetCommonStyles() +
149 "background: var(--bg-elevated);"
150 "border-radius: 8px;"
152 "box-shadow: var(--shadow);"
153 "border: 1px solid var(--border);"
156 "text-align: center;"
157 "margin-bottom: 28px;"
162 "color: var(--text-primary);"
166 "font-size: 0.95rem;"
167 "color: var(--text-secondary);"
172 "flex-direction: column;"
174 "margin-bottom: 28px;"
178 "align-items: flex-start;"
181 "background: var(--bg-secondary);"
182 "border-radius: 6px;"
189 "align-items: center;"
190 "justify-content: center;"
191 "background: var(--accent-subtle);"
192 "border-radius: 8px;"
193 "color: var(--accent);"
195 ".feature-content h3 {"
197 "font-size: 0.95rem;"
199 "color: var(--text-primary);"
201 ".feature-content p {"
203 "font-size: 0.875rem;"
204 "color: var(--text-secondary);"
208 "align-items: flex-start;"
210 "padding: 12px 14px;"
211 "background: var(--accent-subtle);"
212 "border-radius: 6px;"
213 "border-left: 3px solid var(--accent);"
217 "color: var(--accent);"
220 "font-size: 0.875rem;"
221 "color: var(--text-secondary);"
226 "<body class=\"" ) + bodyClass + wxString(
"\">"
227 "<div class=\"card\">"
228 "<div class=\"header\">"
229 "<h1 class=\"title\">" ) +
_(
"Select a Template" ) + wxString(
"</h1>"
230 "<p class=\"subtitle\">" )
231 +
_(
"Templates provide pre-configured project structures to jumpstart your design." )
234 "<div class=\"features\">"
235 "<div class=\"feature\">"
236 "<div class=\"feature-icon\">" ) + GetTemplateIcon() + wxString(
"</div>"
237 "<div class=\"feature-content\">"
238 "<h3>" ) +
_(
"Pre-configured Libraries" ) + wxString(
"</h3>"
239 "<p>" ) +
_(
"Common symbols and footprints already linked and ready to use." ) + wxString(
"</p>"
242 "<div class=\"feature\">"
243 "<div class=\"feature-icon\">" ) + GetSettingsIcon() + wxString(
"</div>"
244 "<div class=\"feature-content\">"
245 "<h3>" ) +
_(
"Design Rules" ) + wxString(
"</h3>"
246 "<p>" ) +
_(
"Electrical and mechanical constraints configured for the intended application." ) + wxString(
"</p>"
249 "<div class=\"feature\">"
250 "<div class=\"feature-icon\">" ) + GetLayersIcon() + wxString(
"</div>"
251 "<div class=\"feature-content\">"
252 "<h3>" ) +
_(
"Board Stackups" ) + wxString(
"</h3>"
253 "<p>" ) +
_(
"Layer configurations optimized for common manufacturing processes." ) + wxString(
"</p>"
257 "<div class=\"tip\">"
258 "<div class=\"tip-icon\">" ) + GetInfoIcon() + wxString(
"</div>"
259 "<p class=\"tip-text\">" )
260 +
_(
"Recently used templates appear at the top. Use the folder icon to browse custom template directories." )
273 wxString bodyClass = aDarkMode ? wxS(
"kicad-dark" ) : wxS(
"" );
279 "<meta charset=\"UTF-8\">"
280 "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">"
281 "<title>" ) + aTemplateName + wxString(
" - KiCad Template</title>"
283 + GetCommonStyles() +
288 "background: var(--bg-elevated);"
289 "border-radius: 8px;"
291 "box-shadow: var(--shadow);"
292 "border: 1px solid var(--border);"
296 "align-items: center;"
298 "margin-bottom: 20px;"
301 "background: var(--accent);"
304 "border-radius: 4px;"
305 "font-size: 0.75rem;"
307 "letter-spacing: 0.03em;"
308 "text-transform: uppercase;"
311 "font-size: 1.25rem;"
313 "color: var(--text-primary);"
317 "color: var(--text-secondary);"
318 "margin-bottom: 24px;"
321 "background: var(--bg-secondary);"
322 "border-radius: 6px;"
324 "margin-bottom: 20px;"
327 "font-size: 0.875rem;"
329 "color: var(--text-primary);"
330 "margin: 0 0 16px 0;"
335 "margin-bottom: 14px;"
345 "align-items: center;"
346 "justify-content: center;"
347 "background: var(--accent);"
349 "border-radius: 50%;"
350 "font-size: 0.75rem;"
355 "font-size: 0.875rem;"
357 "color: var(--text-primary);"
361 "font-size: 0.8125rem;"
362 "color: var(--text-secondary);"
366 "align-items: flex-start;"
368 "padding: 12px 14px;"
369 "background: var(--accent-subtle);"
370 "border-radius: 6px;"
371 "border-left: 3px solid var(--accent);"
375 "color: var(--accent);"
378 "font-size: 0.8125rem;"
379 "color: var(--text-secondary);"
383 "background: var(--bg-secondary);"
385 "border-radius: 3px;"
386 "font-size: 0.8125rem;"
387 "font-family: 'SF Mono', Monaco, Consolas, monospace;"
391 "<body class=\"" ) + bodyClass + wxString(
"\">"
392 "<div class=\"card\">"
393 "<div class=\"header\">"
394 "<span class=\"badge\">" ) +
_(
"Template" ) + wxString(
"</span>"
395 "<h1 class=\"template-name\">" ) + aTemplateName + wxString(
"</h1>"
397 "<p class=\"description\">" )
398 +
_(
"This template does not include a description. You can still use it to create a new project." )
400 "<div class=\"steps\">"
401 "<h3 class=\"steps-title\">" ) +
_(
"To use this template" ) + wxString(
"</h3>"
402 "<div class=\"step\">"
403 "<span class=\"step-number\">1</span>"
404 "<div class=\"step-content\">"
405 "<h4>" ) +
_(
"Create the project" ) + wxString(
"</h4>"
406 "<p>" ) +
_(
"Click OK to create a new project folder with this template's contents." ) + wxString(
"</p>"
409 "<div class=\"step\">"
410 "<span class=\"step-number\">2</span>"
411 "<div class=\"step-content\">"
412 "<h4>" ) +
_(
"Open schematic and PCB" ) + wxString(
"</h4>"
413 "<p>" ) +
_(
"Use the Project Manager to launch the Schematic and PCB editors." ) + wxString(
"</p>"
416 "<div class=\"step\">"
417 "<span class=\"step-number\">3</span>"
418 "<div class=\"step-content\">"
419 "<h4>" ) +
_(
"Review settings" ) + wxString(
"</h4>"
420 "<p>" ) +
_(
"Verify libraries, design rules, and board stackup match your needs." ) + wxString(
"</p>"
424 "<div class=\"hint\">"
425 "<div class=\"hint-icon\">" ) + GetInfoIcon() + wxString(
"</div>"
426 "<p class=\"hint-text\">" )
427 +
_(
"Add a description by creating" ) + wxString(
" <code>meta/info.html</code> " )
428 +
_(
"inside this template's directory." )
441 wxString bodyClass = aDarkMode ? wxS(
"kicad-dark" ) : wxS(
"" );
447 "<meta charset=\"UTF-8\">"
448 "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">"
449 "<title>No Templates - KiCad</title>"
451 + GetCommonStyles() +
456 "background: var(--bg-elevated);"
457 "border-radius: 8px;"
459 "box-shadow: var(--shadow);"
460 "border: 1px solid var(--border);"
461 "text-align: center;"
466 "margin: 0 auto 20px auto;"
468 "align-items: center;"
469 "justify-content: center;"
470 "background: var(--bg-secondary);"
471 "border-radius: 50%;"
472 "color: var(--text-secondary);"
479 "font-size: 1.25rem;"
481 "color: var(--text-primary);"
485 "color: var(--text-secondary);"
486 "margin: 0 0 24px 0;"
490 "background: var(--bg-secondary);"
491 "border-radius: 6px;"
492 "padding: 16px 20px;"
493 "margin-bottom: 20px;"
495 ".suggestions-title {"
496 "font-size: 0.875rem;"
498 "color: var(--text-primary);"
499 "margin: 0 0 12px 0;"
503 "padding-left: 20px;"
504 "color: var(--text-secondary);"
505 "font-size: 0.875rem;"
508 "margin-bottom: 8px;"
510 ".suggestions li:last-child {"
515 "align-items: flex-start;"
517 "padding: 12px 14px;"
518 "background: var(--accent-subtle);"
519 "border-radius: 6px;"
524 "color: var(--accent);"
527 "font-size: 0.8125rem;"
528 "color: var(--text-secondary);"
533 "<body class=\"" ) + bodyClass + wxString(
"\">"
534 "<div class=\"card\">"
535 "<div class=\"icon\">" ) + GetFolderIcon() + wxString(
"</div>"
536 "<h1 class=\"title\">" ) +
_(
"No Templates Found" ) + wxString(
"</h1>"
537 "<p class=\"message\">" )
538 +
_(
"The selected directory does not contain any project templates." )
540 "<div class=\"suggestions\">"
541 "<h3 class=\"suggestions-title\">" ) +
_(
"Suggestions" ) + wxString(
"</h3>"
543 "<li>" ) +
_(
"Browse to a different directory using the folder icon" ) + wxString(
"</li>"
544 "<li>" ) +
_(
"Use the refresh icon to reload the current directory" ) + wxString(
"</li>"
545 "<li>" ) +
_(
"Switch to a system templates tab" ) + wxString(
"</li>"
548 "<div class=\"tip\">"
549 "<div class=\"tip-icon\">" ) + GetInfoIcon() + wxString(
"</div>"
550 "<p class=\"tip-text\">" )
551 +
_(
"Each template needs a 'meta' folder containing configuration files." )
wxString GetWelcomeHtml(bool aDarkMode)
wxString GetTemplateInfoHtml(const wxString &aTemplateName, bool aDarkMode)
wxString GetNoTemplatesHtml(bool aDarkMode)