Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Zoheb Lokhandwala
whats-open
Commits
b745b34d
Commit
b745b34d
authored
Oct 13, 2013
by
Renfred Harper
Browse files
Add auto subscripting for numbered restaurants
parent
292e3e29
Changes
2
Show whitespace changes
Inline
Side-by-side
website/static/css/style.css
View file @
b745b34d
...
...
@@ -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
;
...
...
website/static/js/grid.js
View file @
b745b34d
...
...
@@ -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>
'
);
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment