Documentation Source Text

Check-in [5abf48cdb6]
Login

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

Overview
Comment:Fix layout issues in footer. Restrict footer to the front page only (not every page).
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | experimental
Files: files | file ages | folders
SHA1: 5abf48cdb65d09e3f7f991b5556f62310e050443
User & Date: dan 2016-08-15 18:43:28.352
Context
2016-08-15
19:01
Undo a change made accidentally to docs.html. (check-in: d118188bb0 user: dan tags: experimental)
18:43
Fix layout issues in footer. Restrict footer to the front page only (not every page). (check-in: 5abf48cdb6 user: dan tags: experimental)
16:02
Add links to each section at the top of the docs.html page. (check-in: 336ce36b23 user: dan tags: experimental)
Changes
Unified Diff Ignore Whitespace Patch
Changes to pages/footer.tcl.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

21
22
23
24
25
26
27

28

29
30
31
32

33

34
35
36
37
38
39
40



41

42





















































43
44


catch { array unset ::footer }

set ::footer(current) ""

proc heading {text tag {caption {}}} {
  set ::footer(current) $tag
  set ::footer(name,$tag) $text
}

proc doc {name url desc} {
  set name [string map [list "\n" " " "<br>" " "] $name]
  lappend ::footer(docs,$::footer(current)) $name $url
}

source [file join [file dirname [info script]] docsdata.tcl]

proc footer_list {tag} {
  set ret    "<div class=doccat>\n"

  append ret "<h><a href=docs.html#$tag>$::footer(name,$tag)</a>\n</h>"
  append ret "<ul>\n"
  foreach {name url} $::footer(docs,$tag) {
    append ret "<li> <a href=$url>$name</a>\n"
  }
  append ret "</ul>\n"
  append ret "</div>\n"



  return $ret
}

hd_puts "<div class=footer>"

hd_puts "<table class=footertab align=center><tr><td valign=top>"

hd_puts [footer_list overview]
hd_puts [footer_list programming]
hd_puts "<td valign=top>"
hd_puts [footer_list advocacy]
hd_puts [footer_list technical]
hd_puts "<td valign=top>"
hd_puts [footer_list extensions]



hd_puts </table>

hd_puts </div>




























































<




<








|
>







>

>



|
>
|
>


<
|

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


1
2
3
4
5

6
7
8
9

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

39
40

41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102


catch { array unset ::footer }

set ::footer(current) ""

proc heading {text tag {caption {}}} {
  set ::footer(current) $tag
  set ::footer(name,$tag) $text
}

proc doc {name url desc} {
  set name [string map [list "\n" " " "<br>" " "] $name]
  lappend ::footer(docs,$::footer(current)) $name $url
}

source [file join [file dirname [info script]] docsdata.tcl]

proc footer_list {tag} {
  set ret    "<div style=\"float:left\" id=docs_f$::footer(tcnt)>"
  append ret "<div class=doccat id=docs_$::footer(tcnt)>\n"
  append ret "<h><a href=docs.html#$tag>$::footer(name,$tag)</a>\n</h>"
  append ret "<ul>\n"
  foreach {name url} $::footer(docs,$tag) {
    append ret "<li> <a href=$url>$name</a>\n"
  }
  append ret "</ul>\n"
  append ret "</div>\n"
  append ret "</div>\n"

  incr ::footer(tcnt)
  return $ret
}

hd_puts "<div class=footer id=docs>"
hd_puts <h3>Resources</h3>

set ::footer(tcnt) 0
hd_puts [footer_list overview]
hd_puts [footer_list programming]

hd_puts [footer_list extensions]
hd_puts [footer_list technical]

hd_puts [footer_list advocacy]

hd_puts "<div class=footer style=\"clear:both\"></div>"

hd_puts {
  <script>

  function relayout_docs() {
    var nDoc = 5;
    var i;
    var j;

    for(i=0; i<nDoc; i++){
      var e = document.getElementById("docs_" + i);
      var f = document.getElementById("docs_f" + i);
      f.appendChild(e);
    }

    var sz = new Array;
    for(i=0; i<nDoc; i++){
      var ew = document.getElementById("docs_" + i).offsetWidth;
      sz[i] = ew;
    }
    sz.sort(function(a, b){return b-a;});

    var boxw = document.getElementById("docs").clientWidth;
    var w = boxw;
    var nCol;
    for(nCol=0; nCol<nDoc; nCol++){
      w -= sz[nCol];
      if( w<=0 ) break;
    }
    if( nCol<=0 ) nCol = 1;

    for(i=0; i<nCol; i++){
      var e = document.getElementById("docs_" + i);
      var f = document.getElementById("docs_f" + (i % nCol));
      f.appendChild(e);
      sz[i] = e.offsetHeight;
    }

    for(i=nCol ; i<nDoc; i++){
      var j;
      var iMin = 0;
      for(j=1; j<nCol; j++){
        if( sz[j]<sz[iMin] ){ iMin = j; }
      }
      var e = document.getElementById("docs_" + i);
      var f = document.getElementById("docs_f" + iMin);
      f.appendChild(e);
      sz[iMin] += e.offsetHeight;
    }


  }
  window.onresize = relayout_docs;
  relayout_docs();

  </script>
}


Changes to pages/index.in.
143
144
145
146
147
148
149



150
<li> <a href="http://www.sqlite.org/src/wiki?name=Bug+Reports">Report a Bug</a> </li>
<li> <a href="news.html">News</a> </li>
</ul></p>

</td></tr>
</table>












>
>
>

143
144
145
146
147
148
149
150
151
152
153
<li> <a href="http://www.sqlite.org/src/wiki?name=Bug+Reports">Report a Bug</a> </li>
<li> <a href="news.html">News</a> </li>
</ul></p>

</td></tr>
</table>

<tcl>
source [file normalize [file join $::DOC pages footer.tcl]]
</tcl>

Changes to wrap.tcl.
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
  putsin4 $fd {<style type="text/css">
    body {
        margin: auto;
        font-family: Verdana, sans-serif;
        padding: 8px 1%;
    }
    
    a { text-decoration: none }
    a { color: #044a64 }
    a:visited { color: #734559 }
    
    .logo { position:absolute; margin:3px; }
    .tagline {
      float:right;
      text-align:right;







|







408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
  putsin4 $fd {<style type="text/css">
    body {
        margin: auto;
        font-family: Verdana, sans-serif;
        padding: 8px 1%;
    }
    
    li a { text-decoration: none }
    a { color: #044a64 }
    a:visited { color: #734559 }
    
    .logo { position:absolute; margin:3px; }
    .tagline {
      float:right;
      text-align:right;
485
486
487
488
489
490
491
492
493
494
495
496
497
498




499
500
501
502
503
504

505
506
507
508
509
510
511
512
513
514
515
516
      font-weight: bold;
    }
    .doccat h a {
      font-size: smaller;
      color: black;
    }
    .doccat {
      margin-left: 2ex;
      margin-right: 2ex;
      white-space:nowrap;
    }
    .doccat li {
      list-style-type: none;
      font-size: smaller;




    }

    .footer {
      background-color: #044a64;
      padding-top: 2px;
      padding-bottom: 1px;

    }
    .footertab {
      padding-top: 1ex;
      background-color: white;
    }
    </style>
  }
  puts $fd {</head>}
  if {[file exists DRAFT]} {
    set tagline {<font size="6" color="red">*** DRAFT ***</font>}
  } else {
    set tagline {Small. Fast. Reliable.<br>Choose any three.}







|
|





>
>
>
>



<


>

<
<
<
|







485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505

506
507
508
509



510
511
512
513
514
515
516
517
      font-weight: bold;
    }
    .doccat h a {
      font-size: smaller;
      color: black;
    }
    .doccat {
      padding-left: 2ex;
      padding-right: 2ex;
      white-space:nowrap;
    }
    .doccat li {
      list-style-type: none;
      font-size: smaller;
      line-height: 150%; 
    }
    .doccat ul {
      margin-top: 0.5em;
    }

    .footer {

      padding-top: 2px;
      padding-bottom: 1px;
      border-top: 2px solid #044a64;
    }




    </style>
  }
  puts $fd {</head>}
  if {[file exists DRAFT]} {
    set tagline {<font size="6" color="red">*** DRAFT ***</font>}
  } else {
    set tagline {Small. Fast. Reliable.<br>Choose any three.}
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
  regsub {<title>[^\n]*</title>} $in {} in
  set outfile [file root [file tail $infile]].html
  hd_open_main $outfile
  hd_header $title $infile
  regsub -all {<tcl>} $in "\175; eval \173" in
  regsub -all {</tcl>} $in "\175; hd_resolve \173" in
  eval "hd_resolve \173$in\175"
  source $footertcl
  cd $::HOMEDIR
  hd_close_main
}

# Generate a document showing the hyperlink keywords and their
# targets.
#







|







828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
  regsub {<title>[^\n]*</title>} $in {} in
  set outfile [file root [file tail $infile]].html
  hd_open_main $outfile
  hd_header $title $infile
  regsub -all {<tcl>} $in "\175; eval \173" in
  regsub -all {</tcl>} $in "\175; hd_resolve \173" in
  eval "hd_resolve \173$in\175"
  # source $footertcl
  cd $::HOMEDIR
  hd_close_main
}

# Generate a document showing the hyperlink keywords and their
# targets.
#