Fossil SCM

Fixed /pikchrshow layout at top/bottom, moved the UI controls to sit between the two main elements, and fixed the dark mode CSS selector broken by updates to pikchr's output.

stephan 2020-09-11 18:40 trunk
Commit 2dd0a40e599676c4ee822b313dd79564ec710317369e2396fd0b12032f0e8375
1 file changed +4 -4
--- src/pikchrshow.c
+++ src/pikchrshow.c
@@ -69,11 +69,11 @@
6969
}
7070
style_header("PikchrShow");
7171
CX("<style>");
7272
CX("div.content { padding-top: 0.5em }");
7373
CX("#sbs-wrapper {"
74
- "display: flex; flex-direction: row; flex-wrap: wrap;"
74
+ "display: flex; flex-direction: column;"
7575
"}");
7676
CX("#sbs-wrapper > * {"
7777
"margin: 0 0.25em 0.5em 0; flex: 1 10 auto;"
7878
"align-self: stretch;"
7979
"}");
@@ -99,11 +99,11 @@
9999
"display: inline; margin: 0 0.25em 0.5em 0;"
100100
"}");
101101
CX("#pikchrshow-controls > .input-with-label > * {"
102102
"cursor: pointer;"
103103
"}");
104
- CX("#pikchrshow-output.dark-mode > svg {"
104
+ CX("#pikchrshow-output.dark-mode svg {"
105105
/* Flip the colors to approximate a dark theme look */
106106
"filter: invert(1) hue-rotate(180deg);"
107107
"}");
108108
CX("#sbs-wrapper > fieldset {"
109109
"padding: 0.25em 0.5em; border-radius: 0.25em;"
@@ -111,18 +111,18 @@
111111
CX("fieldset > legend > .copy-button {margin-left: 0.25em}");
112112
CX("</style>");
113113
CX("<div>Input pikchr code and tap Preview to render it:</div>");
114114
CX("<div id='sbs-wrapper'>");
115115
CX("<div id='pikchrshow-form'>");
116
+ CX("<textarea id='content' name='content' rows='15'>%s</textarea>",
117
+ zContent/*safe-for-%s*/);
116118
CX("<div id='pikchrshow-controls'>");
117119
CX("<button id='pikchr-submit-preview'>Preview</button>");
118120
style_labeled_checkbox("flipcolors-wrapper", "flipcolors",
119121
"Simulate dark theme?",
120122
"1", flipColors, 0);
121123
CX("</div>"/*#pikchrshow-controls*/);
122
- CX("<textarea id='content' name='content' rows='15'>%s</textarea>",
123
- zContent/*safe-for-%s*/);
124124
CX("</div>"/*#pikchrshow-form*/);
125125
CX("<fieldset id='pikchrshow-output-wrapper'>");
126126
CX("<legend>Preview <span class='copy-button'></span></legend>");
127127
CX("<div id='pikchrshow-output'>");
128128
if(*zContent){
129129
--- src/pikchrshow.c
+++ src/pikchrshow.c
@@ -69,11 +69,11 @@
69 }
70 style_header("PikchrShow");
71 CX("<style>");
72 CX("div.content { padding-top: 0.5em }");
73 CX("#sbs-wrapper {"
74 "display: flex; flex-direction: row; flex-wrap: wrap;"
75 "}");
76 CX("#sbs-wrapper > * {"
77 "margin: 0 0.25em 0.5em 0; flex: 1 10 auto;"
78 "align-self: stretch;"
79 "}");
@@ -99,11 +99,11 @@
99 "display: inline; margin: 0 0.25em 0.5em 0;"
100 "}");
101 CX("#pikchrshow-controls > .input-with-label > * {"
102 "cursor: pointer;"
103 "}");
104 CX("#pikchrshow-output.dark-mode > svg {"
105 /* Flip the colors to approximate a dark theme look */
106 "filter: invert(1) hue-rotate(180deg);"
107 "}");
108 CX("#sbs-wrapper > fieldset {"
109 "padding: 0.25em 0.5em; border-radius: 0.25em;"
@@ -111,18 +111,18 @@
111 CX("fieldset > legend > .copy-button {margin-left: 0.25em}");
112 CX("</style>");
113 CX("<div>Input pikchr code and tap Preview to render it:</div>");
114 CX("<div id='sbs-wrapper'>");
115 CX("<div id='pikchrshow-form'>");
 
 
116 CX("<div id='pikchrshow-controls'>");
117 CX("<button id='pikchr-submit-preview'>Preview</button>");
118 style_labeled_checkbox("flipcolors-wrapper", "flipcolors",
119 "Simulate dark theme?",
120 "1", flipColors, 0);
121 CX("</div>"/*#pikchrshow-controls*/);
122 CX("<textarea id='content' name='content' rows='15'>%s</textarea>",
123 zContent/*safe-for-%s*/);
124 CX("</div>"/*#pikchrshow-form*/);
125 CX("<fieldset id='pikchrshow-output-wrapper'>");
126 CX("<legend>Preview <span class='copy-button'></span></legend>");
127 CX("<div id='pikchrshow-output'>");
128 if(*zContent){
129
--- src/pikchrshow.c
+++ src/pikchrshow.c
@@ -69,11 +69,11 @@
69 }
70 style_header("PikchrShow");
71 CX("<style>");
72 CX("div.content { padding-top: 0.5em }");
73 CX("#sbs-wrapper {"
74 "display: flex; flex-direction: column;"
75 "}");
76 CX("#sbs-wrapper > * {"
77 "margin: 0 0.25em 0.5em 0; flex: 1 10 auto;"
78 "align-self: stretch;"
79 "}");
@@ -99,11 +99,11 @@
99 "display: inline; margin: 0 0.25em 0.5em 0;"
100 "}");
101 CX("#pikchrshow-controls > .input-with-label > * {"
102 "cursor: pointer;"
103 "}");
104 CX("#pikchrshow-output.dark-mode svg {"
105 /* Flip the colors to approximate a dark theme look */
106 "filter: invert(1) hue-rotate(180deg);"
107 "}");
108 CX("#sbs-wrapper > fieldset {"
109 "padding: 0.25em 0.5em; border-radius: 0.25em;"
@@ -111,18 +111,18 @@
111 CX("fieldset > legend > .copy-button {margin-left: 0.25em}");
112 CX("</style>");
113 CX("<div>Input pikchr code and tap Preview to render it:</div>");
114 CX("<div id='sbs-wrapper'>");
115 CX("<div id='pikchrshow-form'>");
116 CX("<textarea id='content' name='content' rows='15'>%s</textarea>",
117 zContent/*safe-for-%s*/);
118 CX("<div id='pikchrshow-controls'>");
119 CX("<button id='pikchr-submit-preview'>Preview</button>");
120 style_labeled_checkbox("flipcolors-wrapper", "flipcolors",
121 "Simulate dark theme?",
122 "1", flipColors, 0);
123 CX("</div>"/*#pikchrshow-controls*/);
 
 
124 CX("</div>"/*#pikchrshow-form*/);
125 CX("<fieldset id='pikchrshow-output-wrapper'>");
126 CX("<legend>Preview <span class='copy-button'></span></legend>");
127 CX("<div id='pikchrshow-output'>");
128 if(*zContent){
129

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button