Documentation Source Text

Check-in [42802d730e]
Login

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

Overview
Comment:Alternative page header suitable for loading content into Fossil for display.
Timelines: family | ancestors | xdoc
Files: files | file ages | folders
SHA1: 42802d730e8faf19fe12b2bef3eee5c4b0b1a013
User & Date: drh 2016-08-30 20:14:57
Context
2016-08-30
20:14
Alternative page header suitable for loading content into Fossil for display. Leaf check-in: 42802d730e user: drh tags: xdoc
16:37
Draft chagnes to the VACUUM documentation to describe the ability to VACUUM attached databases. Leaf check-in: 08b1963db5 user: drh tags: vacuum-enhancement
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to document_header.tcl.

     1      1   
     2      2   
     3      3   proc document_header {title path {search {}}} {
     4         -  set ret [subst -nocommands {
     5         -  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
     6         -  <html><head>
     7         -  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
     8         -  <title>$title</title>
            4  +  set ret [subst -nocommands {<div class='fossil-doc' data-title='$title'>
     9      5     <style type="text/css">
    10      6       body {
    11      7           margin: auto;
    12      8           font-family: Verdana, sans-serif;
    13      9           padding: 8px 1%;
    14     10       }
    15     11       
................................................................................
    24     20         text-align:right;
    25     21         font-style:italic;
    26     22         width:300px;
    27     23         margin:12px;
    28     24         margin-top:58px;
    29     25       }
    30     26   
    31         -    .menubar {
    32         -      clear: both;
    33         -      border-radius: 8px;
    34         -      background: #044a64;
    35         -      padding: 0px;
    36         -      margin: 0px;
    37         -      cell-spacing: 0px;
    38         -    }    
    39         -    .toolbar {
    40         -      text-align: center;
    41         -      line-height: 1.6em;
    42         -      margin: 0;
    43         -      padding: 0px 8px;
    44         -    }
    45         -    .toolbar a { color: white; text-decoration: none; padding: 6px 12px; }
    46         -    .toolbar a:visited { color: white; }
    47         -    .toolbar a:hover { color: #044a64; background: white; }
    48         -    
           27  +   
    49     28       .content    { margin: 5%; }
    50     29       .content dt { font-weight:bold; }
    51     30       .content dd { margin-bottom: 25px; margin-left:20%; }
    52     31       .content ul { padding:0px; padding-left: 15px; margin:0px; }
    53     32       
    54     33       /* Things for "fancyformat" documents start here. */
    55     34       .fancy img+p {font-style:italic}
................................................................................
   111     90         border-top: 2px solid #044a64;
   112     91       }
   113     92   
   114     93       </style>
   115     94       </head>
   116     95     }]
   117     96   
   118         -  if {[file exists DRAFT]} {
           97  +  if {[file exists DRAFT] && 0} {
   119     98       set tagline {<font size="6" color="red">*** DRAFT ***</font>}
   120     99     } else {
   121    100       set tagline {Small. Fast. Reliable.<br>Choose any three.}
   122    101     }
   123         -
   124         -  append ret [subst -nocommands {<body>
   125         -    <div><!-- container div to satisfy validator -->
   126         -    
   127         -    <div class=nosearch>
   128         -    <a href="${path}index.html">
   129         -    <img class="logo" src="${path}images/sqlite370_banner.gif" alt="SQLite Logo"
   130         -     border="0"></a>
   131         -    <div><!-- IE hack to prevent disappearing logo--></div>
   132         -    <div class="tagline">${tagline}</div>
   133         -
   134         -    <table width=100% class="menubar"><tr>
   135         -      <td width=100%>
   136         -      <div class="toolbar">
   137         -        <a href="${path}about.html">About</a>
   138         -        <a href="${path}docs.html">Documentation</a>
   139         -        <a href="${path}download.html">Download</a>
   140         -        <a href="${path}copyright.html">License</a>
   141         -        <a href="${path}support.html">Support</a>
   142         -        <a href="http://www.hwaci.com/sw/sqlite/prosupport.html">Purchase</a>
   143         -      </div>
   144         -  }]
   145         -
   146         -  if {$search==""} {
   147         -    set initval   "Search with FTS5..."
   148         -    set initstyle {font-style:italic;color:#044a64}
   149         -  } else {
   150         -    set initval   $search
   151         -    set initstyle {font-style:normal;color:black}
   152         -  }
   153         -
   154    102     append ret [subst -nocommands {
   155    103       <script>
   156         -      /* 
   157         -      ** Set the cookie named "name" to value "value". Expires in "days" days.
   158         -      */
   159         -      function createCookie(name,value,days) {
   160         -        if (days) {
   161         -          var date = new Date();
   162         -          date.setTime(date.getTime()+(days*24*60*60*1000));
   163         -          var expires = "; expires="+date.toGMTString();
   164         -        }else{
   165         -          var expires = "";
   166         -        }
   167         -        document.cookie = name+"="+value+expires+"; path=/";
   168         -      }
   169         -
   170         -      /* 
   171         -      ** Return the value of cookie "name".
   172         -      */
   173         -      function readCookie(name) {
   174         -        var nameEQ = name + "=";
   175         -        var ca = document.cookie.split(';');
   176         -        for(var i=0;i < ca.length;i++) {
   177         -          var c = ca[i];
   178         -          while (c.charAt(0)==' ') c = c.substring(1,c.length);
   179         -          if (c.indexOf(nameEQ)==0) return c.substring(nameEQ.length,c.length);
   180         -        }
   181         -        return null;
   182         -      }
   183         -
   184         -      /* 
   185         -      ** Delete cookie "name".
   186         -      */
   187         -      function eraseCookie(name) {
   188         -        createCookie(name,"",-1);
   189         -      }
   190         -
   191         -      gMsg = "Search with FTS5..."
   192         -      function entersearch() {
   193         -        var q = document.getElementById("q");
   194         -        if( q.value == gMsg ) { q.value = "" }
   195         -        q.style.color = "black"
   196         -        q.style.fontStyle = "normal"
   197         -      }
   198         -      function leavesearch() {
   199         -        var q = document.getElementById("q");
   200         -        if( q.value == "" ) { 
   201         -          q.value = gMsg
   202         -          q.style.color = "#044a64"
   203         -          q.style.fontStyle = "italic"
   204         -        }
   205         -      }
   206    104         function hideorshow(btn,obj){
   207    105           var x = document.getElementById(obj);
   208    106           var b = document.getElementById(btn);
   209    107           if( x.style.display!='none' ){
   210    108             x.style.display = 'none';
   211    109             b.innerHTML='show';
   212    110           }else{
   213    111             x.style.display = '';
   214    112             b.innerHTML='hide';
   215    113           }
   216    114           return false;
   217    115         }
   218    116       </script>
   219         -    <td>
   220         -        <div style="padding:0 1em 0px 0;white-space:nowrap">
   221         -        <form name=f method="GET" action="${path}search">
   222         -          <input id=q name=q type=text
   223         -           onfocus="entersearch()" onblur="leavesearch()" style="width:24ex;padding:1px 1ex; border:solid white 1px; font-size:0.9em ; $initstyle;" value="$initval">
   224         -          <input type=submit value="Go" style="border:solid white 1px;background-color:#044a64;color:white;font-size:0.9em;padding:0 1ex">
   225         -        </form>
   226         -        </div>
   227         -      </table>
   228         -    </div>    <!-- matches "div class=nosearch" -->
   229    117     }]
   230    118   
   231         -  return $ret
          119  +   return $ret
   232    120   }