From 41a2aee38cf812510010da09de9bae53590ec119 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 27 May 2016 16:23:10 +0200 Subject: Follow the angular styleguide for the directories structure --- client/app/videos/shared/loader/index.ts | 1 + .../app/videos/shared/loader/loader.component.html | 3 +++ .../app/videos/shared/loader/loader.component.scss | 26 ++++++++++++++++++++++ .../app/videos/shared/loader/loader.component.ts | 11 +++++++++ 4 files changed, 41 insertions(+) create mode 100644 client/app/videos/shared/loader/index.ts create mode 100644 client/app/videos/shared/loader/loader.component.html create mode 100644 client/app/videos/shared/loader/loader.component.scss create mode 100644 client/app/videos/shared/loader/loader.component.ts (limited to 'client/app/videos/shared/loader') diff --git a/client/app/videos/shared/loader/index.ts b/client/app/videos/shared/loader/index.ts new file mode 100644 index 000000000..ab22584e4 --- /dev/null +++ b/client/app/videos/shared/loader/index.ts @@ -0,0 +1 @@ +export * from './loader.component'; diff --git a/client/app/videos/shared/loader/loader.component.html b/client/app/videos/shared/loader/loader.component.html new file mode 100644 index 000000000..d02296a2d --- /dev/null +++ b/client/app/videos/shared/loader/loader.component.html @@ -0,0 +1,3 @@ +
+
+
diff --git a/client/app/videos/shared/loader/loader.component.scss b/client/app/videos/shared/loader/loader.component.scss new file mode 100644 index 000000000..454195811 --- /dev/null +++ b/client/app/videos/shared/loader/loader.component.scss @@ -0,0 +1,26 @@ +div { + margin-top: 150px; +} + +// Thanks https://gist.github.com/alexandrevicenzi/680147013e902a4eaa5d +.glyphicon-refresh-animate { + -animation: spin .7s infinite linear; + -ms-animation: spin .7s infinite linear; + -webkit-animation: spinw .7s infinite linear; + -moz-animation: spinm .7s infinite linear; +} + +@keyframes spin { + from { transform: scale(1) rotate(0deg);} + to { transform: scale(1) rotate(360deg);} +} + +@-webkit-keyframes spinw { + from { -webkit-transform: rotate(0deg);} + to { -webkit-transform: rotate(360deg);} +} + +@-moz-keyframes spinm { + from { -moz-transform: rotate(0deg);} + to { -moz-transform: rotate(360deg);} +} diff --git a/client/app/videos/shared/loader/loader.component.ts b/client/app/videos/shared/loader/loader.component.ts new file mode 100644 index 000000000..666d43bc3 --- /dev/null +++ b/client/app/videos/shared/loader/loader.component.ts @@ -0,0 +1,11 @@ +import { Component, Input } from '@angular/core'; + +@Component({ + selector: 'my-loader', + styleUrls: [ 'client/app/videos/shared/loader/loader.component.css' ], + templateUrl: 'client/app/videos/shared/loader/loader.component.html' +}) + +export class LoaderComponent { + @Input() loading: boolean; +} -- cgit v1.2.3