diff --git a/.versions b/.versions new file mode 100644 index 0000000..ff7dec6 --- /dev/null +++ b/.versions @@ -0,0 +1,18 @@ +babel-compiler@7.0.8 +babel-runtime@1.2.2 +caching-compiler@1.1.12 +dynamic-import@0.3.0 +ecmascript@0.10.8 +ecmascript-runtime@0.5.0 +ecmascript-runtime-client@0.6.2 +ecmascript-runtime-server@0.5.0 +gantrim:materialize-stylus@1.1.8 +http@1.4.1 +jquery@1.11.11 +meteor@1.8.6 +modules@0.11.6 +modules-runtime@0.9.2 +promise@0.10.2 +random@1.1.0 +stylus@2.513.14 +url@1.2.0 diff --git a/README.md b/README.md new file mode 100644 index 0000000..e954fa8 --- /dev/null +++ b/README.md @@ -0,0 +1,29 @@ +# ABOUT +Materialize CSS Packaged for meteor and using stylus. This packages allows you to use all variables available in the SCSS materialize package with the clean syntax of stylus. +# INSTALL +Please make sure to remove the base meteor materialize package. This package has everything you need. +``` +$ meteor add stylus +$ meteor add gantrim:materialize-stylus +``` + +# STYLUS +After you have added this package, create a main .styl file and add the following +``` +@import '{gantrim:materialize-stylus}/lib/styl/components/_mixins.import' +@import '{gantrim:materialize-stylus}/lib/styl/components/_color.import' +@import '{gantrim:materialize-stylus}/lib/styl/components/_variables.import' +// add your own variables/overrides here +@import '{gantrim:materialize-stylus}/lib/styl/materialize-components' + +``` + +# CONTRIBUTING +Bug fixes and pull requests welcome. At the very least, if you notice an issue please open an issue on github. + +# CREDIT/THANKS +[Materialize](https://github.com/Dogfalo/materialize) + +[meteor-materialize-scss](https://github.com/poetic/meteor-materialize-scss) + +[Sass2Stylus](https://github.com/mojotech/sass2stylus) \ No newline at end of file diff --git a/lib/js/bin/materialize.js b/lib/js/bin/materialize.js index 81601c8..260fa1b 100644 --- a/lib/js/bin/materialize.js +++ b/lib/js/bin/materialize.js @@ -1210,7 +1210,9 @@ $(document).ready(function(){ $index = 0; } - $content = $($active[0].hash); + if ($active[0] !== undefined) { + $content = $($active[0].hash); + } // append indicator then set indicator width to tab width $this.append('
'); @@ -1249,7 +1251,10 @@ $(document).ready(function(){ // Make the old tab inactive. $active.removeClass('active'); - $content.hide(); + + if ($content !== undefined) { + $content.hide(); + } // Update the variables with the new link and content $active = $(this); diff --git a/lib/js/tabs.js b/lib/js/tabs.js index 538de5a..fabf0ed 100644 --- a/lib/js/tabs.js +++ b/lib/js/tabs.js @@ -32,7 +32,9 @@ $index = 0; } - $content = $($active[0].hash); + if ($active[0] !== undefined) { + $content = $($active[0].hash); + } // append indicator then set indicator width to tab width $this.append(''); @@ -71,7 +73,9 @@ // Make the old tab inactive. $active.removeClass('active'); - $content.hide(); + if ($content !== undefined) { + $content.hide(); + } // Update the variables with the new link and content $active = $(this); diff --git a/package.js b/package.js index 71c90a7..747fc47 100644 --- a/package.js +++ b/package.js @@ -3,14 +3,14 @@ Package.describe({ name: 'gantrim:materialize-stylus', // http://atmospherejs.com/materialize/materialize summary: 'Materialize (official): A modern responsive front-end framework based on Material Design', - version: '1.1.3', + version: '1.1.8', git: 'https://github.com/gantrim/meteor-materialize-stylus' }); Package.onUse(function (api) { - api.versionsFrom('METEOR@1.2.1'); + api.versionsFrom('METEOR@1.6.0.1'); - api.use('stylus@2.513.14'); + api.use('stylus@2.513.13'); api.use('jquery', 'client'); api.imply('jquery', 'client');