285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
|
"box rad 10px \"Markdown\" \"Formatter\" \"(markdown.c)\" fit\n"
"arrow right 200% \"HTML+SVG\" \"Output\"\n"
"arrow <-> down from last box.s\n"
"box same \"Pikchr\" \"Formatter\" \"(pikchr.c)\" fit\n";
}
style_header("PikchrShow Client/Server");
CX("<style>"); {
CX("div.content { padding-top: 0.5em }\n");
CX("#sbs-wrapper {"
"display: flex; flex-direction: column;"
"}\n");
CX("#sbs-wrapper > * {"
"margin: 0 0.25em 0.5em 0; flex: 1 10 auto;"
"align-self: stretch;"
"}\n");
|
|
|
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
|
"box rad 10px \"Markdown\" \"Formatter\" \"(markdown.c)\" fit\n"
"arrow right 200% \"HTML+SVG\" \"Output\"\n"
"arrow <-> down from last box.s\n"
"box same \"Pikchr\" \"Formatter\" \"(pikchr.c)\" fit\n";
}
style_header("PikchrShow Client/Server");
CX("<style>"); {
CX("main.content { padding-top: 0.5em }\n");
CX("#sbs-wrapper {"
"display: flex; flex-direction: column;"
"}\n");
CX("#sbs-wrapper > * {"
"margin: 0 0.25em 0.5em 0; flex: 1 10 auto;"
"align-self: stretch;"
"}\n");
|
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
|
"margin-right: 0.5em; vertical-align: middle;"
"}\n");
CX("body.pikchrshow .v-align-middle{"
"vertical-align: middle"
"}\n");
CX(".dragover {border: 3px dotted rgba(0,255,0,0.6)}\n");
} CX("</style>");
CX("<div>Input pikchr code and tap Preview (or Shift-Enter) to render "
"it. <a href='?wasm'>Switch to WASM mode</a>.</div>");
CX("<div id='sbs-wrapper'>"); {
CX("<div id='pikchrshow-form'>"); {
CX("<textarea id='content' name='content' rows='15'>"
"%s</textarea>",zContent/*safe-for-%s*/);
CX("<div id='pikchrshow-controls'>"); {
CX("<button id='pikchr-submit-preview'>Preview</button>");
CX("<div class='input-with-label'>"); {
|
|
|
|
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
|
"margin-right: 0.5em; vertical-align: middle;"
"}\n");
CX("body.pikchrshow .v-align-middle{"
"vertical-align: middle"
"}\n");
CX(".dragover {border: 3px dotted rgba(0,255,0,0.6)}\n");
} CX("</style>");
CX("<div><label for='content'>Input pikchr code</label> and tap Preview (or "
"Shift-Enter) to render it. <a href='?wasm'>Switch to WASM mode</a>.</div>");
CX("<div id='sbs-wrapper'>"); {
CX("<div id='pikchrshow-form'>"); {
CX("<textarea id='content' name='content' rows='15'>"
"%s</textarea>",zContent/*safe-for-%s*/);
CX("<div id='pikchrshow-controls'>"); {
CX("<button id='pikchr-submit-preview'>Preview</button>");
CX("<div class='input-with-label'>"); {
|
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
|
**
** Accepts a pikchr script as input and outputs the rendered script as
** an SVG graphic. The INFILE and OUTFILE options default to stdin
** resp. stdout, and the names "-" can be used as aliases for those
** streams.
**
** Options:
**
** -div On success, add a DIV wrapper around the
** resulting SVG output which limits its max-width to
** its computed maximum ideal size.
**
** -div-indent Like -div but indent the div.
**
** -div-center Like -div but center the div.
**
** -div-left Like -div but float the div left.
**
** -div-right Like -div but float the div right.
**
** -div-toggle Set the 'toggle' CSS class on the div (used by the
** JavaScript-side post-processor).
**
** -div-source Set the 'source' CSS class on the div, which tells
** CSS to hide the SVG and reveal the source by default.
**
** -src Store the input pikchr's source code in the output as
** a separate element adjacent to the SVG one. Implied
** by -div-source.
**
**
** -th Process the input using TH1 before passing it to pikchr.
**
** -th-novar Disable $var and $<var> TH1 processing. Use this if the
** pikchr script uses '$' for its own purposes and that
** causes issues. This only affects parsing of '$' outside
** of TH1 script blocks. Code in such blocks is unaffected.
**
** -th-nosvg When using -th, output the post-TH1'd script
** instead of the pikchr-rendered output.
**
** -th-trace Trace TH1 execution (for debugging purposes).
**
**
** The -div-indent/center/left/right flags may not be combined.
**
** TH1-related Notes and Caveats:
**
** If the -th flag is used, this command must open a fossil database
** for certain functionality to work (via a checkout or the -R REPO
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
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
|
**
** Accepts a pikchr script as input and outputs the rendered script as
** an SVG graphic. The INFILE and OUTFILE options default to stdin
** resp. stdout, and the names "-" can be used as aliases for those
** streams.
**
** Options:
** -div On success, add a DIV wrapper around the
** resulting SVG output which limits its max-width to
** its computed maximum ideal size.
** -div-indent Like -div but indent the div.
** -div-center Like -div but center the div.
** -div-left Like -div but float the div left.
** -div-right Like -div but float the div right.
** -div-toggle Set the 'toggle' CSS class on the div (used by the
** JavaScript-side post-processor).
** -div-source Set the 'source' CSS class on the div, which tells
** CSS to hide the SVG and reveal the source by default.
** -src Store the input pikchr's source code in the output as
** a separate element adjacent to the SVG one. Implied
** by -div-source.
** -th Process the input using TH1 before passing it to pikchr.
** -th-novar Disable $var and $<var> TH1 processing. Use this if the
** pikchr script uses '$' for its own purposes and that
** causes issues. This only affects parsing of '$' outside
** of TH1 script blocks. Code in such blocks is unaffected.
** -th-nosvg When using -th, output the post-TH1'd script
** instead of the pikchr-rendered output.
** -th-trace Trace TH1 execution (for debugging purposes).
**
** The -div-indent/center/left/right flags may not be combined.
**
** TH1-related Notes and Caveats:
**
** If the -th flag is used, this command must open a fossil database
** for certain functionality to work (via a checkout or the -R REPO
|