From 45ca74410c21fad99fa56050e49915d34d8e134f Mon Sep 17 00:00:00 2001 From: William Welling Date: Wed, 4 Oct 2017 15:39:08 -0500 Subject: [PATCH] simple loading animation and fade in and out animations --- rollup.config.js | 42 +++++------ .../collection-page.component.html | 4 +- .../collection-page.component.ts | 11 ++- .../community-page.component.html | 2 +- .../community-page.component.ts | 3 + ...ty-page-sub-collection-list.component.html | 4 +- ...nity-page-sub-collection-list.component.ts | 3 + .../top-level-community-list.component.html | 2 +- .../top-level-community-list.component.ts | 4 +- .../full/full-item-page.component.html | 2 +- .../full/full-item-page.component.ts | 5 ++ .../simple/item-page.component.html | 2 +- .../+item-page/simple/item-page.component.ts | 5 ++ .../+search-page/search-page.component.html | 7 +- src/app/+search-page/search-page.component.ts | 12 ++-- .../search-results.component.html | 8 ++- src/app/app.component.html | 26 +++---- src/app/browser-app.module.ts | 2 + .../object-list/object-list.component.html | 5 +- src/app/server-app.module.ts | 2 + src/app/shared/animations/fade.ts | 24 +++++++ src/app/shared/error/error.component.html | 4 +- src/app/shared/error/error.component.spec.ts | 4 +- src/app/shared/loading/loading.component.html | 16 ++++- src/app/shared/loading/loading.component.scss | 72 +++++++++++++++++++ .../shared/loading/loading.component.spec.ts | 4 +- .../object-list/object-list.component.ts | 5 +- 27 files changed, 222 insertions(+), 58 deletions(-) create mode 100644 src/app/shared/animations/fade.ts diff --git a/rollup.config.js b/rollup.config.js index a47b46dd37..caa63ac03e 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,20 +1,22 @@ -import nodeResolve from 'rollup-plugin-node-resolve' -import commonjs from 'rollup-plugin-commonjs'; -import uglify from 'rollup-plugin-uglify' - -export default { - entry: 'dist/client.js', - dest: 'dist/client.js', - sourceMap: false, - format: 'iife', - plugins: [ - nodeResolve({ - jsnext: true, - module: true - }), - commonjs({ - include: 'node_modules/rxjs/**' - }), - uglify() - ] -} +import nodeResolve from 'rollup-plugin-node-resolve' +import commonjs from 'rollup-plugin-commonjs'; +import uglify from 'rollup-plugin-uglify' + +export default { + input: 'dist/client.js', + output: { + file: 'dist/client.js', + format: 'iife', + }, + sourceMap: false, + plugins: [ + nodeResolve({ + jsnext: true, + module: true + }), + commonjs({ + include: 'node_modules/rxjs/**' + }), + uglify() + ] +} diff --git a/src/app/+collection-page/collection-page.component.html b/src/app/+collection-page/collection-page.component.html index 8a8f2f0aad..a4e81cd272 100644 --- a/src/app/+collection-page/collection-page.component.html +++ b/src/app/+collection-page/collection-page.component.html @@ -1,5 +1,5 @@
-
+
@@ -34,7 +34,7 @@
-
+

{{'collection.page.browse.recent.head' | translate}}

; diff --git a/src/app/+community-page/community-page.component.html b/src/app/+community-page/community-page.component.html index f29fa364fb..1acaf2d89e 100644 --- a/src/app/+community-page/community-page.component.html +++ b/src/app/+community-page/community-page.component.html @@ -1,4 +1,4 @@ -
+
diff --git a/src/app/+community-page/community-page.component.ts b/src/app/+community-page/community-page.component.ts index 2bd19b0f06..d1d1081757 100644 --- a/src/app/+community-page/community-page.component.ts +++ b/src/app/+community-page/community-page.component.ts @@ -9,10 +9,13 @@ import { RemoteData } from '../core/data/remote-data'; import { CommunityDataService } from '../core/data/community-data.service'; import { hasValue } from '../shared/empty.util'; +import { fadeInOut } from '../shared/animations/fade'; + @Component({ selector: 'ds-community-page', styleUrls: ['./community-page.component.scss'], templateUrl: './community-page.component.html', + animations:[fadeInOut] }) export class CommunityPageComponent implements OnInit, OnDestroy { communityData: RemoteData; diff --git a/src/app/+community-page/sub-collection-list/community-page-sub-collection-list.component.html b/src/app/+community-page/sub-collection-list/community-page-sub-collection-list.component.html index f1f05a0467..82ae6bd3e1 100644 --- a/src/app/+community-page/sub-collection-list/community-page-sub-collection-list.component.html +++ b/src/app/+community-page/sub-collection-list/community-page-sub-collection-list.component.html @@ -1,4 +1,4 @@ -
+

{{'community.sub-collection-list.head' | translate}}

  • @@ -9,3 +9,5 @@
+ + diff --git a/src/app/+community-page/sub-collection-list/community-page-sub-collection-list.component.ts b/src/app/+community-page/sub-collection-list/community-page-sub-collection-list.component.ts index caa764c39f..618890a60c 100644 --- a/src/app/+community-page/sub-collection-list/community-page-sub-collection-list.component.ts +++ b/src/app/+community-page/sub-collection-list/community-page-sub-collection-list.component.ts @@ -4,10 +4,13 @@ import { CollectionDataService } from '../../core/data/collection-data.service'; import { RemoteData } from '../../core/data/remote-data'; import { Collection } from '../../core/shared/collection.model'; +import { fadeIn } from '../../shared/animations/fade'; + @Component({ selector: 'ds-community-page-sub-collection-list', styleUrls: ['./community-page-sub-collection-list.component.scss'], templateUrl: './community-page-sub-collection-list.component.html', + animations:[fadeIn] }) export class CommunityPageSubCollectionListComponent implements OnInit { subCollections: RemoteData; diff --git a/src/app/+home-page/top-level-community-list/top-level-community-list.component.html b/src/app/+home-page/top-level-community-list/top-level-community-list.component.html index c8a889a4f7..69df3b99d0 100644 --- a/src/app/+home-page/top-level-community-list/top-level-community-list.component.html +++ b/src/app/+home-page/top-level-community-list/top-level-community-list.component.html @@ -1,4 +1,4 @@ -
+

{{'home.top-level-communities.head' | translate}}

{{'home.top-level-communities.help' | translate}}

; config: PaginationComponentOptions; diff --git a/src/app/+item-page/full/full-item-page.component.html b/src/app/+item-page/full/full-item-page.component.html index ccd8ca3932..bc8ee3f3a8 100644 --- a/src/app/+item-page/full/full-item-page.component.html +++ b/src/app/+item-page/full/full-item-page.component.html @@ -1,4 +1,4 @@ -
+