Apply modern pgweb styles to web-based documentation.
authorSarah Conway <sarah.conway@crunchydata.com>
Thu, 11 Oct 2018 20:01:29 +0000 (13:01 -0700)
committerJonathan S. Katz <jonathan.katz@excoventures.com>
Tue, 16 Oct 2018 13:40:52 +0000 (09:40 -0400)
This patch brings the web-based documentation to match the current styles
on the main postgresql.org website. The CSS supports the generated markup
from the main PostgreSQL documentation and supports the new/old class
that are visible in the documentation (e.g. uppercase classes pre-v10).

Authors: Sarah Conway, Jonathan Katz

media/css/main.css
pgweb/docs/views.py
templates/docs/docspage.html

index f7a2c4f560f0b6b975c294b6c9d7a9de552750f6..e65d67673015256bd94285254ef28de78da5f889 100644 (file)
@@ -591,17 +591,392 @@ ul.actions {
     padding-left: 1.3em;
 }
 
+/* DOCUMENTATION */
+/*
+ * The documentation classes are divided up by newer/older version of the docs
+ * Newer version of the docs are "lowercase" classed
+ * Older version of the docs are "UPPERCASE" classed
+ * Also, newer styles will be in classes vs. older ones that have i
+ */
+
+.docs-version-selected {
+  font-weight: 900;
+  text-decoration: underline;
+}
+
+/**
+ * docContent represents the main "box" where the documentation is rendered.
+ * We namespace everything to ensure these styles do not interfere across the
+ * rest of the site
+ */
+
+/**
+ * General styles
+ */
+#docContent {
+    font-size: 0.9rem;
+    margin-top: 1rem;
+}
+
+#docContent p {
+    margin-bottom: 1rem !important;
+}
+
+#docContent hr {
+    margin: 0 0 0.5em 0;
+}
+
+/* #docContent hr.c1 {
+    margin: 0 0 3em 0;
+} */
+
+/* For code, order matters here.
+ * For instance, we don't want to have any any padding on code blocks that
+ * are within the "screen" element
+ * This is also higher up as some inherited rules affected the display of the
+ * code in certain areas
+ */
+
+#docContent br.table-break {
+    display: none;
+}
+
+#docContent pre {
+    padding: 0.8rem !important;
+}
+
+pre,
+code,
+#docContent kbd,
+#docContent tt.LITERAL,
+#docContent tt.REPLACEABLE {
+    padding: .2rem .4rem;
+    font-size: 0.9rem !important;
+    color: inherit !important;
+    background-color: #f8f9fa !important;
+    border-radius: .25rem;
+    margin: .6rem 0;
+    font-weight: 300;
+}
+
+#docContent .note pre,
+#docContent .note code,
+#docContent .note kbd,
+#docContent .note tt.LITERAL,
+#docContent .note tt.REPLACEABLE,
+#docContent .warning pre,
+#docContent .warning code,
+#docContent .warning kbd,
+#docContent .warning tt.LITERAL,
+#docContent .warning tt.REPLACEABLE,
+#docContent .tip pre,
+#docContent .tip code,
+#docContent .tip kbd,
+#docContent .tip tt.LITERAL,
+#docContent .tip tt.REPLACEABLE,
+#docContent .caution pre,
+#docContent .caution code,
+#docContent .caution kbd,
+#docContent .caution tt.LITERAL,
+#docContent .caution tt.REPLACEABLE {
+    background-color: transparent !important;
+    border: none;
+    padding: 0 !important;
+}
+
+#docContent .SCREEN code,
+#docContent .screen code {
+  padding: 0;
+}
+
+#docContent .USERINPUT > code,
+#docContent .userinput > code {
+    font-weight: bolder;
+}
+
+#docContent .REPLACEABLE,
+#docContent tt.REPLACEABLE,
+#docContent .replaceable {
+    font-weight: 900;
+    font-style: italic;
+}
+
+#docContent .REPLACEABLE > code,
+#docContent .replaceable > code {
+    font-weight: 900;
+}
+
+/**
+ * Documentation Tables
+ */
+ #docContent table.table,
+ #docContent table.informaltable,
+ #docContent table.CALSTABLE {
+     background-color: #e0ecef;
+     border: 2px solid #dee2e6;
+     border-spacing: 0;
+     border-collapse: collapse;
+     width: initial;
+     margin: 2ex 0;
+ }
+
+#docContent table.table th,
+#docContent table.informaltable th,
+#docContent table.CALSTABLE th {
+    background-color: #e9ecef;
+    padding: 0.5ex 0.5ex;
+}
+
+#docContent table.table td,
+#docContent table.informaltable td,
+#docContent table.CALSTABLE td {
+    background-color: #FFF;
+    padding: 0.5ex 0.5ex;
+}
+
+/** We use some overrides for code in tables, which makes it more readable */
+#docContent table.table tt,
+#docContent table.informaltable tt,
+#docContent table.CALSTABLE tt,
+#docContent table.table code,
+#docContent table.informaltable code,
+#docContent table.CALSTABLE code {
+    background-color: inherit !important;
+    color: inherit !important;
+    font-size: inherit !important;
+    margin: 0;
+    padding: 0;
+    word-break: unset;
+}
+
+/**
+ * Titles, Navigation
+ */
+#docContent .title {
+    display: block;
+}
+
+#docContent .title:after {
+    display: none;
+}
+
+#docContent h2.SECT2 tt,
+#docContent .title code {
+    background-color: inherit !important;
+    color: inherit !important;
+    font-size: inherit !important;
+}
+
+#docContent .NAVHEADER table th,
+#docContent .navheader table th {
+    text-align: center;
+}
+
+/**
+ * Table of contents
+ */
+#docContent .TOC,
+#docContent .toc {
+    margin-bottom: 1rem;
+}
+
+#docContent div.TOC > dl > dd,
+#docContent div.toc > dl > dd {
+    margin-left: 2rem;
+}
+
+#docContent div.TOC > dl > dt.c2,
+#docContent div.toc > dl > dt.c2 {
+    margin-bottom: 1rem;
+}
+
+#docContent .TOC tt, #docContent .TOC dt a,
+#docContent .toc tt, #docContent .toc dt a {
+    font-weight: 300!important;
+}
+
+#docContent .TOC dd, #docContent .TOC dl,
+#docContent .toc dd, #docContent .toc dl {
+    margin: 0;
+}
+
+#docContent .TOC span.refpurpose,
+#docContent .toc span.refpurpose {
+    font-weight: normal;
+}
+
+/** Do not show any highlighting on code literals in TOC */
+#docContent .TOC tt,
+#docContent .toc code {
+  background-color: inherit !important;
+  color: inherit !important;
+}
+
+/**
+  * Various callout boxes for docs, including warning, caution, note, tip
+  */
+#docContent table.CAUTION, table.WARNING,
+#docContent blockquote.CAUTION, #docContent blockquote.NOTE, #docContent blockquote.TIP, #docContent blockquote.WARNING,
+#docContent .caution, #docContent .note, #docContent .tip, #docContent .warning
+{
+    border-width: 1px;
+    border-style: solid;
+    font-style: initial;
+    margin: 4ex auto;
+    max-width: 40rem;
+    padding: 1rem;
+    -moz-border-radius: 8px;
+    -webkit-border-radius: 8px;
+    -khtml-border-radius: 8px;
+    border-radius: 8px;
+}
+
+#docContent table.WARNING {
+    border-color: #ced4da;
+}
+
+#docContent table.CAUTION, table.WARNING {
+    display: block;
+    overflow: auto;
+    padding: 0;
+}
+
+#docContent table.CAUTION td, #docContent table.CAUTION th,
+#docContent table.WARNING td, #docContent table.WARNING th {
+  border-width: 0;
+  padding-left: 2ex;
+  padding-right: 2ex;
+}
+
+#docContent table.CAUTION td, #docContent table.CAUTION th {
+  background-color: #fff3cd;
+  border-color: #F3E4D5
+}
+
+#docContent table.WARNING td, #docContent table.WARNING th {
+  background-color: #fff3cd;
+  border-color: #FFD7D7;
+}
+
+#docContent table.CAUTION, table.WARNING,
+#docContent blockquote.CAUTION p, #docContent blockquote.NOTE p, #docContent blockquote.TIP p, #docContent blockquote.WARNING p,
+#docContent .caution p, #docContent .note p, #docContent .tip p, #docContent .warning p
+{
+  margin-bottom: 0 !important;
+}
+
+#docContent blockquote.CAUTION,
+#docContent table.CAUTION,
+#docContent .caution {
+    border-color: #e2b21f;
+    background-color: #fff3cd;
+}
+
+#docContent blockquote.NOTE,
+#docContent .note {
+    border-color: #ced4da;
+    background-color: #d1ecf1;
+}
+
+#docContent blockquote.TIP,
+#docContent .tip {
+    border-color: #84c578;
+    background-color: #e8f7e6;
+}
+
+#docContent blockquote.WARNING,
+#docContent .warning {
+    background-color: #fbeded;
+    border-color: #df421e;
+}
+
+#docContent blockquote.TIP h3, #docContent blockquote.NOTE h3, #docContent blockquote.CAUTION h3, #docContent blockquote.WARNING h3,
+#docContent .tip h3, #docContent .note h3, #docContent .caution h3, #docContent .warning h3 {
+    text-align: center;
+    margin: 0.25rem 0 0.5rem 0;
+    color: initial;
+}
+
+#docContent blockquote.WARNING td.c2, #docContent blockquote.WARNING td,
+#docContent .warning td.c2, #docContent .warning td {
+    border: 1px solid #d58181;
+}
+
+#docContent blockquote.WARNING td.c2,
+#docContent .warning td.c2 {
+    color: #495057;
+    background-color: #fbeded;
+}
+
+#docContent blockquote.WARNING td.c2, #docContent blockquote.WARNING td,
+#docContent .warning td.c2, #docContent .warning td {
+    border: 1px solid #bd4147;
+}
+
+#docContent .warning td.c2 {
+    background-color: #fbeded;
+}
+
+/**
+ * Background color of code should be transparent
+ */
+
+#docContent table.WARNING code,
+#docContent blockquote.NOTE code {
+   background-color: transparent !important;
+}
+
+/**
+ * Listing out variables
+ */
+#docContent .VARIABLELIST dt,
+#docContent .variablelist dt {
+    font-family: monospace;
+    font-weight: 300;
+}
+
+#docContent ul.itemizedlist {
+    margin-left: 2.5rem;
+}
+
+#docContent ul.itemizedlist > li > p {
+    margin-left: 0 !important;
+}
+
+#docContent .VARIABLELIST p,
+#docContent .variablelist p,
+#docContent .VARIABLELIST pre,
+#docContent .variablelist pre {
+    margin: 1rem 0 1rem 2rem !important;;
+}
+/**
+ * Footnotes
+ */
+#docContent .FOOTNOTES hr,
+#docContent .footnotes hr {
+    margin-bottom: 1.25rem;
+}
+
 /* #PGCONTENTWRAP */
 
-#pgContentWrap a {
+#pgContentWrap a:not([href]):not([tabindex]),
+#docContent a:not([href]):not([tabindex]) {
+    color: inherit;
+    text-decoration: none;
+    color: #336791 !important;
+}
+
+#pgContentWrap a, #docContent a {
     color: #840032;
 }
 
 #pgContentWrap {
-  padding: 1em 2em;
+    padding: 1em 2em;
+    margin: 0 auto;
+    width: 100%;
 }
 
-#pgContentWrap h3 {
+#pgContentWrap h3, #pgContentWrap h4 {
   margin: 1em 0;
 }
 
@@ -834,6 +1209,10 @@ h1.subject {
     input#q {
       display: none;
     }
+
+    #docSearchForm input#q {
+      display: block;
+    }
 }
 
 @media (min-width: 992px) {
@@ -864,6 +1243,10 @@ h1.subject {
       padding-top: 2.8rem;
       margin-bottom: 1rem;
     }
+
+    #docContent table.table {
+        font-size: 70%;
+    }
 }
 
 @media (max-width: 768px) {
@@ -922,6 +1305,10 @@ h1.subject {
     padding-left: 1em;
   }
 
+  #docContent table.table {
+      font-size: 50%;
+  }
+
 }
 
 @media (min-width: 576px) {
index 7cc1692b4fe5e92d75026696b443d4c613dee9f4..9c3113f4aa09c53a53cf7c749fd47e729388b062 100644 (file)
@@ -59,7 +59,7 @@ def docpage(request, version, typ, filename):
                select={
                        'supported':"COALESCE((SELECT supported FROM core_version v WHERE v.tree=version), 'f')",
                        'testing':"COALESCE((SELECT testing FROM core_version v WHERE v.tree=version),0)",
-       }).order_by('-supported', '-version').only('version', 'file')
+       }).order_by('-supported', 'version').only('version', 'file')
 
        if typ=="interactive":
                # Interactive documents are disabled, so redirect to static page
index 3c5535b43a6f60328bde1bf28903db5bcf81277a..79b48df62aee174fee95748904ef0c560418d074 100644 (file)
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en" dir="ltr">
-<head>
-    <title>PostgreSQL: Documentation: {{page.display_version}}: {{page.title}}</title>
-    <style type="text/css" media="screen" title="Normal Text">@import url("/dyncss/docs.css?{{gitrev}}");</style>
-    <script type="text/javascript" src="/media/js/monospacefix.js?{{gitrev}}"></script>
+<!doctype html>
+<html lang="en">
+ <head>
+  <title>PostgreSQL: Documentation: {{page.display_version}}: {{page.title}}</title>
+  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
+  <meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8" />
+  {%block meta%}{%endblock%} {# used for custom meta tags such as description which we don't want for every page #}
+  <meta name="theme-color" content="#336791"/>
+  <meta name="copyright" content="The PostgreSQL Global Development Group" />
+  <link href="/media/css/fontawesome.css?{{gitrev}}" rel="stylesheet">
+  <link rel="stylesheet" href="/media/css/bootstrap.min.css?{{gitrev}}">
+  <link rel="shortcut icon" href="/favicon.ico" />
+  {%if newstags %}
+    {%comment%}Default RSS links are only shown on pages that have newstags set{%endcomment%}
+    <link rel="alternate" type="application/rss+xml" title="All PostgreSQL News" href="/news.rss" />
+    {%for t in newstags%}
+      <link rel="alternate" type="application/rss+xml" title="PostgreSQL News about {{t.name}}" href="/news/{{t.urlname}}.rss" />
+    {%endfor%}
+    <link rel="alternate" type="application/rss+xml" title="PostgreSQL Events" href="/events.rss" />
+  {%endif%}
+  <style type="text/css" media="screen" title="Normal Text">@import url("/dyncss/base.css?{{gitrev}}");</style>
+  {%block extrahead%}{%endblock%}
+  </head>
+  <body>
+    <div class="container-fluid">
+      <div class="row justify-content-md-center">
+        <div class="col">
+          <!-- Header -->
+          <nav class="navbar navbar-expand-lg navbar-light bg-light fixed-top">
+            <a class="navbar-brand p-0" href="/">
+              <img class="logo" src="/media/img/about/press/elephant.png" alt="PostgreSQL Elephant Logo">
+            </a>
+            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#pgNavbar" aria-controls="pgNavbar" aria-expanded="false" aria-label="Toggle navigation">
+              <span class="navbar-toggler-icon"></span>
+            </button>
+            <div class="collapse navbar-collapse" id="pgNavbar">
+              <ul class="navbar-nav mr-auto">
+                <li class="nav-item p-2"><a href="/" title="Home">Home</a></li>
+                <li class="nav-item p-2"><a href="/about/" title="About">About</a></li>
+                <li class="nav-item p-2"><a href="/download/" title="Download">Download</a></li>
+                <li class="nav-item p-2"><a href="/docs/" title="Documentation">Documentation</a></li>
+                <li class="nav-item p-2"><a href="/community/" title="Community">Community</a></li>
+                <li class="nav-item p-2"><a href="/developer/" title="Developers">Developers</a></li>
+                <li class="nav-item p-2"><a href="/support/" title="Support">Support</a></li>
+                <li class="nav-item p-2"><a href="/about/donate/" title="Donate">Donate</a></li>
+                <li class="nav-item p-2"><a href="/account/" title="Your account">Your account</a></li>
+              </ul>
+             <form role="search" method="get" action="/search/">
+               <div class="input-group">
+                 <input id="q" name="q" type="text" size="20" maxlength="255" accesskey="s"  class="form-control" placeholder="Search for...">
+                 <span class="input-group-btn">
+                   <button class="btn btn-default" type="submit"><i class="fas fa-search"></i></button>
+                 </span>
+               </div><!-- /input-group -->
+             </form>
+            </div>
+          </nav>
+        </div>
+      </div>
+      <div class="row justify-content-center pg-shout-box">
+        <div class="col text-white text-center">{%include "base/esi.html" with includepage="/include/topbar" %}</div>
+      </div>
+    </div>
+    <div class="container-fluid margin">
+      <div class="row">
+        <div id="pgContentWrap" class="col-11">
+          <div class="row">
+            <div class="col-md-6 mb-2">
+              <div class="row">
+                <div class="col">
+                  <div>
+                    <a href="/docs/" title="Documentation">Documentation</a> &rarr; <a href="/docs/{{page.display_version}}/static/{{doc_index_filename}}">PostgreSQL {{page.display_version}}</a>{%if loaddate%} ({{loaddate|date:"Y-m-d H:i:s"}}){%endif%}
+                  </div>
+                </div>
+              </div>
+              {% if supported_versions %}
+                <div class="row">
+                  <div class="col">
+                    Supported Versions:
+                      {% for ver in supported_versions %}
+                        {% if not forloop.first %} / {% endif %}
+                        {% if ver.version.current %}
+                          <a href="/docs/current/static/{{ver.file}}" title="PostgreSQL {{ver.display_version}} - {{page.title}}" {% if ver.version == page.version %}class="docs-version-selected"{% endif %}>Current</a>
+                          (<a href="/docs/{{ver.display_version}}/static/{{ver.file}}" title="PostgreSQL {{ver.display_version}} - {{page.title}}" {% if ver.version == page.version %}class="docs-version-selected"{% endif %}>{{ver.display_version}}</a>)
+                        {% else %}
+                          <a href="/docs/{{ver.display_version}}/static/{{ver.file}}" title="PostgreSQL {{ver.display_version}} - {{page.title}}" {% if ver.version == page.version %}class="docs-version-selected"{% endif %}>{{ver.display_version}}</a>
+                        {% endif %}
+                      {% endfor %}
+                  </div>
+                </div>
+              {% endif %}
+              {% if devel_versions %}
+                <div class="row">
+                  <div class="col">
+                    Development Versions:
+                    {% for ver in devel_versions %}
+                      {% if not forloop.first %} / {% endif %}
+                      <a href="/docs/{{ver.display_version}}/static/{{ver.file}}" title="PostgreSQL {{ver.display_version}} - {{page.title}}" {% if ver.version == page.version %}class="docs-version-selected"{% endif %} rel="nofollow">{{ver.display_version}}</a>
+                    {% endfor %}
+                  </div>
+                </div>
+              {% endif %}
+              {% if unsupported_versions %}
+                <div class="row">
+                  <div class="col-12">
+                    Unsupported versions:
+                    {% for ver in unsupported_versions %}
+                      {% if not forloop.first %} / {% endif %}
+                      <a href="/docs/{{ver.display_version}}/static/{{ver.file}}" title="PostgreSQL {{ver.display_version}} - {{page.title}}" {% if ver.version == page.version %}class="docs-version-selected"{% endif %} rel="nofollow">{{ver.display_version}}</a>
+                    {% endfor %}
+                  </div>
+                </div>
+              {% endif %}
+            </div>
+            <div class="col-md-6 col-lg-5 offset-lg-1">
+              <form id="docSearchForm" role="search" method="get" action="/search/">
+                <div class="input-group">
+                  <input type="text" id="q" name="q" onfocus="if( this.value==this.defaultValue ) this.value='';" class="form-control" placeholder="Search the documentation for..."/>
+                  <span class="input-group-btn">
+                    <button class="btn btn-default" type="submit"><i class="fas fa-search"></i></button>
+                  </span>
+                </div><!-- /input-group -->
+              </form>
+            </div>
+          </div>
+          <div id="docContent">
+            {{page.content|safe}}
+          </div>
+          {% if page.version.supported %}
+            <div id="docComments">
+              <h2>Submit correction</h2>
+              <p>
+              If you see anything in the documentation that is not correct, does not match
+              your experience with the particular feature or requires further clarification,
+              please use
+              <a href="/account/comments/new/{{page.version.numtree|default:"devel"}}/{{page.file}}/" rel="nofollow">this form</a>
+              to report a documentation issue.
+              </p>
+            </div>
+          {% endif %}
+        </div> <!-- pgContentWrap -->
+      </div>
+    </div>
+    <!-- Footer -->
+    <footer id="footer">
+      <div class="container">
+        <div class="row">
+          <div class="col-md-12">
+            <ul>
+              <li><a href="https://twitter.com/postgresql"><img src="/media/img/atpostgresql.png" alt="@postgresql"></a></li>
+              <li><a href="https://git.postgresql.org/gitweb/?p=postgresql.git"><img src="/media/img/git.png" alt="Git"></a></li>
+            </ul>
+          </div>
+        </div>
+      </div>
+      <!-- Copyright -->
+      <div class="container">
+        <a href="/about/privacypolicy">Privacy Policy</a> |
+        <a href="/about/">About PostgreSQL</a> |
+        <a href="/about/contact/">Contact</a><br/>
+        <p>Copyright &copy; 1996-{% now "Y" %} The PostgreSQL Global Development Group</p>
+      </div>
+    </footer>
+    <script src="/media/js/jquery-3.2.1.slim.min.js?{{gitrev}}"></script>
+    <script src="/media/js/popper.min.js?{{gitrev}}"></script>
+    <script src="/media/js/bootstrap.min.js?{{gitrev}}"></script>
+    <script src="/media/js/main.js?{{gitrev}}"></script>
     <script type="text/javascript">
-  var _gaq = _gaq || [];
-  _gaq.push(['_setAccount', 'UA-1345454-1']);
-  _gaq.push(['_trackPageview']);
-  (function() {
-    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
-    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
-    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
-  })();
-</script>
-</head>
-<body>
-<div id="docHeader">
-       <div id="docHeaderLogo">
-               <a href="/" title="PostgreSQL"><img src="/media/img/docs/hdr_logo.png" width="206" height="80" alt="PostgreSQL" /></a>
-       </div>
-</div>
-
-<div id="docContainerWrap">
-<div id="docContainer">
-<div id="docNavSearchContainer">
-<div id="docSearch">
-       <form action="/search/" method="get">
-       <div>
-       <input type="hidden" name="u" value="/docs/{{page.display_version}}/" />
-       <label for="q">Search Documentation:&nbsp;</label><input type="text" id="q" name="q" size="20" onfocus="if( this.value==this.defaultValue ) this.value='';" value="Search" /><input id="submit" type="submit" value="Search" />
-       </div>
-       </form>
-</div>
-<div id="docNav">
-<a href="/" title="Home">Home</a> &rarr; <a href="/docs/" title="Documentation">Documentation</a> &rarr; <a href="/docs/manuals/" title="Manuals">Manuals</a> &rarr; <a href="/docs/{{page.display_version}}/static/{{doc_index_filename}}">PostgreSQL {{page.display_version}}</a>{%if loaddate%} ({{loaddate|date:"Y-m-d H:i:s"}}){%endif%}
-</div>
-<div id="docVersions">
-This page in other versions:
-{%if supported_versions%}
-{%for ver in supported_versions %}
-       {%if not forloop.first %}/{%endif%}
-       {%if ver.version.current %}
-               {%if ver.version == page.version %}
-               <strong>current ({{ver.display_version}})</strong>
-               {%else%}
-               <a href="/docs/current/static/{{ver.file}}" title="This page in current version">current</a>
-               (<a href="/docs/{{ver.display_version}}/static/{{ver.file}}" title="This page in version {{ver.display_version}}">{{ver.display_version}}</a>)
-               {%endif%}
-       {%else%}
-               {%if ver.version == page.version %}
-               <strong>{{ver.display_version}}</strong>
-               {%else%}
-               <a href="/docs/{{ver.display_version}}/static/{{ver.file}}" title="This page in version {{ver.display_version}}">{{ver.display_version}}</a>
-               {%endif%}
-       {%endif%}
-{%endfor%}
-{%endif%}
-
-{%if devel_versions%}
-{%if supported_versions%}&nbsp;|&nbsp; {%endif%}Development versions:
-{%for ver in devel_versions %}
-       {%if not forloop.first %}/{%endif%}
-       {%if ver.version == page.version %}
-       <strong>{{ver.display_version}}</strong>
-       {% else %}
-       <a href="/docs/{{ver.display_version}}/static/{{ver.file}}" title="This page in version {{ver.display_version}}" rel="nofollow">{{ver.display_version}}</a>
-       {%endif%}
-{%endfor%}
-{%endif%}
-
-{%if unsupported_versions%}
-{%if supported_versions or devel_versions%}&nbsp;|&nbsp; {%endif%}Unsupported versions:
-{%for ver in unsupported_versions %}
-       {%if not forloop.first %}/{%endif%}
-       {%if ver.version == page.version %}
-       <strong>{{ver.display_version}}</strong>
-       {% else %}
-       <a href="/docs/{{ver.display_version}}/static/{{ver.file}}" title="This page in version {{ver.display_version}}" rel="nofollow">{{ver.display_version}}</a>
-       {%endif%}
-{%endfor%}
-{%endif%}
-</div>
-</div>
-
-<div id="docContent">
-{{page.content|safe}}
-</div>
-
-{%if page.version.supported%}
-<div id="docComments">
-
-<h2>Submit correction</h2>
-<p>
-If you see anything in the documentation that is not correct, does not match
-your experience with the particular feature or requires further clarification,
-please use
-<a href="/account/comments/new/{{page.version.numtree|default:"devel"}}/{{page.file}}/" rel="nofollow">this form</a>
-to report a documentation issue.
-</p>
-</div>
-{%endif%}
-
-<div id="docFooter">
-    <a href="{{link_root}}/about/privacypolicy">Privacy Policy</a> |
-    <a href="{{link_root}}/about/">About PostgreSQL</a><br/>
-Copyright &copy; 1996-{% now "Y" %} The PostgreSQL Global Development Group
-</div>
-</div>
-</div>
-</body>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-1345454-1']);
+      _gaq.push(['_trackPageview']);
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+    <script type="text/javascript">
+      var shiftWindow = function() { scrollBy(0, -80) };
+      if (location.hash) shiftWindow();
+      window.addEventListener("hashchange", shiftWindow);
+    </script>
+  </body>
 </html>