File tree 6 files changed +52
-8
lines changed
6 files changed +52
-8
lines changed Original file line number Diff line number Diff line change
1
+ require ( './style.css' ) ;
2
+
1
3
var instantsearch = require ( '../' ) ;
2
4
3
5
var instant = new instantsearch . InstantSearch (
4
- 'JTH1JDTDFT ' ,
5
- '34a4c1b994546fbec45a670a06ba0c33 ' ,
6
- 'Bibliotheques '
6
+ 'latency ' ,
7
+ '6be0576ff61c053d5f9a3225e2a90f76 ' ,
8
+ 'bestbuy '
7
9
) ;
8
10
9
11
instant . addWidget ( instantsearch . widgets . searchbox ( {
10
12
container : '#search-box' ,
11
- placeholder : 'Search for libraries in France...'
13
+ placeholder : 'Search for products in France...'
12
14
} ) ) ;
13
15
14
16
instant . addWidget ( instantsearch . widgets . results ( {
Original file line number Diff line number Diff line change 2
2
< html lang ="en ">
3
3
< head >
4
4
< meta charset ="UTF-8 ">
5
- < title > Instant search example</ title >
5
+ < title > Instant search demo built with instantsearch.js</ title >
6
+ < link rel ="stylesheet " href ="//cdn.jsdelivr.net/bootstrap/3.3.5/css/bootstrap.min.css ">
7
+ < link rel ="stylesheet " href ="//cdn.jsdelivr.net/bootstrap/3.3.5/css/bootstrap-theme.min.css ">
6
8
</ head >
7
9
< body >
8
- < div id ="search-box "> </ div >
9
- < div id ="hits "> </ div >
10
+ < div class ="container ">
11
+ < div class ="page-header ">
12
+ < h1 > Instant search demo < small > using instantsearch.js</ small > </ h1 >
13
+ </ div >
14
+
15
+ < div class ="row ">
16
+ < div class ="col-md-3 ">
17
+
18
+ < div id ="search-box "> </ div >
19
+ </ div >
20
+ < div class ="col-md-9 ">
21
+ < div id ="hits "> </ div >
22
+ </ div >
23
+ </ div >
24
+ </ div >
10
25
11
26
< script src ="bundle.js "> </ script >
12
27
</ body >
Original file line number Diff line number Diff line change
1
+ body {
2
+ padding : 2em 0 ;
3
+ }
4
+
5
+ .hit + .hit {
6
+ margin-top : 1em ;
7
+ padding-top : 1em ;
8
+ border-top : 1px solid # bbb ;
9
+ }
10
+
11
+ .hit em {
12
+ font-style : normal;
13
+ background-color : lightcyan;
14
+ }
Original file line number Diff line number Diff line change 1
- < div > {{libelle1}}</ div >
1
+ < div class ="media ">
2
+ < a class ="pull-left " href ="{{url}} ">
3
+ < img class ="media-object " src ="{{image}} ">
4
+ </ a >
5
+ < div class ="media-body ">
6
+ < h3 class ="pull-right text-right text-info "> ${{salePrice}}</ h3 >
7
+ < h4 > {{{_highlightResult.name.value}}}</ h4 >
8
+ < p > {{{_highlightResult.shortDescription.value}}}</ p >
9
+ </ div >
10
+ </ div >
Original file line number Diff line number Diff line change 27
27
"babel" : " 5.8.19" ,
28
28
"babel-eslint" : " 4.0.5" ,
29
29
"babel-loader" : " 5.3.2" ,
30
+ "css-loader" : " 0.15.6" ,
30
31
"eslint" : " 0.24.1" ,
31
32
"eslint-config-airbnb" : " 0.0.7" ,
32
33
"eslint-config-algolia" : " 2.1.2" ,
40
41
"sinon" : " 1.15.4" ,
41
42
"tap-spec" : " 4.0.2" ,
42
43
"tape" : " 4.0.1" ,
44
+ "style-loader" : " 0.12.3" ,
43
45
"uglifyjs" : " 2.4.10" ,
44
46
"webpack" : " 1.10.5" ,
45
47
"webpack-dev-server" : " 1.10.1"
Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ module.exports = {
10
10
test : / \. j s $ / , exclude : / n o d e _ m o d u l e s / , loader : 'babel-loader'
11
11
} , {
12
12
test : / \. h t m l $ / , exclude : / n o d e _ m o d u l e s / , loader : 'raw'
13
+ } , {
14
+ test : / \. c s s $ / , loader : 'style-loader!css-loader'
13
15
} ]
14
16
} ,
15
17
devServer : {
You can’t perform that action at this time.
0 commit comments