From cf7a3b9eb3e17f19ec598e1d77f5bc74751295ac Mon Sep 17 00:00:00 2001 From: Dirk Dougherty Date: Thu, 21 May 2015 00:52:33 -0700 Subject: Highlight "Preview" subtab on preview pages. Support templating for ndk files within templates-sdk. Change-Id: Iade5ac4630c9e763c377ab5749f16832e3ba47b7 --- .../droiddoc/templates-sdk/assets/css/default.css | 20 +++- .../assets/images/android_logo_ndk.png | Bin 0 -> 4712 bytes .../assets/images/android_logo_ndk@2x.png | Bin 0 -> 18596 bytes tools/droiddoc/templates-sdk/assets/js/docs.js | 17 ++- .../droiddoc/templates-sdk/components/masthead.cs | 64 ++++++++++- tools/droiddoc/templates-sdk/customizations.cs | 119 +++++++++++++-------- tools/droiddoc/templates-sdk/docpage.cs | 43 ++++---- tools/droiddoc/templates-sdk/head_tag.cs | 5 + 8 files changed, 197 insertions(+), 71 deletions(-) create mode 100644 tools/droiddoc/templates-sdk/assets/images/android_logo_ndk.png create mode 100644 tools/droiddoc/templates-sdk/assets/images/android_logo_ndk@2x.png (limited to 'tools/droiddoc/templates-sdk') diff --git a/tools/droiddoc/templates-sdk/assets/css/default.css b/tools/droiddoc/templates-sdk/assets/css/default.css index 71d15df..8513843 100644 --- a/tools/droiddoc/templates-sdk/assets/css/default.css +++ b/tools/droiddoc/templates-sdk/assets/css/default.css @@ -7438,6 +7438,10 @@ div.jd-descr > .resource-widget[data-section=distribute\/tools] .section-card-me font-weight: 400; } +.dac-header-crumbs-link.current.ndk { + color: #00BCD4; +} + @media (max-width: 719px) { .dac-header-crumbs { display: none; @@ -7630,6 +7634,10 @@ div.jd-descr > .resource-widget[data-section=distribute\/tools] .section-card-me padding-bottom: 11px; } +.dac-nav-link.has-subnav.ndk, .dac-nav-link.selected.ndk { + border-bottom: 3px solid #00BCD4; +} + .dac-nav-secondary { border-bottom: 1px solid #e5e5e5; display: none; @@ -7660,11 +7668,12 @@ div.jd-descr > .resource-widget[data-section=distribute\/tools] .section-card-me } } -.dac-nav-secondary .dac-nav-item:first-child .dac-nav-link { - padding-left: 20px; +.dac-nav-secondary .dac-nav-link.selected { + border: none; + font-weight: 700; } -.dac-nav-secondary .dac-nav-link.selected { +.dac-nav-secondary .dac-nav-link.selected.ndk { border: none; font-weight: 700; } @@ -7750,6 +7759,11 @@ div.jd-descr > .resource-widget[data-section=distribute\/tools] .section-card-me padding: 0 20px; } + .dac-nav-link.has-subnav.ndk, .dac-nav-link.selected.ndk { + border: none; + padding: 0 20px; + } + .dac-logo-image { margin-right: 5px; vertical-align: top; diff --git a/tools/droiddoc/templates-sdk/assets/images/android_logo_ndk.png b/tools/droiddoc/templates-sdk/assets/images/android_logo_ndk.png new file mode 100644 index 0000000..511c200 Binary files /dev/null and b/tools/droiddoc/templates-sdk/assets/images/android_logo_ndk.png differ diff --git a/tools/droiddoc/templates-sdk/assets/images/android_logo_ndk@2x.png b/tools/droiddoc/templates-sdk/assets/images/android_logo_ndk@2x.png new file mode 100644 index 0000000..1d88dfa Binary files /dev/null and b/tools/droiddoc/templates-sdk/assets/images/android_logo_ndk@2x.png differ diff --git a/tools/droiddoc/templates-sdk/assets/js/docs.js b/tools/droiddoc/templates-sdk/assets/js/docs.js index 2efe3dc..30a29fc 100644 --- a/tools/droiddoc/templates-sdk/assets/js/docs.js +++ b/tools/droiddoc/templates-sdk/assets/js/docs.js @@ -163,6 +163,21 @@ $(document).ready(function() { } else { navEl.find("> li.home > a").addClass('selected'); } + +// highlight NDK tabs + } else if ($("body").hasClass("ndk")) { + parentNavEl = navEl.find("> li.ndk > a"); + parentNavEl.addClass('has-subnav'); + if ($("body").hasClass("guide")) { + navEl.find("> li.guides > a").addClass("selected ndk"); + } else if ($("body").hasClass("reference")) { + navEl.find("> li.reference > a").addClass("selected ndk"); + } else if ($("body").hasClass("samples")) { + navEl.find("> li.samples > a").addClass("selected ndk"); + } else if ($("body").hasClass("downloads")) { + navEl.find("> li.downloads > a").addClass("selected ndk"); + } + // highlight Develop tab } else if ($("body").hasClass("develop") || $("body").hasClass("google")) { parentNavEl = navEl.find("> li.develop > a"); @@ -1056,7 +1071,7 @@ function checkSticky() { var top = $(window).scrollTop(); // we set the navbar fixed when the scroll position is beyond the height of the site header... - var shouldBeSticky = top >= stickyTop; + var shouldBeSticky = top > stickyTop; // ... except if the document content is shorter than the sidenav height. // (this is necessary to avoid crazy behavior on OSX Lion due to overscroll bouncing) if ($("#doc-col").height() < $("#side-nav").height()) { diff --git a/tools/droiddoc/templates-sdk/components/masthead.cs b/tools/droiddoc/templates-sdk/components/masthead.cs index 000d95f..d3fe1c3 100644 --- a/tools/droiddoc/templates-sdk/components/masthead.cs +++ b/tools/droiddoc/templates-sdk/components/masthead.cs @@ -58,26 +58,36 @@ - + + + - + + Back to Android Developers + Developer Console - + + @@ -87,6 +97,49 @@ + + + + + + + +
+
+ +
+
+ +
+
+
+ + @@ -499,53 +521,64 @@ def:header_search_widget() ?> - diff --git a/tools/droiddoc/templates-sdk/docpage.cs b/tools/droiddoc/templates-sdk/docpage.cs index 3af7049..d69023f 100644 --- a/tools/droiddoc/templates-sdk/docpage.cs +++ b/tools/droiddoc/templates-sdk/docpage.cs @@ -6,25 +6,30 @@ google develop guide samples previewdistribute googleplay essentials users engage monetize disttools storiesaboutdesign trainingcoursegoogle ndk guide samples reference downloadsdevelop guide samples previewdistribute googleplay essentials users engage monetize disttools stories analyzeaboutdesign trainingcourse" itemscope itemtype="http://schema.org/Article"> diff --git a/tools/droiddoc/templates-sdk/head_tag.cs b/tools/droiddoc/templates-sdk/head_tag.cs index cfc8b17..3ffa09d 100644 --- a/tools/droiddoc/templates-sdk/head_tag.cs +++ b/tools/droiddoc/templates-sdk/head_tag.cs @@ -36,6 +36,11 @@ if:android.whichdoc != 'online' ?>http:http://fonts.googleapis.com/css?family=Roboto:light,regular,medium,thin,italic,mediumitalic,bold" title="roboto"> + -- cgit v1.1