Skip to content

Commit 2d99402

Browse files
resolved
1 parent d68ec31 commit 2d99402

File tree

4 files changed

+37
-37
lines changed

4 files changed

+37
-37
lines changed

README.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,48 @@
1-
# NativeScript Slides for iOS and Android
2-
###_The plugin formally known as nativescript-intro-slides_
3-
[![Nativescript Slides. Click to Play](https://img.youtube.com/vi/1AatGtPA6J8/0.jpg)](https://www.youtube.com/embed/1AatGtPA6J8)
1+
# Nativescript Intro Slides for iOS and Android
2+
###_Not just for intro slides any more! Great for **Image Carousels** too!_ ###
3+
4+
[![Nativescript Intro Slides. Click to Play](https://img.youtube.com/vi/1AatGtPA6J8/0.jpg)](https://www.youtube.com/embed/1AatGtPA6J8)
45

56
##Example Usage:
67
###XML
78
```xml
89

9-
<Slides:SlideContainer>
10-
<Slides:Slide class="slide-1">
10+
<IntroSlides:IntroSlides>
11+
<IntroSlides:Slide class="intro-slide-1">
1112
<Label text="This is Panel 1" />
12-
</Slides:Slide>
13-
<Slides:Slide class="slide-2">
13+
</IntroSlides:Slide>
14+
<IntroSlides:Slide class="intro-slide-2">
1415
<Label text="This is Panel 2" />
15-
</Slides:Slide>
16-
<Slides:Slide class="slide-3">
16+
</IntroSlides:Slide>
17+
<IntroSlides:Slide class="intro-slide-3">
1718
<Label text="This is Panel 3" />
18-
</Slides:Slide>
19-
<Slides:Slide class="slide-4">
19+
</IntroSlides:Slide>
20+
<IntroSlides:Slide class="intro-slide-4">
2021
<Label text="This is Panel 4" />
21-
</Slides:Slide>
22-
<Slides:Slide class="slide-5">
22+
</IntroSlides:Slide>
23+
<IntroSlides:Slide class="intro-slide-5">
2324
<Label text="This is Panel 5" />
24-
</Slides:Slide>
25-
</Slides:SlideContainer>
25+
</IntroSlides:Slide>
26+
</IntroSlides:IntroSlides>
2627

2728
```
2829
###CSS
2930
```css
30-
.slide-1{
31+
.intro-slide-1{
3132
background-color: darkslateblue;
3233
}
3334

34-
.slide-2{
35+
.intro-slide-2{
3536
background-color: darkcyan;
3637
}
37-
.slide-3{
38+
.intro-slide-3{
3839
background-color: darkgreen;
3940
}
4041

41-
.slide-4{
42+
.intro-slide-4{
4243
background-color: darkgoldenrod;
4344
}
44-
.slide-5{
45+
.intro-slide-5{
4546
background-color: darkslategray;
4647
}
4748
Label{
@@ -52,17 +53,16 @@ Label{
5253
}
5354

5455
```
55-
Great for Intros/Tutorials to Image Carousels.
5656

57-
To use the intro slide plugin you need to first import it into your xml layout with `xmlns:Slides="nativescript-slides"`
57+
To use the intro slide plugin you need to first import it into your xml layout with `xmlns:IntroSlides="nativescript-intro-slides"`
5858

59-
when using the intro slide plugin you need at least two ``<Slides:Slide>`` views inside of the ``<Slides:SlideContainer>``.
59+
when using the intro slide plugin you need at least two ``<IntroSlides:Slide>`` views inside of the ``<IntroSlides:IntroSlides>``.
6060

61-
add as many ``<Slides:Slide>`` as you want.
61+
add as many ``<IntroSlides:Slide>`` as you want.
6262

63-
the `SlideContainer` class also has public `nextSlide` and `previousSlide` functions so you can add your own previous and next buttons as needed.
63+
the `IntroSlides` class also has public `nextSlide` and `previousSlide` functions so you can add your own previous and next buttons as needed.
6464

65-
the `<Slides:SlideContainer>` element also has a property called `loop` which is a boolean value and if set to true will cause the slide to be an endless loop. The suggested use case would be for a Image Carousel or something of that nature.
65+
the `<IntroSlides:IntroSlides>` element also has a property called `loop` which is a boolean value and if set to true will cause the slide to be an endless loop. The suggested use case would be for a Image Carousel or something of that nature.
6666

6767
the `<IntroSlides:IntroSlides>` element also has a property called `interval` which is a integer value and the value is in milliseconds. The suggested use case would be for a Image Carousel or something of that nature which can change the image for every fixed intervals. In unloaded function call page.getViewById("your_id").carousel(false,0) to unregister it (your_id is the id given to `<IntroSlides:IntroSlides>`).
6868

nativescript-slides.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export interface ISlideMap {
77
left?: ISlideMap;
88
right?: ISlideMap;
99
}
10-
export declare class SlideContainer extends AbsoluteLayout {
10+
export declare class IntroSlides extends AbsoluteLayout {
1111
private _loaded;
1212
private currentPanel;
1313
private _pageWidth;

nativescript-slides.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export interface ISlideMap {
2222
right?: ISlideMap;
2323
}
2424

25-
export class SlideContainer extends AbsoluteLayout {
25+
export class IntroSlides extends AbsoluteLayout {
2626
private _loaded: boolean;
2727
private currentPanel: ISlideMap;
2828
private _pageWidth: number;

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"name": "nativescript-slides",
3-
"version": "1.0.2",
4-
"description": "NativeScript Slides plugin.",
5-
"main": "nativescript-slides.js",
2+
"name": "nativescript-intro-slides",
3+
"version": "1.0.3",
4+
"description": "NativeScript intro slides plugin.",
5+
"main": "nativescript-intro-slides.js",
66
"nativescript": {
77
"platforms": {
88
"android": "2.0.0",
@@ -13,15 +13,15 @@
1313
"build": "tsc",
1414
"demo.ios": "npm run preparedemo && cd demo && tns emulate ios",
1515
"demo.android": "npm run preparedemo && cd demo && tns run android",
16-
"preparedemo": "npm run build && cd demo && tns plugin remove nativescript-slides && tns plugin add .. && tns install",
16+
"preparedemo": "npm run build && cd demo && tns plugin remove nativescript-intro-slides && tns plugin add .. && tns install",
1717
"setup": "npm install && cd demo && npm install && cd .. && npm run build && cd demo && tns plugin add .. && cd ..",
1818
"livesync.ios":"cd demo && tns livesync ios --watch",
1919
"livesync.android":"cd demo && tns livesync android --watch",
2020
"ios": "xcproj --project platforms/ios/YourApp.xcodeproj touch; xcproj --project platforms/ios/Pods/Pods.xcodeproj touch; tns livesync ios --emulator --watch"
2121
},
2222
"repository": {
2323
"type": "git",
24-
"url": "https://github.com/TheOriginalJosh/nativescript-slides.git"
24+
"url": "https://github.com/TheOriginalJosh/nativescript-intro-slides.git"
2525
},
2626
"keywords": [
2727
"NativeScript",
@@ -41,13 +41,13 @@
4141
}
4242
],
4343
"bugs": {
44-
"url": "https://github.com/TheOriginalJosh/nativescript-slides/issues"
44+
"url": "https://github.com/TheOriginalJosh/nativescript-intro-slides/issues"
4545
},
4646
"license": {
4747
"type": "MIT",
48-
"url": "https://github.com/TheOriginalJosh/nativescript-slides/blob/master/LICENSE"
48+
"url": "https://github.com/TheOriginalJosh/nativescript-intro-slides/blob/master/LICENSE"
4949
},
50-
"homepage": "https://github.com/TheOriginalJosh/nativescript-slides",
50+
"homepage": "https://github.com/TheOriginalJosh/nativescript-intro-slides",
5151
"readmeFilename": "README.md",
5252
"devDependencies": {
5353
"typescript": "^1.8.7"

0 commit comments

Comments
 (0)