Skip to content

Commit

Permalink
Merge pull request #56 from indyplanets/v1
Browse files Browse the repository at this point in the history
V1 Release
  • Loading branch information
mrjasonweaver committed Aug 4, 2013
2 parents 88147e4 + 1e09911 commit f133161
Show file tree
Hide file tree
Showing 13 changed files with 406 additions and 350 deletions.
100 changes: 55 additions & 45 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,53 +2,63 @@
module.exports = function(grunt) {
'use strict';

grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
dist: {
files: {
'css/flexnav.css': 'sass/flexnav.scss',
'css/page.css': 'sass/page.scss'
}
},
options: {
'compass': true
}
},
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= pkg.repository %> <%= pkg.license %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
},
build: {
src: 'js/jquery.flexnav.js',
dest: 'js/jquery.flexnav.min.js'
}
},
coffee: {
compile: {
files: {
'js/jquery.flexnav.js': 'coffeescripts/jquery.flexnav.coffee'
}
}
},
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
dist: {
files: {
'css/flexnav.css': 'sass/flexnav.scss',
'css/page.css': 'sass/page.scss'
}
}
},
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= pkg.repository %> <%= pkg.license %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
},
build: {
src: 'js/jquery.flexnav.js',
dest: 'js/jquery.flexnav.min.js'
}
},
coffee: {
compile: {
files: {
'js/jquery.flexnav.js': 'coffeescripts/jquery.flexnav.coffee'
}
}
},
coffeelint: {
files: ['coffeescripts/*.coffee'],
options: {
'no_trailing_whitespace': {
'level': 'error'
},
'max_line_length': {
'level': 'ignore'
}
}
},
watch: {
coffee: {
files: ['<%= coffeelint.files %>'],
tasks: ['coffeelint', 'coffee']
},
sass: {
files: ['sass/*.scss'],
tasks: 'sass'
}
}
});

watch: {
coffee: {
files: ['coffeescripts/*'],
tasks: 'coffee'
},
sass: {
files: ['sass/*'],
tasks: 'sass'
}
}
});

// Load necessary plugins
// Load necessary plugins
grunt.loadNpmTasks('grunt-coffeelint');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-coffee');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-uglify');

grunt.registerTask('default', ['sass', 'uglify', 'coffee', 'watch']);
};

grunt.registerTask('build', ['uglify']);
grunt.registerTask('test', ['coffeelint']);
grunt.registerTask('default', ['sass', 'coffee', 'uglify', 'watch']);
};
32 changes: 23 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

A mobile-first example of using media queries and jQuery to make a decent site menu with drop downs. Special attention is paid to touch screens using touch events and tap targets. This is something I use to test different navigation techniques and may change as I iterate over different solutions to the problem. Basically I want a simple model to build upon when working on sites from scratch.

**Note:** FlexNav is still in beta. If you find a bug, please [file an issue](https://github.com/indyplanets/flexnav/issues) and note device and browser versions
**Note:** If you find a bug, please [file an issue](https://github.com/indyplanets/flexnav/issues) and note device and browser versions

### Features
* Multiple nested sub menus
Expand All @@ -20,6 +20,7 @@ A mobile-first example of using media queries and jQuery to make a decent site m
* Fallback for no JavaScript
* Fast clicks for touch screens (no 300ms delay)
* Use class `.one-page` on the `body`, `.menu-button`, and `ul.flexnav` for single page fixed menu
* Use with hoverIntent jQuery plugin

### Browser Support
* IE7-10
Expand Down Expand Up @@ -58,14 +59,22 @@ Initialize
$(".flexnav").flexNav();
</script>

you can change the default speed too

<script>
$(".flexnav").flexNav({
'animationSpeed' : 'fast'
});
</script>

### Options
'animationSpeed' : '250', // default for drop down animation speed
'transitionOpacity': true, // default for opacity animation
'buttonSelector': '.menu-button', // default menu button class name
'hoverIntent': false, // Change to true for use with hoverIntent plugin
'hoverIntentTimeout': 150 // hoverIntent default timeout

* * *
### Contributors
* [Jason Weaver](http://jasonweaver.name) - (Primary)
* [James Sinclair](https://github.com/jrsinclair)
* [Allison Wagner](https://github.com/alliwagner)
* [Sean Breakerfall](https://github.com/breakerfall)
* [Robin Cawser](https://github.com/robcaw)
* [pallandt](https://github.com/pallandt)

* * *
### Todo

Expand All @@ -74,6 +83,11 @@ you can change the default speed too
* * *
### Changelog

#### v.1.0 : August 5th, 2013
* Added support for hoverIntent jQuery Plugin
* Fixed several touch/tap reveal bugs for touch screens
* Support jQuery noConflict mode

#### v.0.9 : July 4th, 2013
* Added support for multiple flexnavs on one page
* Fixed IE8 hover reveal bug
Expand Down
Loading

0 comments on commit f133161

Please sign in to comment.