-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
59 lines (53 loc) · 1.84 KB
/
index.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
57
58
59
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
<title>fabric-algolia demo</title>
<script src="../node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
<script type="module">
import '@polymer/iron-demo-helpers/demo-pages-shared-styles';
import '@polymer/iron-demo-helpers/demo-snippet';
import '@polymer/polymer/lib/elements/dom-bind.js';
import '@polymer/polymer/lib/elements/dom-repeat.js';
import '@polymer/paper-input/paper-input.js';
import '@polymer/paper-card/paper-card.js';</script>
<script type="module" src="../fabric-algolia.js"></script>
<custom-style>
<style is="custom-style" include="demo-pages-shared-styles">
paper-card {
margin: 0 auto 1rem auto;
display: block;
width: 300px;
max-width: 100%;
}
</style>
</custom-style>
</head>
<body>
<div class="vertical-section-container centered">
<h3>Basic fabric-algolia demo</h3>
<demo-snippet>
<template>
<dom-bind>
<template>
<paper-input label="Search a movie" value="{{query}}"></paper-input>
<fabric-algolia application-id="latency" api-key="6be0576ff61c053d5f9a3225e2a90f76" index="movies" query="[[query]]" response="{{response}}"></fabric-algolia>
<dom-repeat items="[[response.hits]]">
<template>
<paper-card image="[[item.image]]">
<div class="card-content">
<h4>[[item.title]]</h4>
<h5>[[item.year]]</h5>
<p>[[item.genre]]</p>
</div>
</paper-card>
</template>
</dom-repeat>
</template>
</dom-bind>
</template>
</demo-snippet>
</div>
</body>
</html>