From 53b2254ea70019937463d8e079e1991b3d3d1d8b Mon Sep 17 00:00:00 2001
From: Igor Minar
Date: Mon, 2 Apr 2012 08:32:30 -0700
Subject: docs(tutorial): update tutorial intro + steps 0-3
also contains all kinds of fixes that I had to make in the docs app to
get the tutorial to render correctly
---
docs/src/templates/doc_widgets.js | 6 +++---
docs/src/templates/docs.css | 21 +++++++++++++++++++++
docs/src/templates/docs.js | 8 ++++----
docs/src/templates/index.html | 2 +-
4 files changed, 29 insertions(+), 8 deletions(-)
(limited to 'docs/src')
diff --git a/docs/src/templates/doc_widgets.js b/docs/src/templates/doc_widgets.js
index 50de4ed3..bf49697d 100644
--- a/docs/src/templates/doc_widgets.js
+++ b/docs/src/templates/doc_widgets.js
@@ -291,14 +291,14 @@ angular.module('ngdocs.directives', [], function($compileProvider) {
} else {
prevStep = 'step_' + pad(step - 1);
nextStep = 'step_' + pad(step + 1);
- codeDiff = 'step-' + step + '...step-' + step;
+ codeDiff = 'step-' + (step-1) + '...step-' + step;
}
content = angular.element(
- '
Previous' +
+ 'Previous' +
'Live Demo' +
'Code Diff' +
- 'Next'
+ 'Next'
);
element.attr('id', 'tutorial-nav');
diff --git a/docs/src/templates/docs.css b/docs/src/templates/docs.css
index ee8eaaef..adf74ba0 100644
--- a/docs/src/templates/docs.css
+++ b/docs/src/templates/docs.css
@@ -518,3 +518,24 @@ td.empty-corner-lt {
.even {
background-color: #d3d3d3;
}
+
+/* tutorial */
+
+#content .tutorial-start {
+ -moz-border-radius:8px;
+ -webkit-border-radius: 8px;
+ border-radius: 8px;
+
+ background-color: #7989D6;
+ padding: 10px;
+ margin-left: 43%;
+ width: 100px;
+ color: #fff;
+ font-weight: bold;
+
+}
+
+#content .tutorial-start:hover {
+ color: #000;
+}
+
diff --git a/docs/src/templates/docs.js b/docs/src/templates/docs.js
index 9d91c233..b82ba660 100644
--- a/docs/src/templates/docs.js
+++ b/docs/src/templates/docs.js
@@ -133,14 +133,14 @@ SyntaxHighlighter['defaults'].gutter = true;
* @param $cookieStore
* @constructor
*/
-function TutorialInstructionsCtrl($cookieStore) {
- this.selected = $cookieStore.get('selEnv') || 'git-mac';
+function TutorialInstructionsCtrl($scope, $cookieStore) {
+ $scope.selected = $cookieStore.get('selEnv') || 'git-mac';
- this.currentCls = function(id, cls) {
+ $scope.currentCls = function(id, cls) {
return this.selected == id ? cls || 'current' : '';
};
- this.select = function(id) {
+ $scope.select = function(id) {
this.selected = id;
$cookieStore.put('selEnv', id);
};
diff --git a/docs/src/templates/index.html b/docs/src/templates/index.html
index bb8d2f1e..794b3418 100644
--- a/docs/src/templates/index.html
+++ b/docs/src/templates/index.html
@@ -98,7 +98,7 @@