ionic-header-parallax
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "ionic-header-parallax", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "This directive enables parallax effect on `ion-header` elements to display a cover photo while on top of the page and transition it to the normal navbar when content is scrolled down.", | ||
@@ -19,3 +19,3 @@ "main": "index.js", | ||
], | ||
"author": "Raschid J.F. Rafaelly <lachachi@ratioinnovacion.com> (http://ratioinnovacion.com)", | ||
"author": "Raschid J.F. Rafaelly <lachachi@gmail.com>", | ||
"license": "ISC", | ||
@@ -22,0 +22,0 @@ "bugs": { |
# Parallax Header Directive for Ionic v3 # | ||
>**Note**: Currently tested on v3. V4 is on its way. | ||
This directive enables parallax effect on `ion-header` elements to display a cover photo while on top of the page and transition it to the normal navbar when content is scrolled down. | ||
@@ -12,3 +14,3 @@ | ||
``` | ||
$ npm ion-header-parallax | ||
$ npm ionic-header-parallax | ||
``` | ||
@@ -20,6 +22,6 @@ | ||
``` | ||
@import "../node_modules/ionic-header-parallax/dist/parallax.scss"; //<- Add this line | ||
@import "../node_modules/ionic-header-parallax/dist/sass/ionic-header-parallax.scss"; //<- Add this line | ||
``` | ||
3 Import the directive into `app.module.ts`: | ||
3 Import the directive into your module (usually `app.module.ts`): | ||
@@ -41,3 +43,3 @@ ``` | ||
``` | ||
<ion-header parallax></parallax> | ||
<ion-header parallax></ion-header> | ||
``` | ||
@@ -48,3 +50,3 @@ | ||
* `imageUrl`: The background image to show while expanded. | ||
* `fadeTitle`: It will make transparent the text in `<ion-title>` or any `.title` element in the header and show it when scrolled. Default is `false`. | ||
* `fadeTitle`: It will make transparent the text from `<ion-title>` or any `.title` element in the header, and show it when scrolled. Default is `false`. | ||
* `maximumHeight`: The height for the header when expanded. Default is `200`. | ||
@@ -71,2 +73,10 @@ * `parallaxColor`: The color (web hex formatted) to show while the header is expanded if no `imageUrl` is set. When scrolled it will fade to the navbar/toolbar's color or the one configured in `<navbar color="">` attribute. | ||
</ion-content> | ||
``` | ||
``` | ||
## Credits ## | ||
This is an implementation of the really great tutorial by [Josh Morony](https://www.joshmorony.com/how-to-create-a-directive-in-ionic-2-parallax-header/). Thanks. | ||
## Contributing ## | ||
I don't plan to be full-time mantaining this package, but as I'm usually developing in Ionic I'll be glad to update it any time I make some upgrades for myself. | ||
Contributions are very welcome. The source files (actually just one only .ts file) can are found in the [repo](https://github.com/RaschidGithub/ionic-header-parallax). |
3644761
8
77