Skip to content

Commit

Permalink
feat: add new loader
Browse files Browse the repository at this point in the history
  • Loading branch information
imransilvake committed Dec 25, 2020
1 parent 5343404 commit c5ad1b2
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .stylelintrc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"string-no-newline": true,
"string-quotes": "single",

"unit-blacklist": ["em"],
"unit-disallowed-list": ["em"],
"unit-case": "lower",
"unit-no-unknown": true,

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<div class="ik-photography">
<div class="cd-container-fluid">
<!-- Loader -->
<div class="ik-page-loader" *ngIf="!isPageLoaded; else elseContent">
<img [src]="'/assets/svg/loader.svg'" [alt]="'loader'" />
<div *ngIf="!isPageLoaded; else elseContent">
<app-loader></app-loader>
</div>

<!-- Content -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,6 @@
.ik-photography {
background-color: var(--tc4);

.ik-page-loader {
margin-top: 30px;
text-align: center;

.ik-icon {
font-size: cd-fontSize(s40);
}
}

.ik-slider-wrapper {
.ik-photo {
position: relative;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<div class="ik-loader">
<div class="ik-loader-bar"></div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.ik-loader {
height: 3px;
margin: 20px auto;
overflow: hidden;
position: relative;
width: 200px;

.ik-loader-bar {
animation: sideToside 2s ease-in-out infinite;
background-color: var(--c8);
border-radius: 5px;
height: 100%;
position: absolute;
width: 50%;
}
}

@keyframes sideToside {
0%,
100% {
transform: translateX(-50%);
}

50% {
transform: translateX(150%);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// angular
import { Component } from '@angular/core';

@Component({
selector: 'app-loader',
templateUrl: './loader.component.html',
styleUrls: ['./loader.component.scss']
})

export class LoaderComponent {
}
7 changes: 5 additions & 2 deletions src/app/packages/utilities.pck/widgets.mod/widgets.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { CardInfoComponent } from './components/card/info/card-info.component';
import { CardNoticeComponent } from './components/card/notice/card-notice.component';
import { CardListComponent } from './components/card/list/card-list.component';
import { CardCodeComponent } from './components/card/code/card-code.component';
import { LoaderComponent } from './components/loader/loader.component';

@NgModule({
imports: [
Expand All @@ -22,12 +23,14 @@ import { CardCodeComponent } from './components/card/code/card-code.component';
CardInfoComponent,
CardNoticeComponent,
CardListComponent,
CardCodeComponent
CardCodeComponent,
LoaderComponent
],
exports: [
PhotoGalleryComponent,
SliderComponent,
CardComponent
CardComponent,
LoaderComponent
]
})

Expand Down

0 comments on commit c5ad1b2

Please sign in to comment.