Commit bb565eb7 authored by Renfred Harper's avatar Renfred Harper
Browse files

Add new grid stricture

Updated classes to new bootstrap-3 style grid classes.

4 restaurants per row for medium to large displays
3 restaurants per row for small displays
1 restaurant per row for mobile displays
parent 7ae3f310
...@@ -14,7 +14,7 @@ function construct_grid(filtered_restaurants) { ...@@ -14,7 +14,7 @@ function construct_grid(filtered_restaurants) {
$('#grid').empty(); $('#grid').empty();
$('#grid').html('<div class="row"></div>'); $('#grid').html('<div class="row"></div>');
if (filtered_restaurants.length == 0) { if (filtered_restaurants.length == 0) {
$('#grid').append('<span class="span2 offset5">No results found.</span>'); $('#grid').append('<span class="col-md-2 offset5">No results found.</span>');
return; return;
} }
sorted_restaurants = sort_restaurants(filtered_restaurants); sorted_restaurants = sort_restaurants(filtered_restaurants);
...@@ -26,12 +26,12 @@ function construct_grid(filtered_restaurants) { ...@@ -26,12 +26,12 @@ function construct_grid(filtered_restaurants) {
// Append the data into the Bootstrap scaffolding // Append the data into the Bootstrap scaffolding
if ($('#grid .row').last().children().length < 4) { if ($('#grid .row').last().children().length < 4) {
$('#grid .row').last().append( $('#grid .row').last().append(
'<div class="span3 ' + open_class + '" id="' + restaurant.id + '">' + restaurant.name + '</div>' '<div class="col-sm-4 col-md-3 ' + open_class + '" id="' + restaurant.id + '">' + restaurant.name + '</div>'
); );
} else { } else {
$('#grid').append('<div class="row"></div>'); $('#grid').append('<div class="row"></div>');
$('#grid .row').last().append( $('#grid .row').last().append(
'<div class="span3 ' + open_class + '" id="' + restaurant.id + '">' + restaurant.name + '</div>' '<div class="col-sm-4 col-md-3 ' + open_class + '" id="' + restaurant.id + '">' + restaurant.name + '</div>'
); );
} }
}); });
......
...@@ -52,6 +52,15 @@ ...@@ -52,6 +52,15 @@
</div> </div>
</div> </div>
</nav> </nav>
<div class="container">
<div class="row">
<div class="col-md-12">
{% block content %}
{% endblock %}
</div>
</div>
</div>
<div class="footer"> <div class="footer">
A project of <a href="http://srct.gmu.edu">GMU SRCT</a>. <a href="http://opensource.org/licenses/MIT/">Some rights reserved</a>. &nbsp; &nbsp; | &nbsp; &nbsp; A project of <a href="http://srct.gmu.edu">GMU SRCT</a>. <a href="http://opensource.org/licenses/MIT/">Some rights reserved</a>. &nbsp; &nbsp; | &nbsp; &nbsp;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment