Commit b745b34d authored by Renfred Harper's avatar Renfred Harper

Add auto subscripting for numbered restaurants

parent 292e3e29
......@@ -70,6 +70,10 @@ body {
color: rgba(81,81,81,0.9);
background-color: rgba(255,255,255,0.65);
}
.restaurant sub{
font-size: 13px;
padding-left: 2px;
}
.search-row{
text-align: center;
......
......@@ -23,9 +23,11 @@ function construct_grid(filtered_restaurants) {
open_class = 'opened';
}
// Append the data into the Bootstrap scaffolding
// Note that identical restaurants can be numbered. If there is a number in square brackets
// Next to a restuarant name, the number will be formatted as a subscript.
$('#grid .row').append(
'<div class="col-sm-6 col-md-4 col-lg-3 grid-box" id="' + restaurant.id + '">\
<div class="restaurant ' + open_class + '">' + restaurant.name + '</div>\
<div class="restaurant ' + open_class + '">' + restaurant.name.replace(/ ?\[(\d+)\]/, "<sub>$1</sub>") + '</div>\
</div>'
);
});
......
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