diff --git a/.travis.yml b/.travis.yml
index f5e0d07..15951aa 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,17 +1,20 @@
language: node_js
node_js:
- "0.12"
+env:
+ global:
+ - secure: h8dx7ZK94tKsp965RwL+PjUfoOcgiGYSKnwyRGPnK4Acjgl+UhhdtOW0SkgjRW2PLr2Umpfi8jKGoS3cJCiLL4vQvDmPJ6xS3BmVYWImVJwt2vCShDc6O1z82ebUE5F9QagBapYFOG3r8dOUqEYKsL+9WLsGRckLQpvQCo0EIt948UoqoVosKKD7ALaPHKeYCeAiRthCiWrN7jTnTm5U92bLtiMIZEBZrVzHpFxnUA33TIFgnkeSCyf5sO/iwjRrGO3IEXyVOKisjzXkug/ODjVXH33M5IJl7sZ+R2ZGtCQHh0CZNDI6oyAhzz9QaItA0V1YtzvbcdyAzPsP2a2izM6EgQGsnVEm2A5BzIdo4AtUalHxssf4e9kerE8cDDKruEZhNVP5lZ8wxP5Dw9Tl704AUCDDzqJZFnf8/wwg+Vyc6+hHj5TBw5vPmoNy/yBQ9GnAYvrBUba5NJ+4aDYtxzn9Qq5JuckUiQsfKUGdYNKC/wFg0U1NR+7RA0WBnp0NyTyaGtKe6oRydIaXGX1km5aqNDIgsEqMzpZULRIHfJiOF3MIVOoZesvx/14amHpuB60XxUwVUhqjRMRQ6Fmy0gjQheTVK5LTPDJxl6vMB6wXe7F6sjeO21XlZkv5oVwgzg1p+TIgrQ7dVS+fFcCnBy8ncwF6RXVr2opZtU3i76A=
+ - secure: n840XxnmSzNNPVkM89uF+aa2+DWnqW1n5wWhWBUhJENu2ZlFU2y0ij9MrbwMsg+wxhGyFLCcGGKbHai5AbZb++PJxsPVNVM4ZsnIw2Dbhsqu8ksVORPgOT7l15mpD+gqmpHiVND4BQ5LSGnrwdg2U3geGJ4cUgpPIpIiHwDrkB5u5jKq4VIWggQ2Y8xKT41JleDAWT1nJfa65Rk9f6vck7YbLLEcKoy/2brTdEHKjhHWq9mDDa0fwQijmRhgfe8vEf2Kzujg4th3mnrztwVXUsKOBB3mA3XEsFFUmxvhn7bLOHWn3GMk7WFcctw7QZ66Lh6maqMujne67slyxj5KypiecqzLwiOSbq5AXQCGHvAFAhq5973Elgfwm6NOH8l+EUR/Lg4CbBjCt2JVrVdhGuVngijNaTq4Yiji4gpwf0ghoOwbG4CFTCDMKHEbliExR9VaVFcRhQM+0Dv7Hl7uJs4ofaLb25vuNNKRLtm65Vv/Ndvfe1OYnfyn3H2wdS+Pn4WrCsAzRNfzmlfwZU65am1pLmYpJ7ZDU2nDuT8GCUl+wu50Cj6U0RcNlcSJmSAcsmHJJfaNaCpqzvSvNBjQSpTMh32RWlj6BIrqCzAXEHW3xQEMfbD+VA/vZoWE4DM8ED7Ndkhu+DrHrGs23Z3n87lqOlh3FpnnKvXLlTi95sQ=
before_install:
- npm install -g bower grunt-cli protractor
- # - webdriver-manager update
+ - webdriver-manager update
install:
- npm install
script:
- grunt test:development
- grunt test
- # - nohup webdriver-manager start &
- # - grunt e2e --ci
+ - grunt e2e --ci
after_success:
- ./node_modules/coveralls/bin/coveralls.js < coverage/lcov.info
-# addons:
-# sauce_connect: true
+addons:
+ sauce_connect: true
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e69de29..227c1b2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -0,0 +1,3 @@
+## Changes in 0.0.1
+
+ * @edwardoparearyee: First release
diff --git a/Gruntfile.js b/Gruntfile.js
index d7e1bf5..9986a73 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -77,7 +77,7 @@ module.exports = function (grunt) {
'./modules/**/*.html',
'./modules/**/**/*.html'
],
- tasks: ['lint','less:development']
+ tasks: ['less:development']
},
javascript: {
files: [
@@ -160,6 +160,14 @@ module.exports = function (grunt) {
}
},
+ protractor_webdriver: {
+ dist: {
+ options: {
+ command: 'webdriver-manager update && webdriver-manager start',
+ }
+ }
+ },
+
protractor: {
options: {
keepAlive: false,
@@ -370,6 +378,7 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-yuidoc');
grunt.loadNpmTasks('grunt-contrib-jasmine');
grunt.loadNpmTasks('grunt-protractor-runner');
+ grunt.loadNpmTasks('grunt-protractor-webdriver');
grunt.loadNpmTasks('grunt-processhtml');
grunt.loadNpmTasks('grunt-ng-constant');
grunt.loadNpmTasks('grunt-bump');
@@ -445,6 +454,7 @@ module.exports = function (grunt) {
'copy',
'processhtml:e2e',
'connect:servertest',
+ 'protractor_webdriver',
'protractor:dist',
'clean:afterTest'
]);
diff --git a/README.md b/README.md
index 37e95b5..e5c3dda 100644
--- a/README.md
+++ b/README.md
@@ -1,12 +1,66 @@
# Angular Smart Nav
-
+[](https://saucelabs.com/u/angular-smart-nav)
Show or hide a navbar when scrolling in any particular direction and or minimise nav when scrolling pass the navbar
+## Install
+
+You can install this module using [bower][bower] like so:
+
+```
+bower install angular-smart-nav --save
+```
+
+Add the angular-smart-nav library file to your `index.html` file like so:
+
+```html
+
+```
+
+Then add the module to your angular app:
+
+```javascript
+angular.module('myApp', ['sn.smartNav']);
+```
+
+## Example Usage
+
+In your html simply add the directive to your nav:
+
+```html
+
+```
+
+The directive will add the following classes to your nav:
+- `scrolling-down`: when the user is scrolling down the page
+- `scrolling-up`: when the user is scrolling up the page
+- `minimised-mode`: when the user has scrolled beyond the height of the nav
+
+You still have to add your own custom styling to the nav to hide, show or minimise the navbar. The following will hide the nav when scrolling down and display it again when scrolling up:
+
+```css
+nav {
+ opacity: 1;
+ transition: opacity .4s ease-in-out .4s;
+}
+nav.scrolling-down {
+ opacity: 0;
+}
+nav.scrolling-up {
+ opacity: 0;
+}
+```
+
+
This project structure is based on the [angular-start](https://github.com/thisissoon/angular-start
) application skeleton for a typical [AngularJS](http://angularjs.org/) web app.
@@ -231,7 +285,6 @@ Once you have ensured that the development web server hosting our application is
and WebDriver is updated, you can run the end-to-end tests using the supplied grunt task:
```
-nohup webdriver-manager start &
grunt e2e
```
diff --git a/app/index.html b/app/index.html
index e2ec950..678cf87 100644
--- a/app/index.html
+++ b/app/index.html
@@ -21,10 +21,6 @@
-
-
-
-
@@ -43,10 +39,33 @@
+
+