[demos/search][s]: minor refactoring of facets in sidebar and styling.
This commit is contained in:
parent
cc9389a689
commit
15b53b4703
@ -18,9 +18,10 @@ var createSearch = function(dataset, state) {
|
||||
{{#records}} \
|
||||
<div class="record"> \
|
||||
<h3> \
|
||||
{{title}} \
|
||||
{{title}} <em>by {{Author}}</em> \
|
||||
</h3> \
|
||||
<p>{{description}} \
|
||||
<p>{{description}}</p> \
|
||||
<p><code>${{price}}</code></p> \
|
||||
</div> \
|
||||
{{/records}} \
|
||||
';
|
||||
@ -36,7 +37,7 @@ var createSearch = function(dataset, state) {
|
||||
},
|
||||
{silent: true}
|
||||
);
|
||||
dataset.queryState.addFacet('author');
|
||||
dataset.queryState.addFacet('Author');
|
||||
dataset.query();
|
||||
}
|
||||
|
||||
@ -97,15 +98,21 @@ var SearchView = Backbone.View.extend({
|
||||
var simpleData = [
|
||||
{
|
||||
title: 'War and Peace',
|
||||
description: 'The epic tale ...',
|
||||
author: 'Tolstoy',
|
||||
description: 'The epic tale of love, war and history',
|
||||
Author: 'Tolstoy',
|
||||
price: 7.99
|
||||
},
|
||||
{
|
||||
title: 'Anna Karenina',
|
||||
description: 'How things go wrong in love and ultimately lead to suicide. This is why you should not have affairs, girls!',
|
||||
author: 'Tolstoy',
|
||||
Author: 'Tolstoy',
|
||||
price: 8.50
|
||||
},
|
||||
{
|
||||
title: "Fathers and Sons",
|
||||
description: "Another 19th century Russian novel",
|
||||
Author: "Turgenev",
|
||||
price: 11
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
@ -57,12 +57,21 @@ root: ../../
|
||||
}
|
||||
|
||||
.results {
|
||||
margin-right: 300px;
|
||||
margin-right: 290px;
|
||||
border-right: #eee 1px solid;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
width: 250px;
|
||||
height: 100%;
|
||||
width: 270px;
|
||||
float: right;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
ul.facet-items {
|
||||
list-style-type: none;
|
||||
margin-left: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user