-
-
Notifications
You must be signed in to change notification settings - Fork 401
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
19 changed files
with
199 additions
and
155 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
6 changes: 6 additions & 0 deletions
6
src/Ombi/ClientApp/src/app/components/image-background/image-background.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,6 @@ | ||
<div @fadeInOut class="bg" [style.background-image]="background"> | ||
<div class="login-gradient-bar"> | ||
</div> | ||
|
||
<div class="poster-desc">{{name}}</div> | ||
</div> |
26 changes: 26 additions & 0 deletions
26
src/Ombi/ClientApp/src/app/components/image-background/image-background.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,26 @@ | ||
.login-gradient-bar{ | ||
background: linear-gradient(-10deg, transparent 20%, rgba(0,0,0,0.6) 20.0%, rgba(0,0,0,0.6) 80.0%, transparent 60%),transparent; | ||
height:100%; | ||
width:100%; | ||
position: absolute; | ||
} | ||
|
||
.bg { | ||
background-position: center center; | ||
background-repeat: no-repeat; | ||
background-attachment: fixed; | ||
background-size: cover; | ||
height: 100vh; | ||
width: 100vw; | ||
position: fixed; | ||
} | ||
|
||
.poster-desc { | ||
padding-left: 1%; | ||
color: white; | ||
height: 100vh; | ||
width: 100vw; | ||
display: flex; | ||
justify-content: end; | ||
flex-direction: column; | ||
} |
43 changes: 43 additions & 0 deletions
43
src/Ombi/ClientApp/src/app/components/image-background/image-background.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,43 @@ | ||
import { OmbiCommonModules } from "../modules"; | ||
import { Component, OnDestroy, OnInit } from "@angular/core"; | ||
import { DomSanitizer } from "@angular/platform-browser"; | ||
import { BrowserAnimationsModule } from "@angular/platform-browser/animations"; | ||
import { ImageService } from "../../services"; | ||
import { fadeInOutAnimation } from "app/animations/fadeinout"; | ||
|
||
@Component({ | ||
standalone: true, | ||
selector: 'ombi-image-background', | ||
templateUrl: './image-background.component.html', | ||
styleUrls: ['./image-background.component.scss'], | ||
imports: [...OmbiCommonModules, BrowserAnimationsModule], | ||
providers: [ ImageService ], | ||
animations: [ fadeInOutAnimation ], | ||
}) | ||
export class ImageBackgroundComponent implements OnInit, OnDestroy { | ||
|
||
public background: any; | ||
public name: string; | ||
private timer: NodeJS.Timer; | ||
|
||
constructor(private images: ImageService, private sanitizer: DomSanitizer) { } | ||
|
||
public ngOnDestroy(): void { | ||
clearTimeout(this.timer); | ||
} | ||
|
||
public ngOnInit(): void { | ||
this.cycleBackground(); | ||
|
||
this.timer = setInterval(() => { | ||
this.cycleBackground(); | ||
}, 30000); | ||
} | ||
|
||
private cycleBackground() { | ||
this.images.getRandomBackgroundWithInfo().subscribe((x) => { | ||
this.background = this.sanitizer.bypassSecurityTrustStyle("url(" + x.url + ")"); | ||
this.name = x.name; | ||
}); | ||
} | ||
} |
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 @@ | ||
export * from "./image-background/image-background.component"; |
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,3 @@ | ||
import { CommonModule } from "@angular/common"; | ||
|
||
export const OmbiCommonModules = [ CommonModule ]; |
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 |
---|---|---|
@@ -1,3 +1,7 @@ | ||
export interface IImages { | ||
url: string; | ||
} | ||
export interface IImagesInfo { | ||
url: string; | ||
name: string; | ||
} |
4 changes: 2 additions & 2 deletions
4
src/Ombi/ClientApp/src/app/landingpage/landingpage.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
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
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
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
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
Oops, something went wrong.