]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- again use "fixed" for sidebar in all automated cases, dynamically
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 27 May 2014 21:55:38 +0000 (17:55 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 27 May 2014 21:55:38 +0000 (17:55 -0400)
adjust its top within the initial scroll period, this is what foundationdb
is doing.   For whatever reason that comes out smooth on all browsers.
the rationale is so that its independently scrollable at all times.

doc/build/static/docs.css
doc/build/static/init.js

index dacabde90ab280c90fc449a799f767809c049a61..3bb77acc413c7e84b1328001ac08316919dca970 100644 (file)
@@ -192,7 +192,6 @@ a.headerlink:hover {
   z-index: 3;
   background-color: #EFEFEF;
 
-  /*position: absolute;*/
   float: left;
   top: 120px;
   bottom: 0;
@@ -228,6 +227,10 @@ a.headerlink:hover {
 }
 
 
+#docs-sidebar.preautomated {
+  position: fixed;
+}
+
 #docs-sidebar.automated {
     position: fixed;
     float: none;
@@ -381,8 +384,8 @@ th.field-name {
 }
 
 div.section {
-  /*clear:right;*/
 }
+
 div.note, div.warning, p.deprecated, div.topic, div.admonition  {
     background-color:#EEFFEF;
 }
index 0732890c91e9077fbe214ca3178e2e0e20448e35..356b1f72611117bfbf44aecddab14aef028950e7 100644 (file)
@@ -14,6 +14,11 @@ function initFloatyThings() {
     automatedBreakpoint = $("#docs-container").position().top;
 
     parentOffset = $("#docs-container").parent().position().top - $("#docs-container").position().top;
+
+    // safari doesn't give us 120px for this CSS even though
+    // it's in docs.css as that
+    sidebarTop = "120px"; //$("#docs-sidebar").css("top");
+
     $("#docs-top-navigation-container").addClass("preautomated");
     $("#docs-sidebar").addClass("preautomated");
     $("#docs-container").addClass("preautomated");
@@ -35,12 +40,13 @@ function initFloatyThings() {
             // a little squashed
             containerHeight = $("#docs-top-navigation-container").height();
             $("#docs-body").css("margin-top", containerHeight - parentOffset + 1);
+            $("#docs-sidebar").css("top", sidebarTop);
         }
         else {
-            $("#docs-sidebar.automated").scrollTop(0);
             $("#docs-sidebar").removeClass("automated");
             $("#docs-top-navigation-container").removeClass("automated");
             $("#docs-body").css("margin-top", "");
+            $("#docs-sidebar").css("top", $("#docs-body").offset().top - scrolltop);
         }