forked from rufuspollock-okfn/facetview
-
Notifications
You must be signed in to change notification settings - Fork 0
/
simple.html
56 lines (45 loc) · 1.52 KB
/
simple.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>FacetView</title>
<script type="text/javascript" src="vendor/jquery/1.7.1/jquery-1.7.1.min.js"></script>
<link rel="stylesheet" href="vendor/bootstrap/css/bootstrap.min.css">
<script type="text/javascript" src="vendor/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="vendor/linkify/1.0/jquery.linkify-1.0-min.js"></script>
<link rel="stylesheet" href="vendor/jquery-ui-1.8.18.custom/jquery-ui-1.8.18.custom.css">
<script type="text/javascript" src="vendor/jquery-ui-1.8.18.custom/jquery-ui-1.8.18.custom.min.js"></script>
<script type="text/javascript" src="jquery.facetview.js"></script>
<link rel="stylesheet" href="css/facetview.css">
<script type="text/javascript">
jQuery(document).ready(function($) {
$('.facet-view-simple').facetview({
search_url: 'http://bibsoup.net/query?',
search_index: 'elasticsearch',
facets: [
{'field': 'publisher.exact', 'size': 100, 'order':'term', 'display': 'publisher'},
{'field': 'author.name.exact', 'display': 'author'},
{'field': 'year.exact', 'display': 'year'},
{'field': 'collection.exact', 'display': 'collection'},
],
paging: {
size: 10
},
predefined_filters: {
'owner.exact': 'test'
}
});
});
</script>
<style type="text/css">
.facet-view-simple{
width:800px;
height:600px;
margin:20px auto 0 auto;
}
</style>
</head>
<body>
<div class="facet-view-simple"></div>
</body>
</html>