diff --git a/tools/droiddoc/templates-sdk-dev/assets/css/default.css b/tools/droiddoc/templates-sdk-dev/assets/css/default.css index 3c045ce86..6fef2419d 100644 --- a/tools/droiddoc/templates-sdk-dev/assets/css/default.css +++ b/tools/droiddoc/templates-sdk-dev/assets/css/default.css @@ -9887,3 +9887,33 @@ a.video-shadowbox-button.white:hover::after { position: absolute; top: -4px; } + +/** CSS Fixes for DevSite (akassay@) */ +.dac-button-social, +.dac-fab:not('.dac-scroll-button') { + position: relative; +} + +.dac-button-social .dac-sprite, +.dac-fab .dac-sprite, +.play-button .dac-sprite { + margin-top: -7px; + position: relative; + top: 50%; +} + +.dac-fab .dac-sprite.dac-arrow-down-gray { + margin-top: -3px; +} + +.dac-button-social .dac-sprite.dac-gplus { + margin-top: -17px; +} + +.play-button .dac-sprite { + margin-top: -10px; +} + +.dac-nav-link-forward { + padding: 9px 0; +} diff --git a/tools/droiddoc/templates-sdk-dev/assets/js/docs.js b/tools/droiddoc/templates-sdk-dev/assets/js/docs.js index 60cb860d1..9afed711e 100644 --- a/tools/droiddoc/templates-sdk-dev/assets/js/docs.js +++ b/tools/droiddoc/templates-sdk-dev/assets/js/docs.js @@ -15,7 +15,8 @@ $.ajaxSetup({ $(document).ready(function() { // prep nav expandos - var pagePath = document.location.pathname; + var pagePath = devsite ? + location.href.replace(location.hash, '') : document.location.pathname; // account for intl docs by removing the intl/*/ path if (pagePath.indexOf("/intl/") == 0) { pagePath = pagePath.substr(pagePath.indexOf("/", 6)); // start after intl/ to get last / @@ -3378,12 +3379,22 @@ window.changeLangPref = changeLangPref; })(); var localeTarget = (function() { var localeTarget = locale; - if (location.pathname.substring(0,6) == "/intl/") { - var target = location.pathname.split('/')[2]; - if (!(target === 0) || (LANGUAGES.indexOf(target) === -1)) { - localeTarget = target; + if (window.devsite) { + if (getQueryVariable('hl')) { + var target = getQueryVariable('hl'); + if (!(target === 0) || (LANGUAGES.indexOf(target) === -1)) { + localeTarget = target; + } + } + } else { + if (location.pathname.substring(0,6) == "/intl/") { + var target = location.pathname.split('/')[2]; + if (!(target === 0) || (LANGUAGES.indexOf(target) === -1)) { + localeTarget = target; + } } } + return localeTarget; })(); @@ -5357,7 +5368,8 @@ window.metadata.search = (function() { return $.get('https://content.googleapis.com/customsearch/v1?' + $.param(searchParams)); } - function renderResults(el, results) { + function renderResults(el, results, searchAppliance) { + var referenceResults = searchAppliance.getReferenceResults(); if (!results.items) { el.append($('
').addClass('dac-custom-search-section').text(section))
+ .append(
+ $('').text(item.title).attr('href', item.link).wrap(' ').addClass('dac-custom-search-snippet').html(item.htmlSnippet.replace(/ ').addClass('dac-custom-search-section').text(section))
- .append(
- $('').text(item.title).attr('href', item.link).wrap('').parent().addClass('dac-custom-search-title')
+ )
+ .append($('
/g, '')))
+ .append($('').addClass('dac-custom-search-link').text(item.formattedUrl).attr('href', item.link)));
+
+ el.append(entry);
}
-
- entry.append($('').parent().addClass('dac-custom-search-title')
- )
- .append($('