From ef497fb9d60b8a084a42280faeb6793cba1b8c6d Mon Sep 17 00:00:00 2001 From: connors Date: Sat, 11 Jan 2014 18:10:26 -0800 Subject: [PATCH] getting everything working again. --- components.html | 35 +++++++++++++++++------------------ docs-assets/css/docs.css | 20 +++++++++++++------- docs-assets/js/docs.js | 10 +++++----- lib/sass/docs.scss | 14 ++++++++------ 4 files changed, 43 insertions(+), 36 deletions(-) diff --git a/components.html b/components.html index 6d0cafa..5fa0ca6 100644 --- a/components.html +++ b/components.html @@ -44,7 +44,20 @@ base_url: "../" -
+
+
+ +
+
+
+
+

Title

+
+
+
+
+
+
@@ -1049,21 +1062,7 @@ document window.addEventListener('push', myFunction); {% endhighlight %} -
-
- -
- -
-
-
-
-

Title

-
-
-
-
-
- -
+
+ + diff --git a/docs-assets/css/docs.css b/docs-assets/css/docs.css index f3f4a82..506bdf3 100644 --- a/docs-assets/css/docs.css +++ b/docs-assets/css/docs.css @@ -146,7 +146,15 @@ h1, h2, h3, h4, h5, h6 { } .platform-toggle { + z-index: 3; border-bottom: 1px solid #ddd; + background-color: #fff; +} +.platform-toggle.fixed { + position: fixed; + top: 0; + left: 0; + right: 0; } .platform-toggle .segmented-controller { max-width: 300px; @@ -268,15 +276,10 @@ hr { } @media screen and (min-width: 768px) { - .phone-column { - position: relative; - } - .iphone { - display: block; - position: absolute; + position: relative; top: 50px; - float: right; + display: block; width: 395px; height: 813px; margin-left: -13px; @@ -384,6 +387,9 @@ hr { padding-right: 15px; float: left; } +.column.pull-right { + float: right; +} .column .column-group { margin-left: -15px; diff --git a/docs-assets/js/docs.js b/docs-assets/js/docs.js index f260397..8370799 100644 --- a/docs-assets/js/docs.js +++ b/docs-assets/js/docs.js @@ -35,7 +35,7 @@ $(function() { iphone.initialLeft = iphone.offset().left; iphone.initialTop = iphone.initialTop || iphone.offset().top; - iphone.dockingOffset = ($(window).height() + $('.platform-toggle').height() - iphone.height())/2; + iphone.dockingOffset = ($(window).height() + $('.platform-toggle').outerHeight() - iphone.height())/2; checkDesktopContent(); calculateScroll(); @@ -88,7 +88,7 @@ $(function() { if(pageHeight - currentTop < footerHeight + contentPadding + 1400) { iphone[0].className = "iphone iphone-bottom"; iphone[0].setAttribute('style','') - } else if((iphone.initialTop - currentTop) <= iphone.dockingOffset + 40) { + } else if((iphone.initialTop - currentTop) <= iphone.dockingOffset + 41) { iphone[0].className = "iphone iphone-fixed"; iphone.css({top: iphone.dockingOffset}) } else { @@ -98,10 +98,10 @@ $(function() { if(currentTop >= $('.docs-masthead').outerHeight()) { $('.platform-toggle').addClass('fixed'); - console.log('fixed'); + $('.docs-components').css('padding-top', $('.platform-toggle').outerHeight()); } else { $('.platform-toggle').removeClass('fixed'); - console.log('not fixed'); + $('.docs-components').css('padding-top', 0); } // Injection of components into phone @@ -131,4 +131,4 @@ $(function() { $(window).on('load resize', initialize); $(window).on('load', function () { new FingerBlast('.iphone-content'); }); -}); \ No newline at end of file +}); diff --git a/lib/sass/docs.scss b/lib/sass/docs.scss index b697793..ec472b9 100644 --- a/lib/sass/docs.scss +++ b/lib/sass/docs.scss @@ -156,7 +156,9 @@ h1, h2, h3, h4, h5, h6 { // -------------------------------------------------- .platform-toggle { + z-index: 3; border-bottom: 1px solid #ddd; + background-color: #fff; &.fixed { position: fixed; @@ -287,14 +289,10 @@ hr { // Tablet to desktop // -------------------------------------------------- @media screen and (min-width: 768px) { - .phone-column { - position: relative; - } .iphone { - display: block; - position: absolute; + position: relative; top: 50px; - float: right; + display: block; width: 395px; height: 813px; margin-left: -13px; @@ -396,6 +394,10 @@ hr { padding-left: 15px; padding-right: 15px; float: left; + + &.pull-right { + float: right; + } } // Lines nested grids up correctly. .column .column-group {