Skip to content
This repository has been archived by the owner on Jan 23, 2022. It is now read-only.

Commit

Permalink
feat(docs): optimize sidebar & breadcrum style
Browse files Browse the repository at this point in the history
  • Loading branch information
m7r committed Aug 1, 2013
1 parent 4c1dd72 commit 6947ed4
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 15 deletions.
31 changes: 20 additions & 11 deletions src/templates/css/docs.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ img.AngularJS-small {
}

.breadcrumb {
padding-bottom:2px;
padding-top: 6px;
padding-bottom: 0;
line-height: 18px
}

.clear-navbar {
Expand All @@ -35,6 +37,14 @@ img.AngularJS-small {

/* =============================== */

.form-search {
margin-right: 20px;
}

.form-search .search-query {
width: 170px;
}

.form-search .dropdown-menu {
margin-left: 10px;
}
Expand All @@ -46,10 +56,6 @@ img.AngularJS-small {
color: black;
}

.form-search > ul.nav {
padding: 0;
}

.form-search > ul.nav > li > a {
margin: 0;
}
Expand All @@ -63,19 +69,22 @@ img.AngularJS-small {
min-height: 14px;
}

.form-search > ul.nav > li.first {
padding-top: 6px;
}

.form-search > ul.nav > li.last {
padding-bottom: 1em;
padding-bottom: 6px;
}

.form-search > ul.nav > li.last + li.api-list-item {
margin-top:-1em;
padding-bottom: 1em;
margin-top: -6px;
padding-bottom: 6px;
}

.form-search .well {
border-color: #d3d3d3;
padding-top: 0;
padding-bottom: 0;
padding: 0;
margin-bottom: 15px;
}

Expand Down Expand Up @@ -104,7 +113,7 @@ img.AngularJS-small {
}

.form-search .module .guide {
line-height: 21px;
line-height: 20px;
}

/* =============================== */
Expand Down
8 changes: 4 additions & 4 deletions src/templates/index.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,11 @@

<div class="row">
<div class="span3">
<form class="well form-search" ng-submit="submitForm()">
<form class="form-search" ng-submit="submitForm()">
<div class="dropdown search"
ng-class="{open: focused && bestMatch.rank > 0 && bestMatch.page != currentPage}">
<input type="text" ng-model="search" placeholder="search the docs"
tabindex="1" accesskey="s" class="input-medium search-query" focused="focused">
tabindex="1" accesskey="s" class="search-query" focused="focused">
<ul class="dropdown-menu">
<li>
<a href="{{bestMatch.page.url}}">{{bestMatch.page.shortName}}</a>
Expand All @@ -136,8 +136,8 @@

<div class="spacer"></div>

<ul class="nav nav-list" ng-hide="page">
<li ng-repeat="page in pages<%= trackBy('page.url') %>" ng-class="navClass(page)" class="api-list-item">
<ul class="nav nav-list well" ng-show="pages">
<li ng-repeat="page in pages<%= trackBy('page.url', "'expand'") %>" ng-class="navClass(page)" class="api-list-item">
<a href="{{page.url}}" tabindex="2">{{page.shortName}}</a>
</li>
</ul>
Expand Down
1 change: 1 addition & 0 deletions src/templates/js/docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ docsApp.controller.DocsController = function($scope, $location, $window, section

$scope.navClass = function(page1, page2) {
return {
first: this.$first,
last: this.$last,
active: page1 && this.currentPage == page1 || page2 && this.currentPage == page2
};
Expand Down

0 comments on commit 6947ed4

Please sign in to comment.