summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@mongodb.com>2016-11-01 14:59:00 +1100
committerGitHub <noreply@github.com>2016-11-01 14:59:00 +1100
commiteaf64335f9750e68c34613e1f0a51ceb3b2bcf89 (patch)
tree1f8c6300f99342b6c2732cdb57d5f46cb0840dfc
parentc403455d8bb87d3c5a99a327a7aa75bdbf80cd4a (diff)
downloadmongo-eaf64335f9750e68c34613e1f0a51ceb3b2bcf89.tar.gz
WT-2961 Add a version drop-down to the web version of the docs. (#3089)
-rwxr-xr-xdist/s_docs10
-rw-r--r--src/docs/style/header-web.html73
-rw-r--r--src/docs/style/header.html4
3 files changed, 84 insertions, 3 deletions
diff --git a/dist/s_docs b/dist/s_docs
index b4f449fa093..f4332257193 100755
--- a/dist/s_docs
+++ b/dist/s_docs
@@ -183,7 +183,8 @@ EOF
clean=0
additional_languages=1
-filter="|sed '/PROJECT_NUMBER/s,=.*,=\"Version $WIREDTIGER_VERSION\",'"
+filter="|sed '/PROJECT_BRIEF/s,=.*,=\"$WIREDTIGER_VERSION\",'"
+filter="$filter| sed '/PROJECT_NUMBER/s,=.*,=\"Version $WIREDTIGER_VERSION\",'"
while :
do case "$1" in
-a) # Build from scratch
@@ -200,6 +201,13 @@ while :
-t) # Include the TODO list
filter="$filter| sed '/GENERATE_TODOLIST/s,=.*,=YES,'"
shift;;
+ -v) # Override the version with <slug> <version string>
+ filter="$filter| sed '/HTML_HEADER/s,=.*,= style/header-web.html,'"
+ shift
+ filter="$filter| sed '/PROJECT_BRIEF/s,=.*,=\"$1\",'"
+ shift
+ filter="$filter| sed '/PROJECT_NUMBER/s,=.*,=\"$1\",'"
+ shift;;
*)
break;;
esac
diff --git a/src/docs/style/header-web.html b/src/docs/style/header-web.html
new file mode 100644
index 00000000000..63b22bb763e
--- /dev/null
+++ b/src/docs/style/header-web.html
@@ -0,0 +1,73 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->
+<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->
+<link href="$relpath$tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="$relpath$jquery.js"></script>
+<script type="text/javascript" src="$relpath$dynsections.js"></script>
+$treeview
+$search
+$mathjax
+<link href="$relpath$$stylesheet" rel="stylesheet" type="text/css" />
+$extrastylesheet
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+
+<!--BEGIN TITLEAREA-->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <!--BEGIN PROJECT_LOGO-->
+ <td id="projectlogo"><a href="http://wiredtiger.com/"><img alt="Logo" src="$relpath$$projectlogo" alt="WiredTiger" /></a></td>
+ <!--END PROJECT_LOGO-->
+ <!--BEGIN PROJECT_NAME-->
+ <td style="padding-left: 0.5em;">
+ <div id="projectname">
+ <!--BEGIN PROJECT_NUMBER--><span id="projectnumber"><!--$projectnumber--></span><!--END PROJECT_NUMBER-->
+ <!--BEGIN PROJECT_BRIEF-->
+ <div id="projectbrief">
+
+ <script type="text/javascript">
+ window.addEventListener("load",function(){
+ document.getElementById("version_select").options.namedItem("$projectbrief").selected=true;
+ },false);
+ </script>
+
+ <select id="version_select" onchange="window.location=window.location.href.replace('$projectbrief',this.value);">
+ <option name="$projectbrief" value="$projectbrief">$projectnumber</option>
+ <option name="stable" value="stable">Latest stable release</option>
+ <option name="develop" value="develop">Current develop branch</option>
+ <option name="mongodb-3.2" value="mongodb-3.2">MongoDB 3.2</option>
+ <option name="mongodb-3.4" value="mongodb-3.4">MongoDB 3.4</option>
+ </select>
+ </div><!--END PROJECT_BRIEF-->
+ </div>
+ </td>
+ <!--END PROJECT_NAME-->
+ <!--BEGIN !PROJECT_NAME-->
+ <!--BEGIN PROJECT_BRIEF-->
+ <td style="padding-left: 0.5em;">
+ <div id="projectbrief">$projectbrief</div>
+ </td>
+ <!--END PROJECT_BRIEF-->
+ <!--END !PROJECT_NAME-->
+ <!--BEGIN DISABLE_INDEX-->
+ <!--BEGIN SEARCHENGINE-->
+ <td>$searchbox</td>
+ <!--END SEARCHENGINE-->
+ <!--END DISABLE_INDEX-->
+ </tr>
+ </tbody>
+</table>
+</div>
+<div class="banner">
+ <a href="https://github.com/wiredtiger/wiredtiger">Fork me on GitHub</a>
+ <a class="last" href="http://groups.google.com/group/wiredtiger-users">Join my user group</a>
+</div>
+<!--END TITLEAREA-->
+<!-- end header part -->
diff --git a/src/docs/style/header.html b/src/docs/style/header.html
index 0c045a750d1..422268b7a47 100644
--- a/src/docs/style/header.html
+++ b/src/docs/style/header.html
@@ -30,13 +30,13 @@ $extrastylesheet
<div id="projectname">
<!--BEGIN PROJECT_NUMBER-->&#160;<span id="projectnumber">$projectnumber</span><!--END PROJECT_NUMBER-->
</div>
- <!--BEGIN PROJECT_BRIEF--><div id="projectbrief">$projectbrief</div><!--END PROJECT_BRIEF-->
+ <!--BEGIN PROJECT_BRIEF--><div id="projectbrief"><!-- $projectbrief --></div><!--END PROJECT_BRIEF-->
</td>
<!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME-->
<!--BEGIN PROJECT_BRIEF-->
<td style="padding-left: 0.5em;">
- <div id="projectbrief">$projectbrief</div>
+ <div id="projectbrief"><!-- $projectbrief --></div>
</td>
<!--END PROJECT_BRIEF-->
<!--END !PROJECT_NAME-->