Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b4cb3ebc authored by Dirk Dougherty's avatar Dirk Dougherty Committed by Android Git Automerger
Browse files

am ca1230c9: Minor fixes for handling cross-browser load issues and positioning of #headings.

* commit 'ca1230c9':
  Minor fixes for handling cross-browser load issues and positioning of #headings.
parents 9890fe24 ca1230c9
Loading
Loading
Loading
Loading
+15 −4
Original line number Diff line number Diff line
@@ -713,6 +713,7 @@ ul#title-tabs li a:active {
    color: #33b5e5;
    border-bottom-color: #33b5e5; } }

h1:target,
h2:target,
h3:target {
    -webkit-animation-name: glowheader;
@@ -1131,7 +1132,7 @@ h3 {
h3, h4 {
    color:#333;
    line-height: 20px;
    margin: 10px 0;
    margin: 10px 0 14px 0;
}
h4 {
  font-size: 16px;
@@ -5137,10 +5138,12 @@ a.download-sdk {
  margin-bottom: 0px;
  font-size: 20px;
  color: #363636;
  padding-top: 70px;
  margin-top:-60px;
}
.headerLine hr {
  overflow: hidden;
  margin: 42px 0 0 0;
  margin: 30px 0 0 0;
}

.article-detail #body-content {
@@ -5365,11 +5368,11 @@ a.download-sdk {
.resource-flow-layout:after {
  content: ".";
  display: block;
  height: 0;
  height: 10;
  position:relative;
  clear: both;
  visibility: hidden;
}

.resource-card:hover {
  cursor: pointer;
}
@@ -6384,3 +6387,11 @@ div.jd-descr > .resource-widget[data-section=distribute\/tools]
.section-card-menu .card-info ul li {
  border-top-color: #7e3794 !important;
}

div.jd-descr > h2:before, h3:before {
display:block;
content: "   ";
margin-top:-60px;
height: 70px;
visibility:hidden;
}
 No newline at end of file
+85 −87
Original line number Diff line number Diff line
@@ -884,40 +884,32 @@ function writeCookie(cookie, val, section, expiration) {
/* #########     END COOKIES!     ########## */




var sticky = false;
var stickyTop;
var prevScrollLeft = 0; // used to compare current position to previous position of horiz scroll
/* Sets the vertical scoll position at which the sticky bar should appear.
   This method is called to reset the position when search results appear or hide */
function setStickyTop() {
  stickyTop = $('#header-wrapper').outerHeight() - $('#sticky-header').outerHeight();
}


/*
 * Displays sticky nav bar on pages when dac header scrolls out of view 
 */
(function() {
  $(document).ready(function() {
$(window).scroll(function(event) {

  setStickyTop();
    var sticky = false;
  var hiding = false;
  var $stickyEl = $('#sticky-header');
  var $menuEl = $('.menu-container');

    var prevScrollLeft = 0; // used to compare current position to previous position of horiz scroll

    $(window).scroll(function() {
  // Exit if there's no sidenav
  if ($('#side-nav').length == 0) return;
  // Exit if the mouse target is a DIV, because that means the event is coming
  // from a scrollable div and so there's no need to make adjustments to our layout
      if (event.target.nodeName == "DIV") {
  if ($(event.target).nodeName == "DIV") {
    return;
  }


  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;
@@ -929,10 +921,9 @@ function setStickyTop() {

  // Don't continue if the header is sufficently far away
  // (to avoid intensive resizing that slows scrolling)
      if (sticky && shouldBeSticky) {
  if (sticky == shouldBeSticky) {
    return;
  }

  // Account for horizontal scroll
  var scrollLeft = $(window).scrollLeft();
  // When the sidenav is fixed and user scrolls horizontally, reposition the sidenav to match
@@ -977,10 +968,15 @@ function setStickyTop() {
    $stickyEl.hide();
    hiding = false;
  }

  resizeNav(250); // pass true in order to delay the scrollbar re-initialization for performance
});

/*
 * Manages secion card states and nav resize to conclude loading
 */
(function() {
  $(document).ready(function() {

    // Stack hover states
    $('.section-card-menu').each(function(index, el) {
      var height = $(el).height();
@@ -1827,6 +1823,11 @@ function search_changed(e, kd, toroot)
    }
    // Stop here if Google results are showing
    else if ($("#searchResults").is(":visible")) {
        //If search_results is scrolled out of view, scroll to top on input
        if ((sticky ) && (search.value != "")) {
          $('body,html').animate({scrollTop:0}, '500', 'swing');
        }
        // if results aren't showing (and text not empty), return true to allow search to execute
        return true;
    }
    // 38 UP ARROW
@@ -2505,8 +2506,6 @@ $(window).hashchange( function(){
    if (!$("#searchResults").is(":hidden")) {
      hideResults();
    }
    // Adjust the scroll position to account for sticky header
    $(window).scrollTop($(window).scrollTop() - 60);
    return;
  }

@@ -3517,7 +3516,6 @@ function showSamples() {
    while (i < resources.length) {
      var cardSize = cardSizes[j++ % cardSizes.length];
      cardSize = cardSize.replace(/^\s+|\s+$/,'');
      console.log("cardsize is " + cardSize);
      // Some card sizes do not get a plusone button, such as where space is constrained
      // or for cards commonly embedded in docs (to improve overall page speed).
      plusone = !((cardSize == "6x2") || (cardSize == "6x3") ||