Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Style:Logos-added-register-page-#292 #323

Merged
merged 6 commits into from
Sep 12, 2023
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
6 changes: 5 additions & 1 deletion packages/portal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@
"@angular/platform-browser": "^16.0.5",
"@angular/platform-browser-dynamic": "^16.0.5",
"@angular/router": "^16.0.5",
"apollo-angular": "^5.0.1",
"@fortawesome/angular-fontawesome": "^0.13.0",
"@fortawesome/fontawesome-svg-core": "^6.4.2",
"@fortawesome/free-brands-svg-icons": "^6.4.2",
"@fortawesome/free-solid-svg-icons": "^6.4.2",
"apollo-angular": "^5.0.1",
"graphql": "^16.6.0",
"rxjs": "~7.5.0",
"tslib": "^2.3.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
<h1>Join with your favorite social media account</h1>
<section>
<!-- <img src="/assets/images/pic-purple.png" alt="Login background image" /> -->

<nav>

<a *ngFor="let provider of providers" mat-raised-button class="button btn__{{provider.id}}" [href]="loginWith(provider.id)">
Sign in with {{ provider.name }}
<div class="content">
<fa-icon size="xl" [icon]="provider.icon"></fa-icon>

<span class="text">Sign in with {{ provider.name }}</span>
</div>
</a>

</nav>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,20 @@ section {
width: 100%;
max-width: 400px;

button {
a {
width: 100%;
margin: 10px 0;

.content {
display: flex;
height: 100%;
justify-content: center;
align-items: center;

.text {
margin-left: 16px;
}
}
}
}
img {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,32 +1,40 @@
import { CommonModule } from "@angular/common";
import { Component, OnInit, inject } from "@angular/core";
import { MatButtonModule } from "@angular/material/button";
import { DomSanitizer } from "@angular/platform-browser";
import { MatIconRegistry, MatIconModule } from "@angular/material/icon";
import { MatCardModule } from "@angular/material/card";
import { MatFormFieldModule } from "@angular/material/form-field";
import { MatInputModule } from "@angular/material/input";
import { ActivatedRoute, Router } from "@angular/router";
import { AuthService } from "../shared/authentication/auth.service";
import { TextBlockComponent } from "../shared/text-block/text-block.component";
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
import { faApple, faFacebook, faGithub, faGoogle, faMicrosoft, faTwitter } from "@fortawesome/free-brands-svg-icons";

@Component({
selector: "app-authentication",
templateUrl: "./authentication.component.html",
styleUrls: ["./authentication.component.scss"],
imports: [CommonModule, MatButtonModule, MatCardModule, MatFormFieldModule, MatInputModule, TextBlockComponent],
imports: [CommonModule, MatButtonModule, MatCardModule, MatFormFieldModule, MatInputModule, TextBlockComponent, MatIconModule,FontAwesomeModule],
standalone: true,
})
export class AuthenticationComponent implements OnInit {
redirectURL = "/home";
public constructor(iconRegistry: MatIconRegistry, santizer: DomSanitizer) {
for (const provider of this.providers) {
iconRegistry.addSvgIcon(provider.id, santizer.bypassSecurityTrustResourceUrl(`../assets/company-logos/${provider.id}.svg`));
}
}

redirectURL = "/home";
providers = [
{ name: "Microsoft", id: "microsoft" },
{ name: "Facebook", id: "facebook" },
{ name: "Google", id: "google" },
{ name: "Twitter", id: "twitter" },
{ name: "GitHub", id: "github" },
{ name: "Apple", id: "apple" }
{ name: "Microsoft", id: "microsoft", icon: faFacebook },
{ name: "Facebook", id: "facebook", icon: faMicrosoft },
{ name: "Google", id: "google", icon: faGoogle },
{ name: "Twitter", id: "twitter", icon: faTwitter },
{ name: "GitHub", id: "github", icon: faGithub },
{ name: "Apple", id: "apple", icon: faApple }
];

private router = inject(Router);
private route = inject(ActivatedRoute);
private authService = inject(AuthService);
Expand Down
1 change: 1 addition & 0 deletions packages/portal/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200"
/>

</head>
<body class="body mat-typography">
<app-root class="app-wrapper"></app-root>
Expand Down