-
Notifications
You must be signed in to change notification settings - Fork 2
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
1 parent
a369685
commit bb6e01e
Showing
12 changed files
with
1,161 additions
and
43 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
83 changes: 43 additions & 40 deletions
83
src/app/modules/dashboard/pages/index/index.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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,6 +57,7 @@ | |
transform: rotate(360deg); | ||
} | ||
} | ||
|
||
.card { | ||
position: absolute; | ||
z-index: 10; | ||
|
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
7 changes: 7 additions & 0 deletions
7
src/app/shared/components/backgrounds/bg-l1/bg-l1.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,7 @@ | ||
:host { | ||
display: block; | ||
min-height: 100%; | ||
background-blend-mode: luminosity; | ||
width: 100%; | ||
transition: background 0.3s ease; | ||
} |
48 changes: 48 additions & 0 deletions
48
src/app/shared/components/backgrounds/bg-l1/bg-l1.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,48 @@ | ||
import { Component, Input, HostBinding, OnDestroy, OnInit } from '@angular/core'; | ||
import { Subscription } from 'rxjs'; | ||
import { Theme } from 'src/app/core/models/theme.model'; | ||
import { ThemeService } from 'src/app/core/services/theme.service'; | ||
|
||
@Component({ | ||
selector: '[tmr-bg-l1]', | ||
standalone: true, | ||
imports: [], | ||
template: `<div class="relative w-full -mt-4"> | ||
<ng-content></ng-content> | ||
</div> `, | ||
styleUrl: './bg-l1.component.scss', | ||
}) | ||
export class BgL1Component implements OnInit, OnDestroy { | ||
@Input() light: string = `/assets/bg/top.jpg`; | ||
@Input() dark: string = `/assets/bg/everest.svg`; | ||
public imageUrl: string = ''; | ||
// 'https://images.unsplash.com/photo-1439723680580-bfd9d28ef9b6?crop=entropy&fit=crop&fm=jpg&h=950&ixjsv=2.1.0&ixlib=rb-0.3.5&q=80&w=1925'; | ||
|
||
@HostBinding('class') hostClass = ''; | ||
@HostBinding('style.background') backgroundStyle = ''; | ||
private themeSubscription!: Subscription; | ||
|
||
constructor(public themeService: ThemeService) {} | ||
|
||
ngOnInit(): void { | ||
this.themeSubscription = this.themeService.theme$.subscribe((theme: Theme) => { | ||
this.updateBackground(theme.mode); | ||
}); | ||
} | ||
private updateBackground(mode: string): void { | ||
const gradient = | ||
mode === 'dark' | ||
? 'linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7))' | ||
: 'linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1))'; | ||
|
||
const position = '50% 50% no-repeat'; | ||
this.imageUrl = mode === 'dark' ? this.dark : this.light; | ||
this.backgroundStyle = `${gradient}, black url('${this.imageUrl}') ${position}`; | ||
} | ||
|
||
ngOnDestroy(): void { | ||
if (this.themeSubscription) { | ||
this.themeSubscription.unsubscribe(); | ||
} | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.