searchbar in docs should not scroll away

This commit is contained in:
Igor Minar 2010-11-29 16:43:35 -08:00
parent cc315ef4cc
commit 95adf3a4d8
2 changed files with 27 additions and 15 deletions

View file

@ -25,18 +25,26 @@ a {
bottom: 0; bottom: 0;
margin-top: 1px; margin-top: 1px;
overflow-x: hidden; overflow-x: hidden;
overflow-y: scroll;
} }
#sidebar { #sidebar {
width: 13em; width: 13.8em;
padding: 0.8em 0.8em 1.5em 0.8em; padding: 0.8em 0em 1.5em 0.8em;
} }
#main { #main {
left: 14.6em; left: 14.6em;
right: 0; right: 0;
padding: 1em 0.5em 1em 1em; padding: 1em;
overflow-y: scroll;
}
#api-list {
position: absolute;
top: 3em;
bottom: 0;
overflow-y: scroll;
padding-right: 0.8em;
} }
@ -97,11 +105,19 @@ a {
} }
/* Sidebar Style */ /* Searchbox & Sidebar Style */
#search-box, #sidebar {
border-right: 1px solid #DDD;
}
#sidebar { #sidebar {
background-color: #EEE; background-color: #EEE;
border-right: 1px solid #DDD; }
#search-box {
width: 16em;
margin-bottom: 1em;
} }
#sidebar a { #sidebar a {
@ -112,16 +128,12 @@ a {
text-decoration: underline; text-decoration: underline;
} }
#sidebar input {
width: 15em;
margin-bottom: 1em;
}
#sidebar ul { #sidebar ul {
list-style-type: none; list-style-type: none;
/*TODO(esprehn): Can we just reset globally and not break examples?*/ /*TODO(esprehn): Can we just reset globally and not break examples?*/
margin: 0; margin: 0;
padding: 0; padding: 0 0.8em 0 0;
width: 13em;
} }
#sidebar ul li { #sidebar ul li {

View file

@ -30,9 +30,9 @@
</h1> </h1>
</div> </div>
<div id="sidebar"> <div id="sidebar">
<input type="text" name="filterText" placeholder="search documentaiton"/> <input type="text" name="search" id="search-box" placeholder="search documentaiton"/>
<ul> <ul id="api-list">
<li ng:repeat="page in pages.$filter(filterText)" ng:class="getClass(page)"> <li ng:repeat="page in pages.$filter(search)" ng:class="getClass(page)">
<a href="{{getUrl(page)}}" ng:click="">{{page.name | short}}</a> <a href="{{getUrl(page)}}" ng:click="">{{page.name | short}}</a>
</li> </li>
</ul> </ul>