Skip to content

Commit

Permalink
style: added the logos on loginpage Azure-Samples#292
Browse files Browse the repository at this point in the history
  • Loading branch information
Surya-V-28 committed Aug 28, 2023
1 parent f9e3bdc commit f880ec1
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ <h1>Join with your favorite social media account</h1>
<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">
<mat-icon svgIcon="{{provider.id}}" />

<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 All @@ -46,7 +57,7 @@ section {
}

.btn__twitter {
background-color: #1da1f2;
background-color: #183343dd;
color: #fff;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
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";
Expand All @@ -12,10 +14,16 @@ import { TextBlockComponent } from "../shared/text-block/text-block.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],
standalone: true,
})
export class AuthenticationComponent implements OnInit {
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 = [
Expand Down
1 change: 1 addition & 0 deletions packages/portal/src/assets/company-logos/apple.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/portal/src/assets/company-logos/facebook.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/portal/src/assets/company-logos/github.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/portal/src/assets/company-logos/google.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/portal/src/assets/company-logos/microsoft.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/portal/src/assets/company-logos/twitter.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f880ec1

Please sign in to comment.