-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
244 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...examples/loaders/rotating-cube-loader-example/rotating-cube-loader-example.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<wtf-rotating-cube-loader/> |
4 changes: 4 additions & 0 deletions
4
...examples/loaders/rotating-cube-loader-example/rotating-cube-loader-example.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
:host{ | ||
height: 500px; | ||
display: block; | ||
} |
21 changes: 21 additions & 0 deletions
21
...mples/loaders/rotating-cube-loader-example/rotating-cube-loader-example.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { RotatingCubeLoaderExampleComponent } from './rotating-cube-loader-example.component'; | ||
|
||
describe('RotatingCubeLoaderExampleComponent', () => { | ||
let component: RotatingCubeLoaderExampleComponent; | ||
let fixture: ComponentFixture<RotatingCubeLoaderExampleComponent>; | ||
|
||
beforeEach(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [RotatingCubeLoaderExampleComponent] | ||
}); | ||
fixture = TestBed.createComponent(RotatingCubeLoaderExampleComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
10 changes: 10 additions & 0 deletions
10
...s-examples/loaders/rotating-cube-loader-example/rotating-cube-loader-example.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'wtd-rotating-cube-loader-example', | ||
templateUrl: './rotating-cube-loader-example.component.html', | ||
styleUrls: ['./rotating-cube-loader-example.component.scss'] | ||
}) | ||
export class RotatingCubeLoaderExampleComponent { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
projects/wtfui/src/lib/loaders/rotating-cube-loader/rotating-cube-loader.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<div class="cube div"> | ||
<div class="top div"></div> | ||
<div class="div"> | ||
<span class="span" style="--i: 0"> | ||
<p>loading..</p> | ||
<p>loading..</p> | ||
</span> | ||
<span class="span" style="--i: 1"> | ||
<p>loading..</p> | ||
<p>loading..</p> | ||
</span> | ||
<span class="span" style="--i: 2"> | ||
<p>loading..</p> | ||
<p>loading..</p> | ||
</span> | ||
<span class="span" style="--i: 3"> | ||
<p>loading..</p> | ||
<p>loading..</p> | ||
</span> | ||
</div> | ||
</div> | ||
|
135 changes: 135 additions & 0 deletions
135
projects/wtfui/src/lib/loaders/rotating-cube-loader/rotating-cube-loader.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
:host { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
width: 100%; | ||
height: 100%; | ||
.cube { | ||
position: relative; | ||
height: 100px; | ||
width: 100px; | ||
transform-style: preserve-3d; | ||
animation: animate 4s linear infinite; | ||
} | ||
|
||
@keyframes animate { | ||
0% { | ||
transform: rotateX(-30deg) rotateY(0deg); | ||
} | ||
|
||
100% { | ||
transform: rotateX(-30deg) rotateY(360deg); | ||
} | ||
} | ||
|
||
.cube .div { | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
transform-style: preserve-3d; | ||
} | ||
|
||
.cube .div .span { | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
transform: rotateY(calc(90deg * var(--i))) translateZ(50px); | ||
background-image: linear-gradient( | ||
-45deg, | ||
#000000, | ||
#13273f, | ||
#0d1729, | ||
#6a6a8d); | ||
background-size: 1200% 1200%; | ||
animation: AnimationName 30s ease infinite; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
transform-style: preserve-3d; | ||
} | ||
|
||
.cube .div .span p { | ||
position: absolute; | ||
font-size: 1em; | ||
color: white; | ||
transform: translateZ(20px); | ||
} | ||
|
||
.cube .div .span p:nth-child(1) { | ||
transform: translateZ(0) translateY(20px); | ||
color: rgba(0,0,0,0.1); | ||
filter: blur(2px); | ||
} | ||
|
||
@keyframes AnimationName { | ||
0% { | ||
background-position: 0% 50%; | ||
} | ||
|
||
50% { | ||
background-position: 100% 50%; | ||
} | ||
|
||
100% { | ||
background-position: 0% 50%; | ||
} | ||
} | ||
|
||
.top { | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
width: 300px; | ||
height: 300px; | ||
background-image: linear-gradient( | ||
-45deg, | ||
#000000, | ||
#13273f, | ||
#0d1729, | ||
#6a6a8d); | ||
transform: rotateX(90deg) translateZ(50px); | ||
background-size: 1200% 1200%; | ||
animation: AnimationName 30s ease infinite; | ||
} | ||
|
||
.top::before { | ||
content: ''; | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
width: 100px; | ||
height: 100px; | ||
background-image: linear-gradient( | ||
-45deg, | ||
#000000, | ||
#0d0d0e, | ||
#030303, | ||
#000000); | ||
background-size: 1200% 1200%; | ||
animation: AnimationName 30s ease infinite; | ||
box-shadow: 0 0 120px #3d413e,0 0 120px #302f2f,0 0 120px #413f3f; | ||
transition: box-shadow 3s; | ||
transform: translateZ(-200px); | ||
filter: blur(40px); | ||
} | ||
|
||
@keyframes AnimationName2 { | ||
0% { | ||
background-position: 0% 50%; | ||
} | ||
|
||
50% { | ||
background-position: 100% 50%; | ||
} | ||
|
||
100% { | ||
background-position: 0% 50%; | ||
} | ||
} | ||
|
||
|
||
} |
21 changes: 21 additions & 0 deletions
21
projects/wtfui/src/lib/loaders/rotating-cube-loader/rotating-cube-loader.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { RotatingCubeLoaderComponent } from './rotating-cube-loader.component'; | ||
|
||
describe('RotatingCubeLoaderComponent', () => { | ||
let component: RotatingCubeLoaderComponent; | ||
let fixture: ComponentFixture<RotatingCubeLoaderComponent>; | ||
|
||
beforeEach(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [RotatingCubeLoaderComponent] | ||
}); | ||
fixture = TestBed.createComponent(RotatingCubeLoaderComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
12 changes: 12 additions & 0 deletions
12
projects/wtfui/src/lib/loaders/rotating-cube-loader/rotating-cube-loader.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'wtf-rotating-cube-loader', | ||
templateUrl: './rotating-cube-loader.component.html', | ||
styleUrls: ['./rotating-cube-loader.component.scss'] | ||
}) | ||
export class RotatingCubeLoaderComponent { | ||
|
||
// Design by Radwa Khalil | ||
// src: https://uiverse.io/radwakhalil22/spotty-pug-7 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters