Skip to content

Commit

Permalink
refactor(docs): use public folder
Browse files Browse the repository at this point in the history
  • Loading branch information
nzbin committed Aug 21, 2024
1 parent cd8ff2e commit a5f1f57
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 11 deletions.
20 changes: 16 additions & 4 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,17 +151,29 @@
"tsConfig": "projects/docs/tsconfig.app.json",
"inlineStyleLanguage": "scss",
"assets": [
"projects/docs/src/favicon.ico",
"projects/docs/src/assets",
{
"glob": "**/*",
"input": "projects/docs/public"
},
{
"glob": "*",
"input": "node_modules/@mdi/font/fonts",
"output": "assets/fonts"
"output": "fonts"
},
{
"glob": "*.min.css",
"input": "node_modules/@mdi/font/css",
"output": "assets/fonts"
"output": "fonts"
},
{
"glob": "*.css",
"input": "node_modules/@angular/material/prebuilt-themes",
"output": "themes/material"
},
{
"glob": "*.css",
"input": "node_modules/@ng-matero/extensions/prebuilt-themes",
"output": "themes/extensions"
}
],
"styles": [
Expand Down
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions projects/docs/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ import { RouterOutlet } from '@angular/router';
export class AppComponent {
title = 'docs';

icons = ['menu', 'github'];
icons = ['menu', 'github', 'format_color_fill'];

constructor(iconRegistry: MatIconRegistry, sanitizer: DomSanitizer) {
for (const i of this.icons) {
iconRegistry.addSvgIcon(i, sanitizer.bypassSecurityTrustResourceUrl(`assets/icons/${i}.svg`));
iconRegistry.addSvgIcon(i, sanitizer.bypassSecurityTrustResourceUrl(`icons/${i}.svg`));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export class BasicControlsComponent {
this.useIcon == 1
? 'mdi mdi-format-align-' + opt.value
: this.useIcon == 2
? './assets/images/align_' + opt.value + '.png'
? './images/align_' + opt.value + '.png'
: undefined,
};
});
Expand Down Expand Up @@ -165,17 +165,17 @@ export class BasicControlsComponent {
{
label: 'img1',
value: 'img1',
src: './assets/images/icon3d1.webp',
src: './images/icon3d1.webp',
},
{
label: 'img2',
value: 'img2',
src: './assets/images/icon3d2.webp',
src: './images/icon3d2.webp',
},
{
label: 'img3',
value: 'img3',
src: './assets/images/icon3d3.webp',
src: './images/icon3d3.webp',
},
],
},
Expand Down
2 changes: 1 addition & 1 deletion projects/docs/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<base href="/">
<meta name="viewport" content="initial-scale=1, minimum-scale=1, maximum-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link rel="stylesheet" href="assets/fonts/materialdesignicons.min.css">
<link rel="stylesheet" href="fonts/materialdesignicons.min.css">
</head>
<body>
<app-root></app-root>
Expand Down

0 comments on commit a5f1f57

Please sign in to comment.