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: added the logos on login-page #292 #313

Closed
Closed
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
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.