-
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.
trim app down to barebones, add runtime language switcher
- Loading branch information
Showing
59 changed files
with
128 additions
and
434 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
import { Component } from '@angular/core'; | ||
import { Component, OnInit } from '@angular/core'; | ||
import { Social, socials } from '../../../constants'; | ||
|
||
@Component({ | ||
selector: 'ngx-footer', | ||
styleUrls: ['./footer.component.scss'], | ||
template: ` | ||
<span class="created-by">Created with ♥ by <b><a href="https://akveo.com" target="_blank">Akveo</a></b> 2017</span> | ||
<div class="socials"> | ||
<a href="#" target="_blank" class="ion ion-social-github"></a> | ||
<a href="#" target="_blank" class="ion ion-social-facebook"></a> | ||
<a href="#" target="_blank" class="ion ion-social-twitter"></a> | ||
<a href="#" target="_blank" class="ion ion-social-linkedin"></a> | ||
<a *ngFor="let social of socials" [href]="social.url" target="_blank" [ngClass]="social.classes"></a> | ||
</div> | ||
`, | ||
}) | ||
export class FooterComponent { | ||
export class FooterComponent implements OnInit { | ||
socials: Social[]; | ||
|
||
ngOnInit() { | ||
this.socials = socials; | ||
} | ||
} |
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 |
---|---|---|
@@ -1,50 +1,38 @@ | ||
import { Component, Input, OnInit } from '@angular/core'; | ||
import { Component, Input } from '@angular/core'; | ||
|
||
import { NbMenuService, NbSidebarService } from '@nebular/theme'; | ||
import { UserService } from '../../../@core/data/users.service'; | ||
import { TranslateService } from '@ngx-translate/core'; | ||
import { AnalyticsService } from '../../../@core/utils/analytics.service'; | ||
|
||
@Component({ | ||
selector: 'ngx-header', | ||
styleUrls: ['./header.component.scss'], | ||
templateUrl: './header.component.html', | ||
}) | ||
export class HeaderComponent implements OnInit { | ||
|
||
|
||
export class HeaderComponent { | ||
@Input() position = 'normal'; | ||
|
||
user: any; | ||
|
||
userMenu = [{ title: 'Profile' }, { title: 'Log out' }]; | ||
|
||
constructor( | ||
private sidebarService: NbSidebarService, | ||
private menuService: NbMenuService, | ||
private userService: UserService, | ||
private analyticsService: AnalyticsService | ||
private analyticsService: AnalyticsService, | ||
private translate: TranslateService, | ||
) { } | ||
|
||
ngOnInit() { | ||
this.userService.getUsers() | ||
.subscribe((users: any) => this.user = users.nick); | ||
} | ||
|
||
toggleSidebar(): boolean { | ||
this.sidebarService.toggle(true, 'menu-sidebar'); | ||
return false; | ||
} | ||
|
||
toggleSettings(): boolean { | ||
this.sidebarService.toggle(false, 'settings-sidebar'); | ||
return false; | ||
} | ||
|
||
goToHome() { | ||
this.menuService.navigateHome(); | ||
} | ||
|
||
startSearch() { | ||
this.analyticsService.trackEvent('startSearch'); | ||
} | ||
|
||
changeLanguage(lang: string) { | ||
this.translate.use(lang); | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
interface Social { | ||
title: string; | ||
url: string; | ||
classes: string; | ||
} | ||
|
||
const twitter: Social = { | ||
title: "twitter", | ||
url: "https://www.twitter.com", | ||
classes: "ion ion-social-twitter", | ||
}; | ||
|
||
const facebook: Social = { | ||
title: "facebook", | ||
url: "https://www.facebook.com", | ||
classes: "ion ion-social-facebook", | ||
}; | ||
|
||
const linkedIn: Social = { | ||
title: "linkedin", | ||
url: "https://www.linkedin.com", | ||
classes: "ion ion-social-linkedin", | ||
}; | ||
|
||
const socials: Social[] = [twitter, facebook, linkedIn]; | ||
|
||
export { | ||
socials, | ||
Social, | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 @@ | ||
<div class="row"> | ||
Hello. This is Home | ||
</div> |
File renamed without changes.
Oops, something went wrong.