开源软件名称(OpenSource Name):mike-north/ember-material-lite开源软件地址(OpenSource Url):https://github.com/mike-north/ember-material-lite开源编程语言(OpenSource Language):JavaScript 65.6%开源软件介绍(OpenSource Introduction):ember-material-liteGoogle's Material Design Lite for Ember.js apps This addon requires ember >= Installation
Without SASSThis addon can be used without SASS (relying on pure CSS for styles). If you choose this path, you'll need to alter your app slightly.
app.import('node_modules/material-design-lite/material.css'); ConfigurationColorsYou can customize the colors of material design elements globally by setting sass variables prior to importing the main styles. app/styles/app.scss @import '_color-definitions';
$color-primary: $palette-teal-500;
$color-accent: $palette-pink-A200;
@import 'material-design-lite'; Load Material design icons fontfiles locallyAdding var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var mergeTrees = require('broccoli-merge-trees');
var pickFiles = require('broccoli-static-compiler');
module.exports = function(defaults) {
var app = new EmberApp(defaults, {
sassOptions: {
includePaths: ['node_modules/material-design-lite/src']
}
});
var googleFontFiles = pickFiles(
'node_modules/material-design-icons/iconfont',
{
srcDir: '/',
files: ['**/*.woff', '**/*.woff2', '**/*.eot', '**/*.ttf'],
destDir: '/fonts'
}
);
return mergeTrees([app.toTree(), googleFontFiles]);
}; Also Add below code on top of /*Material Icons css*/
@font-face {
font-family: 'Material Icons';
font-style: normal;
font-weight: 400;
src: url(../fonts/MaterialIcons-Regular.eot); /* For IE6-8 */
src: local('Material Icons'), local('MaterialIcons-Regular'),
url(../fonts/MaterialIcons-Regular.woff2) format('woff2'), url(../fonts/MaterialIcons-Regular.woff)
format('woff'), url(../fonts/MaterialIcons-Regular.ttf) format('truetype');
} ImagesSeveral of the MDL components reference image assets. In order to include them in your project, edit var mergeTrees = require('broccoli-merge-trees');
var pickFiles = require('broccoli-static-compiler');
module.exports = function(defaults) {
var app = new EmberApp(defaults, {
sassOptions: {
includePaths: ['node_modules/material-design-lite/src']
}
});
var materialSVG = pickFiles('node_modules/material-design-lite/src/images', {
srcDir: '/',
files: ['**/*.svg'],
destDir: '/images'
});
return mergeTrees([app.toTree(), materialSVG]);
}; Running Tests
Building
For more information on using ember-cli, visit http://www.ember-cli.com/. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论