|
2 | 2 |
|
3 | 3 |
|
4 | 4 | Beta |
5 | | - |
6 | | -Include `xmlns:IntroSlides="nativescript-intro-slides"` in your Page |
7 | | - |
| 5 | +###XML |
8 | 6 | ```xml |
9 | 7 |
|
10 | 8 | <IntroSlides:IntroSlides> |
11 | | - <IntroSlides:Slide id="Page1" top="0" left="0"> |
| 9 | + <IntroSlides:Slide class="intro-slide-1"> |
12 | 10 | <Label text="This is Panel 1" /> |
13 | 11 | </IntroSlides:Slide> |
14 | | - <IntroSlides:Slide id="Page2" top="0" left="0"> |
| 12 | + <IntroSlides:Slide class="intro-slide-2"> |
15 | 13 | <Label text="This is Panel 2" /> |
16 | 14 | </IntroSlides:Slide> |
17 | | - <IntroSlides:Slide id="Page3" top="0" left="0"> |
| 15 | + <IntroSlides:Slide class="intro-slide-3"> |
18 | 16 | <Label text="This is Panel 3" /> |
19 | 17 | </IntroSlides:Slide> |
20 | | - <IntroSlides:Slide id="Page4" top="0" left="0"> |
| 18 | + <IntroSlides:Slide class="intro-slide-4"> |
21 | 19 | <Label text="This is Panel 4" /> |
22 | 20 | </IntroSlides:Slide> |
23 | | - <IntroSlides:Slide id="Page5" top="0" left="0"> |
| 21 | + <IntroSlides:Slide class="intro-slide-5"> |
24 | 22 | <Label text="This is Panel 5" /> |
25 | 23 | </IntroSlides:Slide> |
26 | 24 | </IntroSlides:IntroSlides> |
27 | 25 |
|
28 | 26 | ``` |
| 27 | +###CSS |
| 28 | +```css |
| 29 | +.intro-slide-1{ |
| 30 | + background-color: darkslateblue; |
| 31 | +} |
| 32 | + |
| 33 | +.intro-slide-2{ |
| 34 | + background-color: darkcyan; |
| 35 | +} |
| 36 | +.intro-slide-3{ |
| 37 | + background-color: darkgreen; |
| 38 | +} |
| 39 | + |
| 40 | +.intro-slide-4{ |
| 41 | + background-color: darkgoldenrod; |
| 42 | +} |
| 43 | +.intro-slide-5{ |
| 44 | + background-color: darkslategray; |
| 45 | +} |
| 46 | +``` |
| 47 | +#Usage |
| 48 | +To use the intro slide plugin you need to first import it into your xml layout with `xmlns:parallax="nativescript-intro-slides"` |
29 | 49 |
|
| 50 | +when using the intro slide plugin you need at least two ``<IntroSlides:Slide>`` views inside of the ``<IntroSlides:IntroSlides>``. |
30 | 51 |
|
31 | | -### Planned additions |
| 52 | +add as many ``<IntroSlides:Slide>`` as you want. |
| 53 | + |
| 54 | +### Planned additions: |
32 | 55 |
|
33 | 56 | * disable/enable previous and next buttons |
34 | 57 | * Add function and property for button text, for next button on the last slide. |
35 | 58 | * add properties to override previous and next buttons text. |
36 | 59 |
|
37 | | -add as many slides as you want, top down order, minimum of two. |
| 60 | +### Known Issues: |
| 61 | +* Breaks on screen rotation. will be fixed. |
| 62 | + |
| 63 | +###Plugin Development Work Flow: |
| 64 | + |
| 65 | +* Clone repository to your machine. |
| 66 | +* First run `npm install` |
| 67 | +* Then run `npm run setup` to prepare the demo project |
| 68 | +* Build with `npm run build` |
| 69 | +* Run and deploy to your device or emulator with `npm run demo.android` or `npm run demo.ios` |
| 70 | + |
| 71 | + |
| 72 | +###Special thanks to: |
| 73 | +Thanks to [Nathan Walker](https://github.com/NathanWalker) for setting up the {N} plugin seed that I used to help get this plugin up and running. More info can be found about it here: |
| 74 | +https://github.com/NathanWalker/nativescript-plugin-seed |
38 | 75 |
|
39 | 76 | for {N} version 1.7.0+ |
0 commit comments