Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ export class AppModule { }
|preserveAspectRatio|string|`'xMidYMid meet'`||
|primaryColor|string|`'#f9f9f9'`||
|secondaryColor|string|`'#ecebeb'`||
|primaryOpacity|number|`1`||
|secondaryOpacity|number|`1`||
|uniqueKey|string|`randomId()`|Unique ID, you need to make it consistent for SSR|

## Credits
Expand Down
20 changes: 10 additions & 10 deletions src/lib/src/content-loader.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@

<linearGradient [attr.id]="idGradient">

<stop offset="0%" [attr.stop-color]="primaryColor">
<animate attributeName="offset" values="-2; 1" attr.dur={{speed}}s repeatCount="indefinite" />
</stop>
<stop offset="0%" [attr.stop-color]="primaryColor" [attr.stop-opacity]="primaryOpacity">
<animate attributeName="offset" values="-2; 1" attr.dur={{speed}}s repeatCount="indefinite" />
</stop>

<stop offset="50%" [attr.stop-color]="secondaryColor">
<animate attributeName="offset" values="-1.5; 1.5" attr.dur={{speed}}s repeatCount="indefinite" />
</stop>
<stop offset="50%" [attr.stop-color]="secondaryColor" [attr.stop-opacity]="secondaryOpacity">
<animate attributeName="offset" values="-1.5; 1.5" attr.dur={{speed}}s repeatCount="indefinite" />
</stop>

<stop offset="100%" [attr.stop-color]="primaryColor">
<animate attributeName="offset" values="-1; 2" attr.dur={{speed}}s repeatCount="indefinite" />
</stop>
<stop offset="100%" [attr.stop-color]="primaryColor" [attr.stop-opacity]="primaryOpacity">
<animate attributeName="offset" values="-1; 2" attr.dur={{speed}}s repeatCount="indefinite" />
</stop>

</linearGradient>

</defs>

</svg>
</svg>
2 changes: 2 additions & 0 deletions src/lib/src/content-loader.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ export class ContentLoaderComponent {
@Input() preserveAspectRatio = 'xMidYMid meet';
@Input() primaryColor = '#f9f9f9';
@Input() secondaryColor = '#ecebeb';
@Input() primaryOpacity = 1;
@Input() secondaryOpacity = 1;
@Input() uniqueKey;
idClip = uid();
idGradient = uid();
Expand Down