mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
docs(demos): make each section a module
This commit is contained in:
@ -27,6 +27,10 @@ body.has-scrollbar ion-menu scroll-content {
|
|||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ion-page {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
section.hidden {
|
section.hidden {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
36
demos/component-docs/cards/cards-background/main.html
Normal file
36
demos/component-docs/cards/cards-background/main.html
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
|
||||||
|
<ion-navbar *navbar hide-back-button class="show-navbar android-attr">
|
||||||
|
<ion-title>Background Images</ion-title>
|
||||||
|
</ion-navbar>
|
||||||
|
|
||||||
|
<ion-content class="has-header components-demo cards-bg">
|
||||||
|
|
||||||
|
<ion-card class="advanced-background">
|
||||||
|
<img src="img/card-saopaolo.png"/>
|
||||||
|
<p class="advanced-background-title">São Paulo</p>
|
||||||
|
<p class="advanced-background-subtitle">41 Listings</p>
|
||||||
|
</ion-card>
|
||||||
|
|
||||||
|
<ion-card class="advanced-background">
|
||||||
|
<img src="img/card-amsterdam.png"/>
|
||||||
|
<p class="advanced-background-title">Amsterdam</p>
|
||||||
|
<p class="advanced-background-subtitle">64 Listings</p>
|
||||||
|
</ion-card>
|
||||||
|
|
||||||
|
<ion-card class="advanced-background">
|
||||||
|
<img src="img/card-sf.png"/>
|
||||||
|
<p class="advanced-background-title">San Francisco</p>
|
||||||
|
<p class="advanced-background-subtitle">72 Listings</p>
|
||||||
|
</ion-card>
|
||||||
|
|
||||||
|
<ion-card class="advanced-background">
|
||||||
|
<img src="img/card-madison.png"/>
|
||||||
|
<p class="advanced-background-title">Madison</p>
|
||||||
|
<p class="advanced-background-subtitle">28 Listings</p>
|
||||||
|
</ion-card>
|
||||||
|
|
||||||
|
</ion-content>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
13
demos/component-docs/cards/cards-background/pages.ts
Normal file
13
demos/component-docs/cards/cards-background/pages.ts
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import {Page} from 'ionic/ionic';
|
||||||
|
import {forwardRef} from 'angular2/angular2';
|
||||||
|
import {AndroidAttribute} from '../../helpers';
|
||||||
|
|
||||||
|
@Page({
|
||||||
|
templateUrl: 'cards/cards-background/main.html',
|
||||||
|
directives: [forwardRef(() => AndroidAttribute)]
|
||||||
|
})
|
||||||
|
export class BackgroundPage {
|
||||||
|
constructor() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -2,11 +2,13 @@ import {Page} from 'ionic/ionic';
|
|||||||
import {forwardRef} from 'angular2/angular2';
|
import {forwardRef} from 'angular2/angular2';
|
||||||
import {AndroidAttribute} from '../helpers';
|
import {AndroidAttribute} from '../helpers';
|
||||||
|
|
||||||
|
export * from './cards-background/pages';
|
||||||
|
|
||||||
@Page({
|
@Page({
|
||||||
templateUrl: 'cards/cards-basic.html',
|
templateUrl: 'cards/cards-basic.html',
|
||||||
directives: [forwardRef(() => AndroidAttribute)]
|
directives: [forwardRef(() => AndroidAttribute)]
|
||||||
})
|
})
|
||||||
export class CardsBasicPage {
|
export class BasicPage {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -16,7 +18,7 @@ export class CardsBasicPage {
|
|||||||
templateUrl: 'cards/cards-header.html',
|
templateUrl: 'cards/cards-header.html',
|
||||||
directives: [forwardRef(() => AndroidAttribute)]
|
directives: [forwardRef(() => AndroidAttribute)]
|
||||||
})
|
})
|
||||||
export class CardsHeaderPage {
|
export class HeaderPage {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -27,7 +29,7 @@ export class CardsHeaderPage {
|
|||||||
templateUrl: 'cards/cards-list.html',
|
templateUrl: 'cards/cards-list.html',
|
||||||
directives: [forwardRef(() => AndroidAttribute)]
|
directives: [forwardRef(() => AndroidAttribute)]
|
||||||
})
|
})
|
||||||
export class CardsListPage {
|
export class ListPage {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -37,17 +39,7 @@ export class CardsListPage {
|
|||||||
templateUrl: 'cards/cards-image.html',
|
templateUrl: 'cards/cards-image.html',
|
||||||
directives: [forwardRef(() => AndroidAttribute)]
|
directives: [forwardRef(() => AndroidAttribute)]
|
||||||
})
|
})
|
||||||
export class CardsImagePage {
|
export class ImagePage {
|
||||||
constructor() {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Page({
|
|
||||||
templateUrl: 'cards/cards-background.html',
|
|
||||||
directives: [forwardRef(() => AndroidAttribute)]
|
|
||||||
})
|
|
||||||
export class CardsBackgroundPage {
|
|
||||||
constructor() {
|
constructor() {
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -57,7 +49,7 @@ export class CardsBackgroundPage {
|
|||||||
templateUrl: 'cards/cards-advanced-social.html',
|
templateUrl: 'cards/cards-advanced-social.html',
|
||||||
directives: [forwardRef(() => AndroidAttribute)]
|
directives: [forwardRef(() => AndroidAttribute)]
|
||||||
})
|
})
|
||||||
export class CardsAdvancedSocialPage {
|
export class AdvancedSocialPage {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -67,7 +59,7 @@ export class CardsAdvancedSocialPage {
|
|||||||
templateUrl: 'cards/cards-advanced-map.html',
|
templateUrl: 'cards/cards-advanced-map.html',
|
||||||
directives: [forwardRef(() => AndroidAttribute)]
|
directives: [forwardRef(() => AndroidAttribute)]
|
||||||
})
|
})
|
||||||
export class CardsAdvancedMapPage {
|
export class AdvancedMapPage {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -77,7 +69,7 @@ export class CardsAdvancedMapPage {
|
|||||||
templateUrl: 'cards/cards-advanced-weather.html',
|
templateUrl: 'cards/cards-advanced-weather.html',
|
||||||
directives: [forwardRef(() => AndroidAttribute)]
|
directives: [forwardRef(() => AndroidAttribute)]
|
||||||
})
|
})
|
||||||
export class CardsAdvancedWeatherPage {
|
export class AdvancedWeatherPage {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -15,14 +15,7 @@ import {ButtonsPage,
|
|||||||
IconButtonsPage,
|
IconButtonsPage,
|
||||||
ButtonsInComponentsPage} from './buttons/buttons';
|
ButtonsInComponentsPage} from './buttons/buttons';
|
||||||
|
|
||||||
import {CardsBasicPage,
|
import * as cards from './cards/cards';
|
||||||
CardsImagePage,
|
|
||||||
CardsHeaderPage,
|
|
||||||
CardsListPage,
|
|
||||||
CardsBackgroundPage,
|
|
||||||
CardsAdvancedMapPage,
|
|
||||||
CardsAdvancedSocialPage,
|
|
||||||
CardsAdvancedWeatherPage} from './cards/cards';
|
|
||||||
|
|
||||||
import {FormsPage,
|
import {FormsPage,
|
||||||
FixedInlinePage,
|
FixedInlinePage,
|
||||||
@ -124,15 +117,15 @@ export function getPageFor(hash) {
|
|||||||
'button-sizes': ButtonSizesPage,
|
'button-sizes': ButtonSizesPage,
|
||||||
'icon-buttons': IconButtonsPage,
|
'icon-buttons': IconButtonsPage,
|
||||||
|
|
||||||
'cards': CardsBasicPage,
|
'cards': cards.BasicPage,
|
||||||
'card-header': CardsHeaderPage,
|
'card-header': cards.HeaderPage,
|
||||||
'card-list': CardsListPage,
|
'card-list': cards.ListPage,
|
||||||
'card-image': CardsImagePage,
|
'card-image': cards.ImagePage,
|
||||||
'card-background': CardsBackgroundPage,
|
'card-background': cards.BackgroundPage,
|
||||||
'advanced-cards': CardsAdvancedSocialPage,
|
'advanced-cards': cards.AdvancedSocialPage,
|
||||||
'card-advanced-map': CardsAdvancedMapPage,
|
'card-advanced-map': cards.AdvancedMapPage,
|
||||||
'card-advanced-social': CardsAdvancedSocialPage,
|
'card-advanced-social': cards.AdvancedSocialPage,
|
||||||
'card-advanced-weather': CardsAdvancedWeatherPage,
|
'card-advanced-weather': cards.AdvancedWeatherPage,
|
||||||
|
|
||||||
'checkbox': CheckboxPage,
|
'checkbox': CheckboxPage,
|
||||||
'radio': RadioPage,
|
'radio': RadioPage,
|
||||||
|
@ -14,6 +14,7 @@ class DemoApp {
|
|||||||
androidAttribute: any;
|
androidAttribute: any;
|
||||||
|
|
||||||
constructor(app: IonicApp, platform: Platform) {
|
constructor(app: IonicApp, platform: Platform) {
|
||||||
|
debugger;
|
||||||
this.app = app;
|
this.app = app;
|
||||||
this.platform = platform;
|
this.platform = platform;
|
||||||
this.androidAttribute = helpers.AndroidAttribute;
|
this.androidAttribute = helpers.AndroidAttribute;
|
||||||
@ -35,7 +36,7 @@ class DemoApp {
|
|||||||
this.nextPage = ActionSheetPage;
|
this.nextPage = ActionSheetPage;
|
||||||
}
|
}
|
||||||
let nav = this.app.getComponent('nav');
|
let nav = this.app.getComponent('nav');
|
||||||
helpers.debounce(nav.setRoot(this.nextPage), 500, true);
|
nav.setRoot(this.nextPage);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
16
gulpfile.js
16
gulpfile.js
@ -59,14 +59,14 @@ function buildDemoBundle(opts, done) {
|
|||||||
// pretty sure this is a race, but it works
|
// pretty sure this is a race, but it works
|
||||||
numWebpacks++;
|
numWebpacks++;
|
||||||
webpack(config, function(err, stats){
|
webpack(config, function(err, stats){
|
||||||
// var statsOptions = {
|
// var statsOptions = {
|
||||||
// 'colors': true,
|
// 'colors': true,
|
||||||
// 'modules': true,
|
// 'modules': true,
|
||||||
// 'chunks': false,
|
// 'chunks': false,
|
||||||
// 'exclude': ['node_modules'],
|
// 'exclude': ['node_modules'],
|
||||||
// 'errorDetails': true
|
// 'errorDetails': true
|
||||||
// }
|
// }
|
||||||
// console.log(stats.toString(statsOptions));
|
// console.log(stats.toString(statsOptions));
|
||||||
if (--numWebpacks === 0) done();
|
if (--numWebpacks === 0) done();
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user