Documentation Source Text

Check-in [bae1400568]
Login

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

Overview
Comment:Lists with varying numbers of columns depending on screen width are converted to work off of CSS rather than using javascript.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: bae1400568ff37afbef4ffb5562388691867cd5fe4753d5dae163e27ba5bbee0
User & Date: drh 2020-02-08 21:52:13
Context
2020-02-10
17:23
Work toward splitting up the "lang.in" source file into individual source files, one for each language topic. check-in: 90730870c5 user: drh tags: trunk
2020-02-08
21:52
Lists with varying numbers of columns depending on screen width are converted to work off of CSS rather than using javascript. check-in: bae1400568 user: drh tags: trunk
2020-02-03
16:23
Add change log for 3.32.0. check-in: 69840d9eb5 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to rawpages/sqlite.css.

282
283
284
285
286
287
288




















}
th.sort.asc:after {
  content: '\2193';
}
th.sort.desc:after {
  content: '\2191'
}



























>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
}
th.sort.asc:after {
  content: '\2193';
}
th.sort.desc:after {
  content: '\2191'
}

div.columns {
  padding: 0 2em 0 2em;
  max-width: 2000px;
}
div.columns > ul {
  margin: 0;
  padding: 0 0 0 1em;
  list-style-type: none;
  padding: 10px;
  margin: 0px;
  white-space: nowrap;
}
div.columns > ul li:first-child {
  margin-top:0px;
}
.columns li {
  break-inside: avoid;
  page-break-inside: avoid;
}

Changes to wrap.tcl.

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
...
241
242
243
244
245
246
247
248
249
250
251
252
253

254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279


280
281

282
283
284
285
286
287

288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
      }
      return $hd(rootpath-aux)$glink($kw)
    }
  }
  return ""
}

# Generate a Javascript table containing the URL and Label from $lx
# This is a helper routine for hd_list_of_links.
#
proc hd_list_of_links_javascript {lx} {
  set sep {[}
  foreach entry $lx {
    foreach {link label s} $entry break
    set url [hd_keyword_to_uri $link]
    hd_puts "${sep}{\"u\":\"$url\",\"x\":\"$label\",\"s\":$s}"
    set sep ",\n"
  }
  hd_putsnl "\];"
}

# Output HTML/JS that displays the list $lx in multiple columns
# under the assumption that each column is $w pixels wide.  The
# number of columns automatically adjusts to fill the available
# screen width.
#
# If $title is not an empty string, then it is used as a title for
# the list of links
................................................................................
#    1:     Add the "(exp)" suffix
#    2:     Strike through the text and do not hyperlink
#    3:     Strike through the text and add &sup1
#    4:     Add &sup2
#    5:     Add &sup3
#
proc hd_list_of_links {title w lx} {
  global listcount hd
  if {![info exists listcount]} {
    set listcount 1
  } else {
    incr listcount
  }

  set tx listtab$listcount
  set vx listitems$listcount
  hd_puts "<style>\n#$tx tr td {vertical-align:top;}\n"
  hd_puts "</style>\n"
  hd_putsnl "<table id='$tx' width='100%'></table>"
  hd_putsnl "<script>"
  hd_puts "var $vx = "
  if {$hd(enable-main) && $hd(enable-aux)} {
    set hd(enable-main) 0
    hd_list_of_links_javascript $lx
    set hd(enable-main) 1
    set hd(enable-aux) 0
    hd_list_of_links_javascript $lx
    set hd(enable-aux) 1
  } else {
    hd_list_of_links_javascript $lx
  }
  hd_putsnl "var j = 0;"
  hd_putsnl "var w = Math.max(document.documentElement.clientWidth, \
             window.innerWidth || 0);"
  hd_putsnl "var nCol = Math.floor(w/$w);"
  hd_putsnl "if(nCol<=0) nCol=1;"
  hd_putsnl "var nRow = Math.ceil(($vx.length+1)/nCol);"
  if {$title!=""} {
    hd_putsnl "var h=\"<tr><td colspan=\"+nCol;"
    hd_putsnl "h += \">$title</td></tr><tr><td><ul class='multicol_list'>\""


  } else {
    hd_putsnl "var h=\"<tr><td><ul class='multicol_list'>\""

  }
  hd_putsnl "var ea"
  hd_putsnl "for(var i=0; i<$vx.length; i++){"
  hd_putsnl "  if( (++j)>nRow ){"
  hd_putsnl "    h += \"</ul></td>\\n<td><ul class='multicol_list'>\\n\";"
  hd_putsnl "    j = 1;"

  hd_putsnl "  }"
  hd_putsnl "  if($vx\[i\].u==\"\" || $vx\[i\].s==2){"
  hd_putsnl "    h += \"<li>\""
  hd_putsnl "    ea = \"\""
  hd_putsnl "  }else{"
  hd_putsnl "    h += \"<li><a href='\";"
  hd_putsnl "    h += $vx\[i\].u;"
  hd_putsnl "    h += \"'>\";"
  hd_putsnl "    ea = \"</a>\""
  hd_putsnl "  }"
  hd_putsnl "  if($vx\[i\].s==2 || $vx\[i\].s==3) h += \"<s>\""
  hd_putsnl "  h += $vx\[i\].x;"
  hd_putsnl "  if($vx\[i\].s==2 || $vx\[i\].s==3) h += \"</s>\""
  hd_putsnl "  h += ea"
  hd_putsnl "  if($vx\[i\].s==1) h += \"<small><i>(exp)</i></small>\\n\";"
  hd_putsnl "  if($vx\[i\].s==3) h += \"&sup1\\n\";"
  hd_putsnl "  if($vx\[i\].s==4) h += \"&sup2\\n\";"
  hd_putsnl "  if($vx\[i\].s==5) h += \"&sup3\\n\";"
  hd_putsnl "}"
  hd_putsnl "document.getElementById(\"$tx\").innerHTML = h;"
  hd_putsnl "</script>"
}

# Record the fact that all keywords given in the argument list should
# cause a jump to the current location in the current file.
#
# If only the main output file is open, then all references to the
# keyword jump to the main output file.  If both main and aux are







<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







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







208
209
210
211
212
213
214














215
216
217
218
219
220
221
...
227
228
229
230
231
232
233
234
235
236
237
238

239
240
241
242
243
244
245
246









247






248


249
250
251

252
253





254
255

















256


257
258
259
260
261
262
263
      }
      return $hd(rootpath-aux)$glink($kw)
    }
  }
  return ""
}















# Output HTML/JS that displays the list $lx in multiple columns
# under the assumption that each column is $w pixels wide.  The
# number of columns automatically adjusts to fill the available
# screen width.
#
# If $title is not an empty string, then it is used as a title for
# the list of links
................................................................................
#    1:     Add the "(exp)" suffix
#    2:     Strike through the text and do not hyperlink
#    3:     Strike through the text and add &sup1
#    4:     Add &sup2
#    5:     Add &sup3
#
proc hd_list_of_links {title w lx} {
  set w [expr {$w/20}]em
  hd_puts "<div class='columns' style='columns: ${w} auto;'>\n"
  hd_puts "<ul style='padding-top:0;'>\n"
  foreach x $lx {
    foreach {kw lbl s} $x break

    set suffix {}
    set prefix {}
    switch $s {
      1 {set suffix "<small><i>(exp)</i></small>"}
      2 {set suffix "</s>"; set prefix "<s>"; set kw ""}
      3 {set suffix "&sup1;</s>"; set prefix "<s>"}
      4 {set suffix "&sup2;"}
      5 {set suffix "&sup3;"}









    }






    if {$kw!=""} {


      set url [hd_keyword_to_uri $kw]
      hd_puts "<li><a href='$url'>$prefix$lbl$suffix</a></li>\n"
    } else {

      hd_puts "<li>$prefix$lbl$suffix</li>\n"
    }





  }
  hd_puts "</ul>\n"

















  hd_puts "</div>\n"


}

# Record the fact that all keywords given in the argument list should
# cause a jump to the current location in the current file.
#
# If only the main output file is open, then all references to the
# keyword jump to the main output file.  If both main and aux are