@@ -35,23 +35,23 @@ $script(
3535 instantsearch . widgets . hits ( {
3636 container : '#hits' ,
3737 templates : {
38- item :
39- ' <div class="hit col-sm-3">' +
40- ' <div class="pictures-wrapper">' +
41- ' <img class="picture" src="{{ picture_url}}" />' +
42- ' <img class="profile" src="{{ user.user.thumbnail_url}}" />' +
43- ' </div>' +
44- ' <div class="infos">' +
45- ' <h4 class="media-heading">{{#helpers.highlight}}{ " attribute": " name" }{{/helpers.highlight}} </h4>' +
46- ' <p>' +
47- '{{ room_type}} - ' +
48- '{{#helpers.highlight}}{ "attribute": "city" }{{/helpers.highlight}},' +
49- '{{#helpers.highlight}}{ "attribute": "country" }{{/helpers.highlight}}' +
50- '</p>' +
51- '</div>' +
52- '</div>' ,
53- empty :
54- '<div class="text-center">No results found matching <strong>{{query}}</strong>.</div>' ,
38+ item : ( hit , { html , components } ) => html `
39+ < div class ="hit col-sm-3 ">
40+ < div class ="pictures-wrapper ">
41+ < img class ="picture " src =${ hit . picture_url } / >
42+ < img class ="profile " src =${ hit . user . user . thumbnail_url } / >
43+ </ div >
44+ < div class ="infos ">
45+ < h4 class ="media-heading "> ${ components . Highlight ( { hit , attribute : ' name' } ) } </ h4 >
46+ < p >
47+ ${ hit . room_type } - ${ components . Highlight ( { hit , attribute : 'city' } ) } , ${ components . Highlight ( { hit , attribute : 'country' } ) }
48+ </ p >
49+ </ div >
50+ </ div > '
51+ ` ,
52+ empty : ( { query } , { html } ) => html `
53+ < div class =" text-center " > No results found matching < strong > ${ query } </ strong > . </ div >
54+ `
5555 } ,
5656 } ) ,
5757
0 commit comments