Skip to content

Commit d1359e5

Browse files
committed
Merge branch 'undefinedItem'
JS styling methods applied to objects with undefined values crashed app. Removed the empty row in the spreadsheet, that was creating an object with undefined values. Moved the styling to CSS & inline to avoid a future crash. close #57 close #39
2 parents b1e4e8c + 8da2d8c commit d1359e5

File tree

2 files changed

+16
-12
lines changed

2 files changed

+16
-12
lines changed

public/main.css

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,16 @@
4040
}
4141

4242
.resultContainer {
43-
margin-top: 1em;
44-
overflow: hidden;
43+
margin-top: 1em;
44+
overflow: hidden;
45+
}
46+
47+
.breadcrumbs{
48+
text-transform: lowercase;
4549
}
4650

4751
.faded{
48-
opacity: 0.5;
52+
opacity: 0.5;
4953
}
5054

5155
.itemImg {

views/partials/itemCards.ejs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
<div class="col-xs-12">
2-
<span> <a href="/search?floor=<%- floor %>"> <%- floor.toLowerCase() %> </a></span> >
3-
<span> <a href="/search?floor=<%- floor %>&room=<%- room %>"> <%- room.toLowerCase() %> </a></span> >
4-
<span> <a href="/search?floor=<%- floor %>&room=<%- room %>&location=<%- location %>"> <%- location.toLowerCase() %> </a></span> >
5-
<span> <a href="/search?fixture=<%- fixture %>"> <%- fixture.toLowerCase() %> </a></span>
1+
<div class="breadcrumbs col-xs-12">
2+
<span> <a href="/search?floor=<%- floor %>"> <%- floor %> </a></span> >
3+
<span> <a href="/search?floor=<%- floor %>&room=<%- room %>"> <%- room %> </a></span> >
4+
<span> <a href="/search?floor=<%- floor %>&room=<%- room %>&location=<%- location %>"> <%- location %> </a></span> >
5+
<span> <a href="/search?fixture=<%- fixture %>"> <%- fixture %> </a></span>
66
</div>
77
<% if (uuid) { %>
8-
<div class="well col-xs-12">
8+
<div class="well col-xs-12">
99
<% } else { %>
1010
<div class="well faded col-xs-12">
1111
<% } %>
@@ -18,11 +18,11 @@
1818
</div>
1919
<div class="itemTitle col-xs-8">
2020
<% if (uuid) { %>
21-
<h4> <a href="/<%- uuid %>"> <%- fixture.toUpperCase().bold() %> </a> </h4>
21+
<h4 > <a href="/<%- uuid %>" style="font-weight: bold"> <%- fixture %> </a> </h4>
2222
<% } else { %>
23-
<h4> <%- fixture.toUpperCase().bold() %> </h4>
23+
<h4> <span style="font-weight: bold"> <%- fixture %> </span></h4>
2424
<% } %>
25-
<span> <%- model.toLowerCase().italics() %> </span>
25+
<span style="font-style: italic"> <%- model %> </span>
2626
</div>
2727
<div class="itemImg col-xs-2">
2828
<% if (status === 'broken') { %>

0 commit comments

Comments
 (0)