Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
Adds a loading image in the search page
Browse files Browse the repository at this point in the history
  • Loading branch information
James Calcaben committed Sep 13, 2016
1 parent c5420a1 commit 289e31f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
4 changes: 2 additions & 2 deletions css/app.css

Large diffs are not rendered by default.

Binary file added i/loading.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 9 additions & 2 deletions scss/partials/_search.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#search-results table {
border: none;
#search-results {
min-height: 400px;
&.loading {
background: url(../i/loading.gif) no-repeat center center;
}
table{
border: none;
}
}

.search .content {
Expand Down Expand Up @@ -406,3 +412,4 @@ body.search-active {
z-index: 50;
cursor: pointer;
}

3 changes: 2 additions & 1 deletion search.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ subgroup:
title: Search Results
menu_title: Search
---
<div id="search-results">
<div id="search-results" class="loading">
<!--Google Custom Search-->
<script>
(function() {
Expand All @@ -16,6 +16,7 @@ menu_title: Search
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
$("#search-results").removeClass("loading");
})();
</script>
<gcse:search></gcse:search>
Expand Down

0 comments on commit 289e31f

Please sign in to comment.