\n";
+ html += this.toHtmlEdit();
+ html += this.toHtmlTabs();
+ if(this.animations) {
+ html += '
';
+ html += ' ';
+ html += ' ';
+ html += '
';
+ }
+ html += "
Demo
\n";
+ html += this.toHtmlEmbed();
+ return html;
};
@@ -116,7 +131,10 @@ exports.Example.prototype.toHtmlTabs = function() {
exports.Example.prototype.toHtmlEmbed = function() {
var out = [];
- out.push('
');
diff --git a/docs/src/ngdoc.js b/docs/src/ngdoc.js
index 3e1bbe9d00a6..ddc8dbabd6e4 100644
--- a/docs/src/ngdoc.js
+++ b/docs/src/ngdoc.js
@@ -130,8 +130,13 @@ Doc.prototype = {
parts.forEach(function(text, i) {
parts[i] = (text || '').
- replace(/([\s\S]*?)<\/example>/gmi, function(_, module, deps, content) {
+ replace(/([\s\S]*?)<\/example>/gmi,
+ function(_, module, deps, animations, content) {
+
var example = new Example(self.scenarios);
+ if(animations) {
+ example.enableAnimations();
+ }
example.setModule(module);
example.addDeps(deps);
@@ -437,9 +442,11 @@ Doc.prototype = {
var restrict = self.restrict || 'AC';
if (restrict.match(/E/)) {
- dom.text('This directive can be used as custom element, but we aware of ');
- dom.tag('a', {href:'guide/ie'}, 'IE restrictions');
- dom.text('.');
+ dom.html('
');
+ dom.text('This directive can be used as custom element, but we aware of ');
+ dom.tag('a', {href:'guide/ie'}, 'IE restrictions');
+ dom.text('.');
+ dom.html('
');
}
if (self.usage) {
diff --git a/docs/src/templates/css/animations.css b/docs/src/templates/css/animations.css
new file mode 100644
index 000000000000..3defa5ad430d
--- /dev/null
+++ b/docs/src/templates/css/animations.css
@@ -0,0 +1,73 @@
+.reveal-setup {
+ -webkit-transition:1s linear all;
+ -moz-transition:1s linear all;
+ -ms-transition:1s linear all;
+ -o-transition:1s linear all;
+ transition:1s linear all;
+
+ opacity:0;
+}
+.reveal-setup.reveal-start {
+ opacity:1;
+}
+
+.slide-reveal-setup {
+ -webkit-transition:0.5s linear all;
+ -moz-transition:0.5s linear all;
+ -ms-transition:0.5s linear all;
+ -o-transition:0.5s linear all;
+ transition:0.5s linear all;
+ opacity:0.5;
+}
+.slide-reveal-setup.slide-reveal-start {
+ opacity:1;
+}
+
+.slide-enter-setup {
+ -webkit-transition:0.5s linear all;
+ -moz-transition:0.5s linear all;
+ -ms-transition:0.5s linear all;
+ -o-transition:0.5s linear all;
+ transition:0.5s linear all;
+
+ position:relative;
+ left:10px;
+ opacity:0;
+}
+.slide-enter-setup.slide-enter-start {
+ left:0;
+ opacity:1;
+}
+
+.slide-leave-setup {
+ -webkit-transition:0.5s linear all;
+ -moz-transition:0.5s linear all;
+ -ms-transition:0.5s linear all;
+ -o-transition:0.5s linear all;
+ transition:0.5s linear all;
+
+ opacity:1;
+}
+.slide-leave-setup.slide-leave-start {
+ opacity:0;
+}
+
+.example-animate-container {
+ position:relative;
+ background:white;
+ border:1px solid black;
+ height:40px;
+ overflow:hidden;
+}
+
+.example-animate-container > div {
+ padding:1em;
+}
+
+.animator-container.animations-off * {
+ -webkit-transition: none;
+ -moz-transition: none;
+ -ms-transition: none;
+ -o-transition: color 0 ease-in; /* opera is special :) */
+ transition: none;
+}
diff --git a/docs/src/templates/css/docs.css b/docs/src/templates/css/docs.css
index 70d98a3c8bea..bed88f802eba 100644
--- a/docs/src/templates/css/docs.css
+++ b/docs/src/templates/css/docs.css
@@ -3,6 +3,15 @@ img.AngularJS-small {
height: 25px;
}
+/* this is here to avoid the display=block shuffling of ngShow */
+.breadcrumb li > * {
+ float:left;
+ margin:0 2px 0 0;
+}
+
+.breadcrumb {
+ padding-bottom:2px;
+}
.clear-navbar {
margin-top: 60px;
diff --git a/docs/src/templates/index.html b/docs/src/templates/index.html
index bd460838ae37..0477d9c471eb 100644
--- a/docs/src/templates/index.html
+++ b/docs/src/templates/index.html
@@ -34,6 +34,7 @@
addTag('link', {rel: 'stylesheet', href: 'css/bootstrap.min.css', type: 'text/css'});
addTag('link', {rel: 'stylesheet', href: 'css/font-awesome.css', type: 'text/css'});
addTag('link', {rel: 'stylesheet', href: 'css/docs.css', type: 'text/css'});
+ addTag('link', {rel: 'stylesheet', href: 'css/animations.css', type: 'text/css'});
if (jQuery) addTag('script', {src: debug ? 'js/jquery.js' : 'js/jquery.min.js'});
addTag('script', {src: path('angular.js')}, sync);
addTag('script', {src: path('angular-resource.js') }, sync);
@@ -231,11 +232,11 @@