Author: jasha
Date: Mon May 7 15:57:53 2012
New Revision: 1335082
URL: http://svn.apache.org/viewvc?rev=1335082&view=rev
Log:
RAVE-611 add Google custom search to the documentation website
Modified:
rave/site/trunk/content/css/rave.css
rave/site/trunk/templates/skeleton.html
Modified: rave/site/trunk/content/css/rave.css
URL:
http://svn.apache.org/viewvc/rave/site/trunk/content/css/rave.css?rev=1335082&r1=1335081&r2=1335082&view=diff
==============================================================================
--- rave/site/trunk/content/css/rave.css (original)
+++ rave/site/trunk/content/css/rave.css Mon May 7 15:57:53 2012
@@ -154,4 +154,7 @@ dl {}
dt {
display: inline;
float: left;
-}
\ No newline at end of file
+}
+
+/* Google Search box customizations */
+.gsc-clear-button{display:none;}
Modified: rave/site/trunk/templates/skeleton.html
URL:
http://svn.apache.org/viewvc/rave/site/trunk/templates/skeleton.html?rev=1335082&r1=1335081&r2=1335082&view=diff
==============================================================================
--- rave/site/trunk/templates/skeleton.html (original)
+++ rave/site/trunk/templates/skeleton.html Mon May 7 15:57:53 2012
@@ -1,6 +1,7 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
+<!doctype html>
<html>
<head>
+ <meta charset="UTF-8"/>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
@@ -18,10 +19,10 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
- <link rel="shortcut icon" href="/images/RAVE-favicon.ico"
type="image/x-icon" />
- <link href="/css/rave.css" rel="stylesheet" type="text/css">
+ <link rel="shortcut icon" href="/images/RAVE-favicon.ico"
type="image/x-icon"/>
+ <link rel="stylesheet" href="//www.google.com/cse/style/look/default.css"/>
+ <link href="/css/rave.css" rel="stylesheet"/>
<title>{% block title %}{{ headers.title }}{% endblock %}</title>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
@@ -30,6 +31,7 @@
</div>
<div id="navigation">
+ <div id="cse-search-form">Loading <!-- Placeholder for Google Search Form
--></div>
{% filter markdown %}{% include "sidenav.mdtext" %}{% endfilter %}
</div>
@@ -49,6 +51,17 @@
</p>
</div>
</div>
-
+ <script src="//www.google.com/jsapi"></script>
+ <script>
+ google.load('search', '1', {language : 'en'});
+ google.setOnLoadCallback(function() {
+ var customSearchOptions = {}; var customSearchControl = new
google.search.CustomSearchControl(
+ '009412755592933514871:wrsgblows4o', customSearchOptions);
+
customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
+ var options = new google.search.DrawOptions();
+
options.enableSearchboxOnly("http://www.google.com/cse?cx=009412755592933514871:wrsgblows4o");
+ customSearchControl.draw('cse-search-form', options);
+ }, true);
+ </script>
</body>
</html>