Documentation Source Text

Check-in [6d9737f221]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Click-to-view for the table of contents on fancy-format.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | mobile-friendly
Files: files | file ages | folders
SHA1: 6d9737f221c28c1a0bff7d15ef505d1b36682a71
User & Date: drh 2016-09-01 19:12:12.991
Context
2016-09-01
20:58
Hack to get "make searchdb" running again. (check-in: 304b04a18c user: drh tags: mobile-friendly)
19:12
Click-to-view for the table of contents on fancy-format. (check-in: 6d9737f221 user: drh tags: mobile-friendly)
18:38
Fix up the support.html page for mobile. Improved the look of "button" hyperlinks. (check-in: 5e4e985bf0 user: drh tags: mobile-friendly)
Changes
Unified Diff Ignore Whitespace Patch
Changes to pages/docsdata.tcl.
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
doc {Frequently Asked Questions} {faq.html} {
  The title of the document says all...
}
doc {Books About SQLite} {books.html} {
  A list of independently written books about SQLite.
}

heading {Lists And Indexes Of Documents} lists

doc {Alphabetical Listing Of Documents} {doclist.html} {
  A list of all titled pages on this website, sorted by title.
}
doc {Website Keyword Index} {keyword_index.html} {
  A cross-reference from keywords to various pages within this website.
}







|







27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
doc {Frequently Asked Questions} {faq.html} {
  The title of the document says all...
}
doc {Books About SQLite} {books.html} {
  A list of independently written books about SQLite.
}

heading {Document Lists And Indexes} lists

doc {Alphabetical Listing Of Documents} {doclist.html} {
  A list of all titled pages on this website, sorted by title.
}
doc {Website Keyword Index} {keyword_index.html} {
  A cross-reference from keywords to various pages within this website.
}
Changes to pages/fancyformat.tcl.
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

#-------------------------------------------------------------------------
# Return the <script>...</script> block containing the code for persistent
# show/hide on the TOC block. This is inserted into each page immediately
# after the "Table Of Contents" block.
#
proc javascript_toc_toggle {} {
  return {
    <script>
      function hide_toc(){
        var toc = document.getElementById('toc');
        var antitoc = document.getElementById('antitoc');

        toc.style.display = 'none';


        antitoc.style.display = '';
        eraseCookie('showtoc');

      }
      function show_toc(){
        var toc = document.getElementById('toc');
        var antitoc = document.getElementById('antitoc');
        toc.style.display = '';
        antitoc.style.display = 'none';
        createCookie('showtoc', 1, 365);
      }
      if( readCookie('showtoc') ) show_toc();
    </script>
  }


}


proc addtoc_cb {tag details args} {
  upvar #0 ::Addtoc G
  switch -glob -- $tag {








|

|
|
|
>
|
>
>
|
<
>
|
<
<
<
<
<
<

<


>
>







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

#-------------------------------------------------------------------------
# Return the <script>...</script> block containing the code for persistent
# show/hide on the TOC block. This is inserted into each page immediately
# after the "Table Of Contents" block.
#
proc javascript_toc_toggle {} {
  set x {
    <script>
      function toggle_toc(){
        var sub = document.getElementById("toc_sub")
        var mk = document.getElementById("toc_mk")
        if( sub.style.display!="block" ){
          sub.style.display = "block";
          mk.innerHTML = "&#x25be;";
        } else {
          sub.style.display = "none";

          mk.innerHTML = "&#x25b8;";
        }






      }

    </script>
  }
  regsub -all {\n\s+} $x "\n" x
  return $x;
}


proc addtoc_cb {tag details args} {
  upvar #0 ::Addtoc G
  switch -glob -- $tag {

284
285
286
287
288
289
290
291
292
293
294
295
296
297
298

      append G(doc) [formattag $tag [array get D]]
      append G(doc) "$HN "
    }

    /h[1-6] { ;# End of current heading.
      if {$::Addtoc(inHeading)} {
        append G(toc) "</a></div>"
      }
      set G(inHeading) 0
      append G(doc) [formattag $tag $details]
    }

    title  { 
      set G(inTitle) 1







|







282
283
284
285
286
287
288
289
290
291
292
293
294
295
296

      append G(doc) [formattag $tag [array get D]]
      append G(doc) "$HN "
    }

    /h[1-6] { ;# End of current heading.
      if {$::Addtoc(inHeading)} {
        append G(toc) "</a></div>\n"
      }
      set G(inHeading) 0
      append G(doc) [formattag $tag $details]
    }

    title  { 
      set G(inTitle) 1
420
421
422
423
424
425
426
427
428
429
430
431

432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
  # before it. This stops the table of contents from being used for 
  # snippets on search results pages.
  #
  set toc [subst {
    <div class=fancy>

    <div class=nosearch>
      <div style="font-size:2em;text-align:center;color:#044a64">
        $::Addtoc(title)
      </div>
      <div id=toc style="display:none"> 
        <div style="margin:1em;margin-left:0;color:#044a64">

          <span style="font-size:1.5em">Table Of Contents</span>
          <a class="toct" href="#" onclick="hide_toc()">
            &#91;hide&#93;
          </a>
        </div>
        $::Addtoc(toc) 
      </div>
      <div id=antitoc>
        <a class="toct" href="#" onclick="show_toc()">
          &#91;show table of contents&#93;
        </a>
      </div>
    </div>
    [javascript_toc_toggle]
  }]
  set fancy [subst {
    <div class=fancy>
    <div style="font-size:2em;text-align:center;color:#044a64">







<
|
|
|
<
>
|
<
<
<
<
|
<
<
<
<
<







418
419
420
421
422
423
424

425
426
427

428
429




430





431
432
433
434
435
436
437
  # before it. This stops the table of contents from being used for 
  # snippets on search results pages.
  #
  set toc [subst {
    <div class=fancy>

    <div class=nosearch>

      <div class="fancy_title">$::Addtoc(title)</div>
      <div class="fancy_toc">
         <a onclick="toggle_toc()">

         <span class="fancy_toc_mark" id="toc_mk">&#x25b8;</span>
         Table Of Contents</a>




         <div id="toc_sub">$::Addtoc(toc)</div>





      </div>
    </div>
    [javascript_toc_toggle]
  }]
  set fancy [subst {
    <div class=fancy>
    <div style="font-size:2em;text-align:center;color:#044a64">
Changes to rawpages/sqlite.css.
148
149
150
151
152
153
154
155

156
157
158
159
160
















161
162
163
164
165
166
167
/* Things for "fancyformat" documents start here. */
.fancy img+p {font-style:italic}
.fancy .codeblock i { color: darkblue; }
.fancy h1,.fancy h2,.fancy h3,.fancy h4 {font-weight:normal;color:#044a64}
.fancy th {white-space:xnowrap;text-align:left;border-bottom:solid 1px #444}
.fancy th, .fancy td {padding: 0.2em 1ex; vertical-align:top}
.toct { color: #044a64 ! important; }
.fancy #toc a        { color: darkblue ; text-decoration: none }

.fancy .todo         { color: #AA3333 ; font-style : italic }
.fancy .todo:before  { content: 'TODO:' }
.fancy p.todo        { border: solid #AA3333 1px; padding: 1ex }
.fancy img { display:block; }
.fancy :link:hover, .fancy :visited:hover { background: wheat }
















@media screen and (min-width: 600px){
  /* Indentation amounts for non-mobile screens, 600 pixels or wider */
  .fancy p,.fancy ul,.fancy ol,.fancy dl { margin: 1em 5ex }
  .fancy li p { margin: 1em 0 }
  .fancy blockquote { margin-left : 10ex }
  .toct {margin-left:4ex;}
  .fancy-toc1 {margin-left:6ex;}







|
>





>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







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
/* Things for "fancyformat" documents start here. */
.fancy img+p {font-style:italic}
.fancy .codeblock i { color: darkblue; }
.fancy h1,.fancy h2,.fancy h3,.fancy h4 {font-weight:normal;color:#044a64}
.fancy th {white-space:xnowrap;text-align:left;border-bottom:solid 1px #444}
.fancy th, .fancy td {padding: 0.2em 1ex; vertical-align:top}
.toct { color: #044a64 ! important; }
#toc_sub a        { color: #044a64; text-decoration: none }
#toc_sub { display: none; margin-top: 1em; }
.fancy .todo         { color: #AA3333 ; font-style : italic }
.fancy .todo:before  { content: 'TODO:' }
.fancy p.todo        { border: solid #AA3333 1px; padding: 1ex }
.fancy img { display:block; }
.fancy :link:hover, .fancy :visited:hover { background: wheat }
.fancy_title {
  font-size: 2em;
  text-align: center;
  color: #044a64;
}
.fancy_toc {
  margin-top: 1em;
}
.fancy_toc > a {
  margin: 1em;
  margin-left: 0;
  font-size: 1.5em;
  color: #044a64;
  text-decoration: none;
  cursor: pointer;
}
@media screen and (min-width: 600px){
  /* Indentation amounts for non-mobile screens, 600 pixels or wider */
  .fancy p,.fancy ul,.fancy ol,.fancy dl { margin: 1em 5ex }
  .fancy li p { margin: 1em 0 }
  .fancy blockquote { margin-left : 10ex }
  .toct {margin-left:4ex;}
  .fancy-toc1 {margin-left:6ex;}