RangeFilter

Size
3,831 Kb
Views
30,360

How do I make an rangefilter?

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

RangeFilter Previews

RangeFilter - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>RangeFilter</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel='stylesheet prefetch' href='http://cdn.rawgit.com/searchkit/searchkit/master/release/styles.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div id="app"></div> <script src='http://cdnjs.cloudflare.com/ajax/libs/react/0.14.3/react.min.js'></script>
<script src='http://cdn.rawgit.com/searchkit/searchkit/develop/release/bundle.js'></script> <script src="js/index.js"></script>
</body>
</html>

RangeFilter - 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; padding: 20px;
}
.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;
}

RangeFilter - 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 = "https://kili-eu-west-1.searchly.com/movies/";
var sk = new Searchkit.SearchkitManager(host, { multipleSearchers: false, basicAuth: "read:teetndhjnrspbzxxyfxmf5fb24suqxuj"
});
var SearchkitProvider = Searchkit.SearchkitProvider;
var Searchbox = Searchkit.SearchBox;
var RangeFilter = Searchkit.RangeFilter;
var Application = function (_React$Component) { _inherits(Application, _React$Component); function Application() { _classCallCheck(this, Application); return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); } Application.prototype.render = function render() { return React.createElement( "div", null, React.createElement( SearchkitProvider, { searchkit: sk }, React.createElement( "div", { className: "search" }, React.createElement( "div", { className: "search__query" }, React.createElement(Searchbox, { searchOnChange: true, prefixQueryFields: ["actors^1", "type^2", "languages", "title^10"] }) ), React.createElement( "div", { className: "search__results" }, React.createElement(RangeFilter, { min: 0, max: 10, field: "imdbRating", id: "imdbRating", title: "IMDB Rating", showHistogram: true }), React.createElement(RangeFilter, { min: 0, max: 100, field: "metaScore", id: "metascore", title: "Metascore (interval: 2)", showHistogram: true, interval: 2 }) ) ) ) ); }; return Application;
}(React.Component);
React.render(React.createElement(Application, null), document.getElementById('app'));
RangeFilter - Script Codes
RangeFilter - Script Codes
Home Page Home
Developer Gregory Potdevin
Username GregoryPotdevin
Uploaded October 01, 2022
Rating 3
Size 3,831 Kb
Views 30,360
Do you need developer help for RangeFilter?

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 art & images 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!