mirror of
https://github.com/mdbootstrap/mdb-ui-kit.git
synced 2024-11-29 04:54:12 +03:00
Add automatic $.material.init() + example
This commit is contained in:
parent
e07961e23d
commit
b6bd06c68e
|
@ -47,9 +47,10 @@ If you encounter an issue while using this package, please CC @dandv when you fi
|
|||
|
||||
# DONE
|
||||
|
||||
* Automatically initialize the JS on client startup: `$.material.init()`
|
||||
* Material Design Icons font loading test: EOT, SVG, TTF, WOFF
|
||||
* Bootstrap plugin loading tests
|
||||
* Visual check , inclding for the ripple effect
|
||||
* Visual check, including for the ripple effect
|
||||
|
||||
|
||||
# TODO
|
||||
|
|
1
meteor/example/.meteor/.gitignore
vendored
Normal file
1
meteor/example/.meteor/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
local
|
7
meteor/example/.meteor/packages
Normal file
7
meteor/example/.meteor/packages
Normal file
|
@ -0,0 +1,7 @@
|
|||
# Meteor packages used by this project, one per line.
|
||||
#
|
||||
# 'meteor add' and 'meteor remove' will edit this file for you,
|
||||
# but you can also edit it by hand.
|
||||
|
||||
meteor-platform
|
||||
fezvrasta:bootstrap-material-design-noglyph
|
1
meteor/example/.meteor/release
Normal file
1
meteor/example/.meteor/release
Normal file
|
@ -0,0 +1 @@
|
|||
METEOR@1.0.1
|
3
meteor/example/client/bmd.css
Normal file
3
meteor/example/client/bmd.css
Normal file
|
@ -0,0 +1,3 @@
|
|||
body {
|
||||
background: #8BC34A;
|
||||
}
|
14
meteor/example/client/bmd.html
Normal file
14
meteor/example/client/bmd.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
<body>
|
||||
<h1>Watch the ripple effect on newly created buttons!</h1>
|
||||
|
||||
{{> hello}}
|
||||
</body>
|
||||
|
||||
<template name="hello">
|
||||
<button type="button" class="btn btn-info">Click Me</button>
|
||||
<hr/>
|
||||
{{#each buttons}}
|
||||
<button type="button" class="btn btn-primary">{{name}}</button>
|
||||
<br/>
|
||||
{{/each}}
|
||||
</template>
|
15
meteor/example/client/bmd.js
Normal file
15
meteor/example/client/bmd.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
'use strict';
|
||||
|
||||
var Buttons = new Mongo.Collection(null);
|
||||
|
||||
Template.hello.helpers({
|
||||
buttons: function () {
|
||||
return Buttons.find();
|
||||
}
|
||||
});
|
||||
|
||||
Template.hello.events({
|
||||
'click button': function (event, template) {
|
||||
Buttons.insert({name: _.sample(['No, click ME!', 'Click me too!', 'Click here!', 'Hey!', 'Psst!'])});
|
||||
}
|
||||
});
|
1
meteor/example/packages/bootstrap-material-design
Symbolic link
1
meteor/example/packages/bootstrap-material-design
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../../
|
5
meteor/example/run.bat
Executable file
5
meteor/example/run.bat
Executable file
|
@ -0,0 +1,5 @@
|
|||
mklink ..\..\package.js "meteor/package-noglyph.js"
|
||||
mklink package.json "../../package.json"
|
||||
set MONGO_URL=mongodb://
|
||||
meteor run
|
||||
del ..\..\package.js package.json
|
15
meteor/example/run.sh
Executable file
15
meteor/example/run.sh
Executable file
|
@ -0,0 +1,15 @@
|
|||
# sanity check: make sure we're in the root directory of the example
|
||||
cd "$( dirname "$0" )"
|
||||
|
||||
# delete temp files even if Ctrl+C is pressed
|
||||
int_trap() {
|
||||
echo "Cleaning up..."
|
||||
}
|
||||
trap int_trap INT
|
||||
|
||||
ln -s "meteor/package-noglyph.js" ../../package.js
|
||||
ln -s "../../package.json" package.json
|
||||
|
||||
MONGO_URL=mongodb:// meteor run
|
||||
|
||||
rm ../../package.js package.json
|
3
meteor/init.js
Normal file
3
meteor/init.js
Normal file
|
@ -0,0 +1,3 @@
|
|||
Meteor.startup(function () {
|
||||
$.material.init();
|
||||
});
|
|
@ -26,7 +26,8 @@ Package.onUse(function (api) {
|
|||
'dist/css/material-wfont.css', // includes @font-face rules to load the Roboto font
|
||||
'dist/css/ripples.css',
|
||||
'dist/js/material.js',
|
||||
'dist/js/ripples.js'
|
||||
'dist/js/ripples.js',
|
||||
'meteor/init.js'
|
||||
], where);
|
||||
});
|
||||
|
||||
|
|
|
@ -21,7 +21,8 @@ Package.onUse(function (api) {
|
|||
'dist/css/material-wfont.css', // includes @font-face rules to load the Roboto font
|
||||
'dist/css/ripples.css',
|
||||
'dist/js/material.js',
|
||||
'dist/js/ripples.js'
|
||||
'dist/js/ripples.js',
|
||||
'meteor/init.js'
|
||||
], where);
|
||||
});
|
||||
|
||||
|
|
|
@ -26,7 +26,8 @@ Package.onUse(function (api) {
|
|||
'dist/css/material-wfont.css', // includes @font-face rules to load the Roboto font
|
||||
'dist/css/ripples.css',
|
||||
'dist/js/material.js',
|
||||
'dist/js/ripples.js'
|
||||
'dist/js/ripples.js',
|
||||
'meteor/init.js'
|
||||
], where);
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user