Skip to content

Commit 1a74417

Browse files
committed
Added main back and hid sidebar when in no results conditional
1 parent 14e05d2 commit 1a74417

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

app/views/search/results.html.erb

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,16 @@
3636
</ol>
3737
<%= render partial: "results_callouts" %>
3838
<% elsif @errors.blank? %>
39-
<div class="no-results">
40-
<p class="hd-2">No results found for your search</p>
41-
</div>
39+
<main id="results">
40+
<div class="no-results">
41+
<p class="hd-2">No results found for your search</p>
42+
</div>
43+
</main>
4244
<% end %>
4345
</main>
44-
<%= render partial: "results_sidebar" %>
46+
<% if @results.present? %>
47+
<%= render partial: "results_sidebar" %>
48+
<% end %>
4549
</div>
4650
</div>
4751

0 commit comments

Comments
 (0)