File tree Expand file tree Collapse file tree 5 files changed +23
-3
lines changed Expand file tree Collapse file tree 5 files changed +23
-3
lines changed Original file line number Diff line number Diff line change 2
2
"description" : " NativeScript Application" ,
3
3
"main" : " src/main.ts" ,
4
4
"dependencies" : {
5
+ "@mdi/font" : " 4.9.95" ,
5
6
"@angular/animations" : " ~11.2.7" ,
6
7
"@angular/common" : " ~11.2.7" ,
7
8
"@angular/compiler" : " ~11.2.7" ,
Original file line number Diff line number Diff line change 1
1
@import '@nativescript/theme/css/core.css' ;
2
2
@import '@nativescript/theme/css/default.css' ;
3
-
3
+ .mdi {
4
+ font-family : 'materialdesignicons-webfont' , 'Material Design Icons' ;
5
+ }
4
6
MDTabStrip {
5
7
selected-item-color : # FFFFFF ;
6
8
un-selected-item-color : # 404040 ;
Original file line number Diff line number Diff line change 11
11
</ MDTabStripItem >
12
12
< MDTabStripItem >
13
13
< Label text ="Search "> </ Label >
14
- < Image src ="res ://ic_menu "> </ Image >
14
+ < Image src ="font :// " class =" mdi "> </ Image >
15
15
</ MDTabStripItem >
16
16
</ MDTabStrip >
17
17
Original file line number Diff line number Diff line change 1
1
// this import should be first in order to load some required settings (like globals and reflect-metadata)
2
2
import { platformNativeScriptDynamic } from "@nativescript/angular" ;
3
-
3
+ import { themer } from '@nativescript-community/ui-material-core' ;
4
4
import { AppModule } from './app/app.module' ;
5
5
6
+ if ( global . isIOS ) {
7
+ themer . setPrimaryColor ( '#bff937' ) ;
8
+ themer . setPrimaryColorVariant ( '#33B5E5' ) ;
9
+ themer . setAccentColor ( '#ff8a39' ) ;
10
+ themer . setSecondaryColor ( '#a830d7' ) ;
11
+ }
12
+
6
13
// A traditional NativeScript application starts by initializing global objects,
7
14
// setting up global CSS rules, creating, and navigating to the main page.
8
15
// Angular applications need to take care of their own initialization:
Original file line number Diff line number Diff line change @@ -6,6 +6,16 @@ module.exports = (env) => {
6
6
// Learn how to customize:
7
7
// https://docs.nativescript.org/webpack
8
8
9
+ // Example: copy all files from a dependency
10
+ webpack . Utils . addCopyRule ( {
11
+ from : '@mdi/font/fonts/materialdesignicons-webfont.ttf' ,
12
+ to : 'fonts' ,
13
+ // the context of the "from" rule, in this case node_modules
14
+ // we used the getProjectFilePath util here, but this could have been
15
+ // a path.resolve(__dirname, 'node_modules') too.
16
+ context : webpack . Utils . project . getProjectFilePath ( 'node_modules' )
17
+ } )
18
+
9
19
return webpack . resolveConfig ( ) ;
10
20
} ;
11
21
You can’t perform that action at this time.
0 commit comments