Skip to content

Commit

Permalink
search: add loading bar for search page
Browse files Browse the repository at this point in the history
Signed-off-by: Anna Trzcinska <anna.trzcinska@cern.ch>
  • Loading branch information
annatrz committed Dec 5, 2017
1 parent e14d983 commit d7a57f3
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
23 changes: 21 additions & 2 deletions cernopendata/modules/theme/static/scss/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ $iconic-font-path: "/static/node_modules/open-iconic/font/fonts/";

$dark_blue: #2c3e50;
$medium_blue: #2c3e50;
$light_blue: #3b94cf;
$light_blue: #3b97d3;
$orange: #e57e25;
$loading-color: $light-blue;
$loading-width: 3px;
$loading-size: 30px;

@import "frontpage";

Expand Down Expand Up @@ -484,5 +488,20 @@ invenio-search-facets {

.list-nobullets {
list-style: none;
padding-left: 30px;
padding-left: $loading-size;
}

#loading-bar .bar{
background-color: $loading-color;
height: $loading-width;
}

#loading-bar-spinner .spinner-icon {
width: $loading-size;
height: $loading-size;
border: solid $loading-width transparent;
border-top-color: $loading-color;
border-left-color: $loading-color;
border-radius: $loading-size;
}

4 changes: 3 additions & 1 deletion cernopendata/templates/cernopendata/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@
angular.element(document).ready(function() {
angular.bootstrap(
document.getElementById("invenio-search"), [
'invenioSearch'
'invenioSearch',
'angular-loading-bar'
]
);
});

angular.module('invenioSearch').filter('unsafe', ['$sce', function($sce) {
return function(input) {
return $sce.trustAsHtml(input + '...');
Expand Down

0 comments on commit d7a57f3

Please sign in to comment.