From ffa6a90acb8a4e681d4654cf0667636bff1b2074 Mon Sep 17 00:00:00 2001 From: "Kent C. Dodds" Date: Sat, 8 Nov 2014 14:54:36 -0700 Subject: [PATCH 1/2] docs(nav): Highlight current nav-index-listing Color the current nav-index-listing item dark red to make it easier to know where you are. Closes #9970 --- docs/app/assets/css/docs.css | 4 ++++ docs/app/src/docs.js | 1 + 2 files changed, 5 insertions(+) diff --git a/docs/app/assets/css/docs.css b/docs/app/assets/css/docs.css index 72249876dfbc..ddd73f213ef9 100644 --- a/docs/app/assets/css/docs.css +++ b/docs/app/assets/css/docs.css @@ -128,6 +128,10 @@ h1,h2,h3,h4,h5,h6 { margin-bottom:5px; } +.nav-index-group .nav-index-listing.current a { + color: #B52E31; +} + .nav-breadcrumb { margin:4px 0; padding:0; diff --git a/docs/app/src/docs.js b/docs/app/src/docs.js index d8a9b752c352..5288b1c73a01 100644 --- a/docs/app/src/docs.js +++ b/docs/app/src/docs.js @@ -13,6 +13,7 @@ angular.module('DocsController', []) $scope.navClass = function(navItem) { return { active: navItem.href && this.currentPage && this.currentPage.path, + current: this.currentPage.path === navItem.href, 'nav-index-section': navItem.type === 'section' }; }; From 6c5dbe05203c8c2268ed60a6a939279b54e14842 Mon Sep 17 00:00:00 2001 From: "Kent C. Dodds" Date: Tue, 11 Nov 2014 09:30:28 -0700 Subject: [PATCH 2/2] docs(nav): Highlight current nav-index-listing Fixes the build (I think) --- docs/app/src/docs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/app/src/docs.js b/docs/app/src/docs.js index 5288b1c73a01..03c70d8d9dc7 100644 --- a/docs/app/src/docs.js +++ b/docs/app/src/docs.js @@ -13,7 +13,7 @@ angular.module('DocsController', []) $scope.navClass = function(navItem) { return { active: navItem.href && this.currentPage && this.currentPage.path, - current: this.currentPage.path === navItem.href, + current: this.currentPage && this.currentPage.path === navItem.href, 'nav-index-section': navItem.type === 'section' }; };