use one layout, update logic, add prettify to api code tags
This commit is contained in:
parent
accefeb666
commit
4210541f24
|
@ -18,5 +18,3 @@ for page, slug in data
|
|||
// SET CURRENT PAGE FLAG WHEN YOU PASS IT
|
||||
if current.path[4] == slug
|
||||
currentPage = true
|
||||
|
||||
|
||||
|
|
|
@ -9,8 +9,17 @@ html(lang="en" ng-app="angularIOApp")
|
|||
!= partial("../_includes/_hero")
|
||||
!= partial("../_includes/_banner")
|
||||
|
||||
article.l-content-small.grid-fluid.docs-content
|
||||
|
||||
if current.path[3] == 'api'
|
||||
article(class="l-content-small grid-fluid docs-content" ng-non-bindable)
|
||||
!= yield
|
||||
|
||||
else
|
||||
article(class="l-content-small grid-fluid docs-content")
|
||||
!= yield
|
||||
|
||||
if current.path[3] == 'guide' && current.path[4]
|
||||
!= partial("../_includes/_next-item")
|
||||
|
||||
!= partial("../_includes/_footer")
|
||||
!= partial("../_includes/_scripts-include")
|
|
@ -1,17 +0,0 @@
|
|||
doctype
|
||||
html(lang="en" ng-app="angularIOApp")
|
||||
head
|
||||
!= partial("../../../../_includes/_head-include")
|
||||
|
||||
body(class="l-offset-nav l-offset-side-nav" ng-controller="AppCtrl")
|
||||
!= partial("../../../../_includes/_main-nav")
|
||||
!= partial("../../../_includes/sidenav/_primary")
|
||||
!= partial("../../../../_includes/_hero")
|
||||
!= partial("../../../../_includes/_banner")
|
||||
|
||||
article.l-content-small.grid-fluid.docs-content(ng-non-bindable)
|
||||
!= yield
|
||||
!= partial("../../../../_includes/_next-item")
|
||||
|
||||
!= partial("../../../../_includes/_footer")
|
||||
!= partial("../../../../_includes/_scripts-include")
|
|
@ -1,17 +0,0 @@
|
|||
doctype
|
||||
html(lang="en" ng-app="angularIOApp")
|
||||
head
|
||||
!= partial("../../../../_includes/_head-include")
|
||||
|
||||
body(class="l-offset-nav l-offset-side-nav" ng-controller="AppCtrl")
|
||||
!= partial("../../../../_includes/_main-nav")
|
||||
!= partial("../../../_includes/sidenav/_primary")
|
||||
!= partial("../../../../_includes/_hero")
|
||||
!= partial("../../../../_includes/_banner")
|
||||
|
||||
article.l-content-small.grid-fluid.docs-content
|
||||
!= yield
|
||||
!= partial("../../../../_includes/_next-item")
|
||||
|
||||
!= partial("../../../../_includes/_footer")
|
||||
!= partial("../../../../_includes/_scripts-include")
|
|
@ -33,5 +33,19 @@ angularIO.controller('AppCtrl', ['$scope', '$mdDialog', '$timeout', function($sc
|
|||
* Finish Rendereding code directives then prettify code
|
||||
*/
|
||||
|
||||
// GRAB ALL TAGS NOT USING DIRECTIVES
|
||||
var preTags = angular.element(document.body).find('pre');
|
||||
|
||||
// LOOP THROUGH AND ADD PRETTIFY CLASS
|
||||
_.each(preTags, function(element) {
|
||||
var preTag = angular.element(element);
|
||||
|
||||
// IF NOT FORMATTED, ADD PRETTY PRINT
|
||||
if(!preTag.hasClass('prettyprint')) {
|
||||
preTag.addClass('prettyprint linums');
|
||||
}
|
||||
});
|
||||
|
||||
// TRIGGER PRETTYPRINT AFTER DIGEST LOOP COMPLETE
|
||||
$timeout(prettyPrint, 1);
|
||||
}]);
|
Loading…
Reference in New Issue