docs: Removed navigation heading for Develop > Preview

Change-Id: Id6b86346bf5bcb562c167d48f2e8b3b73d94e0de
This commit is contained in:
Quddus Chong
2015-09-04 14:45:46 -07:00
parent e0b15d46e2
commit 2cb2f687f8
4 changed files with 6 additions and 62 deletions

View File

@@ -202,8 +202,6 @@ $(document).ready(function() {
subNavEl.find("li.google > a").addClass("selected");
} else if ($("body").hasClass("samples")) {
subNavEl.find("li.samples > a").addClass("selected");
} else if ($("body").hasClass("preview")) {
subNavEl.find("li.preview > a").addClass("selected");
} else {
parentNavEl.removeClass('has-subnav').addClass("selected");
}
@@ -2361,37 +2359,6 @@ function search_changed(e, kd, toroot)
}
}
// Search for Preview Guides
for (var i=0; i<PREVIEW_RESOURCES.length; i++) {
// current search comparison, with counters for tag and title,
// used later to improve ranking
var s = PREVIEW_RESOURCES[i];
s.matched_tag = 0;
s.matched_title = 0;
var matched = false;
// Check if query matches any tags; work backwards toward 1 to assist ranking
for (var j = s.keywords.length - 1; j >= 0; j--) {
// it matches a tag
if (s.keywords[j].toLowerCase().indexOf(queryStr) == 0) {
matched = true;
s.matched_tag = j + 1; // add 1 to index position
}
}
// Check if query matches the doc title, but only for current language
if (s.lang == currentLang) {
// if query matches the doc title
if (s.title.toLowerCase().indexOf(queryStr) == 0) {
matched = true;
s.matched_title = 1;
}
}
if (matched) {
gDocsMatches[matchedCountDocs] = s;
matchedCountDocs++;
}
}
// Rank/sort all the matched pages
rank_autocomplete_doc_results(text, gDocsMatches);
}
@@ -3747,7 +3714,7 @@ function showSamples() {
return $el;
}
function createResponsiveFlowColumn(cardSize) {
var cardWidth = parseInt(cardSize.match(/(\d+)/)[1], 10);
var column = $('<div>').addClass('col-' + (cardWidth / 3) + 'of6');
@@ -3788,7 +3755,7 @@ function showSamples() {
var cardSize = cardSizes[j++ % cardSizes.length];
cardSize = cardSize.replace(/^\s+|\s+$/,'');
var column = createResponsiveFlowColumn(cardSize).appendTo(cardParent);
// A stack has a third dimension which is the number of stacked items