From cc1bad54ea83d9e8b7df8ca74f120c007c152c2c Mon Sep 17 00:00:00 2001 From: Adam Miskiewicz Date: Tue, 29 Dec 2015 12:43:40 -0500 Subject: [PATCH] [Website] First pass at Algolia Doc Search MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It’s not yet responsive :( --- website/core/AlgoliaDocSearch.js | 22 ++++ website/core/HeaderLinks.js | 4 + website/core/Site.js | 3 + website/src/react-native/css/react-native.css | 94 ++++++++++++++++++ website/src/react-native/img/search.png | Bin 0 -> 1378 bytes website/src/react-native/js/scripts.js | 7 ++ 6 files changed, 130 insertions(+) create mode 100644 website/core/AlgoliaDocSearch.js create mode 100644 website/src/react-native/img/search.png diff --git a/website/core/AlgoliaDocSearch.js b/website/core/AlgoliaDocSearch.js new file mode 100644 index 000000000..b65e7e303 --- /dev/null +++ b/website/core/AlgoliaDocSearch.js @@ -0,0 +1,22 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule AlgoliaDocSearch + */ + +var AlgoliaDocSearch = React.createClass({ + render: function() { + return ( +
+ +
+ ); + } +}); + +module.exports = AlgoliaDocSearch; diff --git a/website/core/HeaderLinks.js b/website/core/HeaderLinks.js index c70b3c92d..afee22f24 100644 --- a/website/core/HeaderLinks.js +++ b/website/core/HeaderLinks.js @@ -10,6 +10,7 @@ */ var React = require('React'); +var AlgoliaDocSearch = require('AlgoliaDocSearch'); var HeaderLinks = React.createClass({ linksInternal: [ @@ -44,6 +45,9 @@ var HeaderLinks = React.createClass({ + + + diff --git a/website/core/Site.js b/website/core/Site.js index e855a9666..eface427c 100644 --- a/website/core/Site.js +++ b/website/core/Site.js @@ -29,6 +29,8 @@ var Site = React.createClass({ + + @@ -68,6 +70,7 @@ var Site = React.createClass({ ){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js"; fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs"); `}} /> +