Skip to content

Commit cbe5145

Browse files
committed
Updated docs layout. Removed old code.
1 parent b778f81 commit cbe5145

1 file changed

Lines changed: 12 additions & 27 deletions

File tree

docs/theme/deis/layout.html

Lines changed: 12 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -147,20 +147,22 @@
147147
$('.social-menu').css({'margin-top': 309})
148148
}
149149

150-
//Check URL
151-
// var path = window.location.pathname;
152-
// var pathName = path.split('/');
153-
// var num = pathName.length - 2;
150+
//Remove <ul> from Releases
151+
$('.toctree-l1 > a').each(function(){
152+
if($(this).html() == "Releases") {
153+
console.log($(this).html());
154+
}
155+
});
154156

157+
//Check URL
155158
var path = window.location.href;
156159
var pathName = path.split('/');
157160
var num = pathName.length - 3;
158-
console.log(pathName[num]);
159161
var gettingstarted, terms, client, server, contributing;
160162

161163
switch(pathName[num]) {
162164
case 'gettingstarted':
163-
console.log('case at Getting Started');
165+
//case at Getting Started
164166
$('.toctree-l1 > a').each(function(){
165167
if($(this).html() == "Getting Started") {
166168
$(this).parent().attr('state', 'open');
@@ -169,7 +171,7 @@
169171
});
170172
break;
171173
case 'terms':
172-
console.log('case at Terms');
174+
//case at Terms
173175
$('.toctree-l1 > a').each(function(){
174176
if($(this).html() == "Terms") {
175177
$(this).parent().attr('state', 'open');
@@ -178,7 +180,7 @@
178180
});
179181
break;
180182
case 'client':
181-
console.log('case at Client Reference');
183+
//case at Client Reference
182184
$('.toctree-l1 > a').each(function(){
183185
if($(this).html() == "Client Reference") {
184186
$(this).parent().attr('state', 'open');
@@ -187,7 +189,7 @@
187189
});
188190
break;
189191
case 'server':
190-
console.log('case at Server Reference');
192+
//case at Server Reference
191193
$('.toctree-l1 > a').each(function(){
192194
if($(this).html() == "Server Reference") {
193195
$(this).parent().attr('state', 'open');
@@ -196,7 +198,7 @@
196198
});
197199
break;
198200
case 'contributing':
199-
console.log('case at Contributing');
201+
//case at Contributing
200202
$('.toctree-l1 > a').each(function(){
201203
if($(this).html() == "Contributing") {
202204
$(this).parent().attr('state', 'open');
@@ -208,26 +210,9 @@
208210
//code this out when releases gets filled out
209211
break;
210212
default:
211-
console.log('failure.');
212213

213214
}
214215

215-
216-
// switch(pathName[num]) {
217-
// case gettingstarted:
218-
// $('Getting Started').parent().attr('state', 'open');
219-
// $('Getting Started').attr('state', 'open');
220-
// break;
221-
// }
222-
223-
//Check for match between path name and menu titles
224-
//$('.toctree-l2 > a').each(function(){
225-
// if($(this).html().toLowerCase() == pathName[num]) {
226-
// var parents = $(this).parents();
227-
// $(parents[2]).attr('state', 'open');
228-
// }
229-
//});
230-
231216
//Doc Sidebar: Create accordion
232217
var allPanels = $('.toctree-l1 > ul');
233218
allPanels.hide();

0 commit comments

Comments
 (0)