Searchkit 0.8

Size
4,227 Kb
Views
36,432

How do I make an searchkit 0.8?

What is a searchkit 0.8? How do you make a searchkit 0.8? This script and codes were developed by Gregory Potdevin on 01 October 2022, Saturday.

Searchkit 0.8 Previews

Searchkit 0.8 - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Searchkit 0.8</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel='stylesheet prefetch' href='http://demo.searchkit.co/static/styles.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div id="app"></div> <script src='http://cdn.jsdelivr.net/searchkit/0.8.3/bundle.js'></script>
<script src='http://cdnjs.cloudflare.com/ajax/libs/react/0.14.7/react.min.js'></script>
<script src='http://cdnjs.cloudflare.com/ajax/libs/react/0.14.7/react-dom.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Searchkit 0.8 - Script Codes CSS Codes

.search__query { position: absolute; top: 0; left: 0; right: 0; height: 41px; display: flex; border-bottom: 1px solid #ddd;
}
.search .search-box { height: 40px; flex: 1;
}
.search .search-box__loader { display: none;
}
.search__results { position: absolute; top: 41px; left: 0; right: 0;
}
.search .hits-hit { text-align: center;
}
.search .hits-hit a { text-decoration: none;
}
.search .hits-hit__poster { max-width: 100px; max-height: 140px; display: inline-block;
}
.search .hits-hit__title { font-size: 12px; text-align: center; margin-top: 5px;
}

Searchkit 0.8 - Script Codes JS Codes

"use strict";
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var host = "http://demo.searchkit.co/api/movies";
var sk = new Searchkit.SearchkitManager(host, {});
var Hits = Searchkit.Hits;
var RangeFilter = Searchkit.RangeFilter;
var SearchkitProvider = Searchkit.SearchkitProvider;
var Searchbox = Searchkit.SearchBox;
var MovieHit = function (_React$Component) { _inherits(MovieHit, _React$Component); function MovieHit() { _classCallCheck(this, MovieHit); return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); } MovieHit.prototype.render = function render() { var result = this.props.result; var url = "http://www.imdb.com/title/" + result._source.imdbId; return React.createElement( "div", { className: this.props.bemBlocks.item().mix(this.props.bemBlocks.container("item")), key: result._id }, React.createElement( "a", { href: url, target: "_blank" }, React.createElement("img", { className: this.props.bemBlocks.item("poster"), src: result._source.poster, width: "100", height: "140" }), React.createElement( "div", { className: this.props.bemBlocks.item("title") }, result._source.title ) ) ); }; return MovieHit;
}(React.Component);
var Application = function (_React$Component2) { _inherits(Application, _React$Component2); function Application() { _classCallCheck(this, Application); return _possibleConstructorReturn(this, _React$Component2.apply(this, arguments)); } Application.prototype.render = function render() { return React.createElement( "div", null, React.createElement( SearchkitProvider, { searchkit: sk }, React.createElement( "div", { className: "sk-layout" }, React.createElement( "div", { className: "sk-layout__top-bar sk-top-bar" }, React.createElement( "div", { className: "sk-top-bar__content" }, React.createElement(Searchbox, { searchOnChange: true, prefixQueryFields: ["actors^1", "type^2", "languages", "title^10"] }) ) ), React.createElement( "div", { className: "sk-layout__body" }, React.createElement( "div", { className: "sk-layout__results sk-results-list" }, React.createElement(RangeFilter, { id: "imdb", field: "imdbRating", min: 0, max: 10, showHistogram: true, title: "IMDB Rating" }), React.createElement(Hits, { hitsPerPage: 6, itemComponent: MovieHit }) ) ) ) ) ); }; return Application;
}(React.Component);
ReactDOM.render(React.createElement(Application, null), document.getElementById('app'));
Searchkit 0.8 - Script Codes
Searchkit 0.8 - Script Codes
Home Page Home
Developer Gregory Potdevin
Username GregoryPotdevin
Uploaded October 01, 2022
Rating 3
Size 4,227 Kb
Views 36,432
Do you need developer help for Searchkit 0.8?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Gregory Potdevin (GregoryPotdevin) Script Codes
Create amazing blog posts with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!