5 <meta http-equiv=
"Content-Type" content=
"text/html; charset=utf-8">
6 <title>SQLite3 Fiddle
</title>
7 <link rel=
"shortcut icon" href=
"data:image/x-icon;," type=
"image/x-icon">
8 <!-- to add a togglable terminal-style view, uncomment the following
9 two lines and ensure that these files are on the web server. -->
10 <!--script src="jqterm/jqterm-bundle.min.js"></script>
11 <link rel="stylesheet" href="jqterm/jquery.terminal.min.css"/-->
12 <link rel=
"stylesheet" href=
"emscripten.css"/>
14 /* The following styles are for app-level use. */
16 --sqlite-blue: #
044a64;
17 --textarea-color1: #
044a64;
18 --textarea-color2: white;
21 font-family: monospace;
23 background-color: var(--textarea-color1);
24 color: var(--textarea-color2);
27 color: var(--textarea-color1);
28 background-color: var(--textarea-color2);
32 justify-content: space-between;
34 background-color: var(--sqlite-blue);
38 border-radius:
0.25em;
41 header
> .powered-by {
44 header a, header a:visited, header a:hover {
49 flex-direction: column-reverse;
54 #main-wrapper.side-by-side {
57 #main-wrapper.side-by-side
> fieldset {
61 #main-wrapper:not(.side-by-side)
> fieldset {
62 margin-bottom:
0.25em;
64 #main-wrapper.swapio {
65 flex-direction: column;
67 #main-wrapper.side-by-side.swapio {
68 flex-direction: row-reverse;
75 min-width: inherit/*important: resolves inability to scroll fieldset child element!*/;
76 padding:
0.35em
0 0 0;
78 .zone-wrapper textarea {
81 /*min/max width resolve an inexplicable margin on the RHS. The -
1em
82 is for the padding, else we overlap the parent boundaries.*/
83 /*min-width: calc(
100% -
1em);
84 max-width: calc(
100% -
1em);
88 .zone-wrapper.input { flex:
10 1 auto; }
89 .zone-wrapper.output { flex:
20 1 auto; }
94 .zone-wrapper.output {}
99 align-content: space-between;
100 justify-content: flex-start;
103 margin:
0.05em
0.5em
0.05em
0;
112 background-color: yellow;
114 .hidden, .initially-hidden {
115 position: absolute !important;
116 opacity:
0 !important;
117 pointer-events: none !important;
118 display: none !important;
121 border-radius:
0.5em;
129 fieldset:not(.options)
> legend {
132 fieldset.options
> div {
139 fieldset.collapsible
> legend
> .fieldset-toggle::after {
143 fieldset.collapsible.collapsed
> legend
> .fieldset-toggle::after {
149 margin:
0.05em
0.25em;
150 border-radius:
0.25em;
156 span.labeled-input
> *:nth-child(
2) {
159 .center { text-align: center; }
161 max-height: calc(
100% -
2em);
163 flex-direction: column;
164 align-items: stretch;
172 flex-direction: column-reverse;
177 <header id='titlebar'
>
178 <span>SQLite3 Fiddle
</span>
179 <span class='powered-by'
>Powered by
180 <a href='https://sqlite.org'
>SQLite3
</a></span>
182 <!-- emscripten bits -->
183 <figure id=
"module-spinner">
184 <div class=
"spinner"></div>
185 <div class='center'
><strong>Initializing app...
</strong></div>
187 On a slow internet connection this may take a moment. If this
188 message displays for
"a long time", intialization may have
189 failed and the JavaScript console may contain clues as to why.
192 <div class=
"emscripten" id=
"module-status">Downloading...
</div>
193 <div class=
"emscripten">
194 <progress value=
"0" max=
"100" id=
"module-progress" hidden='
1'
></progress>
195 </div><!-- /emscripten bits -->
197 <div id='view-terminal' class='app-view hidden initially-hidden'
>
198 This is a placeholder for a terminal-like view which is not in
202 <div id='view-split' class='app-view initially-hidden'
>
203 <fieldset class='options collapsible'
>
204 <legend><button class='fieldset-toggle'
>Options
</button></legend>
206 <span class='labeled-input'
>
207 <input type='checkbox' id='opt-cb-sbs'
208 data-csstgt='#main-wrapper'
209 data-cssclass='side-by-side'
210 data-config='sideBySide'
>
211 <label for='opt-cb-sbs'
>Side-by-side
</label>
213 <span class='labeled-input'
>
214 <input type='checkbox' id='opt-cb-swapio'
215 data-csstgt='#main-wrapper'
216 data-cssclass='swapio'
217 data-config='swapInOut'
>
218 <label for='opt-cb-swapio'
>Swap in/out
</label>
220 <span class='labeled-input'
>
221 <input type='checkbox' id='opt-cb-autoscroll'
222 data-config='autoScrollOutput'
>
223 <label for='opt-cb-autoscroll'
>Auto-scroll output
</label>
225 <span class='labeled-input'
>
226 <input type='checkbox' id='opt-cb-autoclear'
227 data-config='autoClearOutput'
>
228 <label for='opt-cb-autoclear'
>Auto-clear output
</label>
230 <span class='labeled-input'
>
231 <input type='file' id='load-db' class='hidden'
/>
232 <button id='btn-load-db'
>Load DB...
</button>
234 <span class='labeled-input'
>
235 <button id='btn-export'
>Download DB
</button>
237 <span class='labeled-input'
>
238 <button id='btn-reset'
>Reset DB
</button>
241 </fieldset><!-- .options -->
242 <div id='main-wrapper' class=''
>
243 <fieldset class='zone-wrapper input'
>
244 <legend><div class='button-bar'
>
245 <button id='btn-shell-exec'
>Run
</button>
246 <button id='btn-clear'
>Clear Input
</button>
247 <!--button data-cmd='.help'>Help</button-->
248 <select id='select-examples'></select>
250 <div><textarea id="input"
251 placeholder="Shell input. Ctrl-enter/shift-enter runs it.">
252 -- ==================================================
253 -- Use ctrl-enter or shift-enter to execute sqlite3
254 -- shell commands and SQL.
255 -- If a subset of the text is currently selected,
256 -- only that part is executed.
257 -- ==================================================
262 <fieldset class='zone-wrapper output'>
263 <legend><div class='button-bar'>
264 <button id='btn-clear-output'>Clear Output</button>
265 <button id='btn-interrupt' class='hidden' disabled>Interrupt</button>
266 <!-- interruption cannot work in the current configuration
267 because we cannot send an interrupt message when work
268 is currently underway. At that point the Worker is
269 tied up and will not receive the message. -->
271 <div><textarea id=
"output" readonly
272 placeholder=
"Shell output."></textarea></div>
275 </div> <!-- #view-split -->
276 <script src=
"fiddle.js"></script>