Skip to content

Commit

Permalink
feat(LinearIcons): add into material icon registry
Browse files Browse the repository at this point in the history
  • Loading branch information
alecarn committed Aug 11, 2023
1 parent 86bd9cb commit 2813c1c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
} from '@igo2/core';
import { AuthOptions } from '@igo2/auth';
import { PwaService } from './services/pwa.service';
import { MatIconRegistry } from '@angular/material/icon';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
Expand All @@ -31,8 +32,10 @@ export class AppComponent {
private titleService: Title,
private metaService: Meta,
private messageService: MessageService,
private pwaService: PwaService
private pwaService: PwaService,
iconRegistry: MatIconRegistry,
) {
iconRegistry.registerFontClassAlias('Linearicons-Free', 'lnr');
this.readTitleConfig();
this.readThemeConfig();
this.readDescriptionConfig();
Expand Down
2 changes: 2 additions & 0 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700&family=Roboto:wght@400;500;600;700&display=swap"
rel="stylesheet"
/>
<link rel="stylesheet" href="https://cdn.linearicons.com/free/1.0.0/icon-font.min.css">

<!-- inline spinner styles to be able to display spinner right away -->
<style type="text/css">
body,
Expand Down
6 changes: 6 additions & 0 deletions src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,9 @@ ul,
ol {
padding: 2px 1rem;
}

// Fit Linearicons with the mat-icon
mat-icon.lnr {
font-size: 18px;
line-height: 24px;
}

0 comments on commit 2813c1c

Please sign in to comment.