Skip to content
This repository was archived by the owner on Oct 1, 2018. It is now read-only.

Commit caab113

Browse files
feat(teams page): replace fa with individual fonts
used https://icomoon.io to generate a much smaller font pack
1 parent 8efcfe3 commit caab113

File tree

6 files changed

+37
-13
lines changed

6 files changed

+37
-13
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
"@angular/router": "5.0.2",
4242
"@types/hammerjs": "2.0.35",
4343
"core-js": "2.4.1",
44-
"font-awesome": "4.7.0",
4544
"hammerjs": "2.0.8",
4645
"rxjs": "5.5.2",
4746
"ts-loader": "3.1.1",
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<a *ngIf="!!githubUrl" mat-button [href]="githubUrl">
2-
<mat-icon class="icon-github" fontSet="fa" fontIcon="fa-github"></mat-icon>
2+
<mat-icon class="icon-github"></mat-icon>
33
</a>
44
<a *ngIf="!!twitterUrl" mat-button [href]="twitterUrl">
5-
<mat-icon class="icon-twitter" fontSet="fa" fontIcon="fa-twitter"></mat-icon>
5+
<mat-icon class="icon-twitter"></mat-icon>
66
</a>
77
<a *ngIf="!!linkedinUrl" mat-button [href]="linkedinUrl">
8-
<mat-icon class="icon-linkedin" fontSet="fa" fontIcon="fa-linkedin"></mat-icon>
8+
<mat-icon class="icon-linkedin"></mat-icon>
99
</a>

src/app/team/team.module.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {
55
MatCardModule,
66
MatButtonModule,
77
MatIconModule,
8-
MatIconRegistry
98
} from '@angular/material';
109

1110
import { TeamRoutingModule } from './team-routing.module';
@@ -22,11 +21,7 @@ import { SocialSharingComponent } from './social-sharing/social-sharing.componen
2221
MatButtonModule,
2322
MatIconModule
2423
],
25-
providers: [TeamService, MatIconRegistry],
24+
providers: [TeamService],
2625
declarations: [TeamComponent, MemberComponent, SocialSharingComponent]
2726
})
28-
export class TeamModule {
29-
constructor(private matIconRegistry: MatIconRegistry) {
30-
matIconRegistry.registerFontClassAlias('fontawesome', 'fa');
31-
}
32-
}
27+
export class TeamModule {}

src/assets/fonts/icomoon.woff

1.99 KB
Binary file not shown.

src/styles.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
@import '~@angular/material/theming';
2-
$fa-font-path: "~font-awesome/fonts";
3-
@import "~font-awesome/scss/font-awesome";
42
@import './app/operators/operator-theme';
53
@import './styles/code-helpers';
4+
@import './styles/fonts';
65

76
@include mat-core();
87
// Define the theme.

src/styles/_fonts.scss

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
@font-face {
2+
font-family: 'icomoon';
3+
src: url('assets/fonts/icomoon.woff?6yfful') format('woff');
4+
font-weight: normal;
5+
font-style: normal;
6+
}
7+
8+
[class^="icon-"], [class*=" icon-"] {
9+
/* use !important to prevent issues with browser extensions that change fonts */
10+
font-family: 'icomoon' !important;
11+
speak: none;
12+
font-style: normal;
13+
font-weight: normal;
14+
font-variant: normal;
15+
text-transform: none;
16+
line-height: 1;
17+
18+
/* Better Font Rendering =========== */
19+
-webkit-font-smoothing: antialiased;
20+
-moz-osx-font-smoothing: grayscale;
21+
}
22+
23+
.icon-linkedin:before {
24+
content: "\f08c";
25+
}
26+
.icon-twitter:before {
27+
content: "\f099";
28+
}
29+
.icon-github:before {
30+
content: "\f09b";
31+
}

0 commit comments

Comments
 (0)