Navigation Menu

Skip to content
This repository has been archived by the owner on Dec 4, 2017. It is now read-only.

Commit

Permalink
use one layout, update logic, add prettify to api code tags
Browse files Browse the repository at this point in the history
  • Loading branch information
alexwolfe committed May 4, 2015
1 parent accefeb commit 4210541
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 39 deletions.
4 changes: 1 addition & 3 deletions public/_includes/_next-item.jade
Expand Up @@ -17,6 +17,4 @@ for page, slug in data

// SET CURRENT PAGE FLAG WHEN YOU PASS IT
if current.path[4] == slug
currentPage = true


currentPage = true
13 changes: 11 additions & 2 deletions public/docs/_layout.jade
Expand Up @@ -9,8 +9,17 @@ html(lang="en" ng-app="angularIOApp")
!= partial("../_includes/_hero")
!= partial("../_includes/_banner")

article.l-content-small.grid-fluid.docs-content
!= yield

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")
17 changes: 0 additions & 17 deletions public/docs/dart/latest/guide/_layout.jade

This file was deleted.

17 changes: 0 additions & 17 deletions public/docs/js/latest/guide/_layout.jade

This file was deleted.

14 changes: 14 additions & 0 deletions public/resources/js/controllers/app-controller.js
Expand Up @@ -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);
}]);

0 comments on commit 4210541

Please sign in to comment.