docs: add demo template block to api

This commit is contained in:
Drew Rygh
2015-12-03 11:32:33 -06:00
parent 0d5efe6658
commit b6c5ef8ca8
3 changed files with 22 additions and 1 deletions

View File

@ -82,6 +82,25 @@ docType: "<$ doc.docType $>"
<a href='http://github.com/driftyco/ionic2/edit/master/<$ doc.fileInfo.relativePath $>#L<$ doc.location.start.line $>'>
Improve this doc
</a>
<!-- TODO(drewrygh, perrygovier): render this block in the correct location, markup identical to component docs -->
<@- if doc.demo and false -@>
<aside id="platform-preview" class="platform-preview">
<div class="platform-toggle">
<a ng-class="{active: iosActive}"
ng-click="setPlatform('ios')">iOS</a>
<a ng-class="{active: androidActive}"
ng-click="setPlatform('android')">Android</a>
</div>
<div id="demo-device-ios" ng-class="previewPlatform">
<iframe id="demo-ios" src="<$ doc.demo $>" frameborder="0"></iframe>
</div>
<div id="demo-device-android" ng-class="previewPlatform">
<iframe id="demo-ios" src="<$ doc.demo $>" frameborder="0"></iframe>
</div>
</aside>
<@ endif @>
</div>
<@ block content @>