Browse Source

getting everything working again.

pull/249/head
connors 11 years ago
parent
commit
ef497fb9d6
  1. 35
      components.html
  2. 20
      docs-assets/css/docs.css
  3. 10
      docs-assets/js/docs.js
  4. 14
      lib/sass/docs.scss

35
components.html

@ -44,7 +44,20 @@ base_url: "../"
<![endif]--> <![endif]-->
<!-- Components --> <!-- Components -->
<div class="column-group"> <div class="docs-components column-group">
<div class="phone-column column units-2 lg-units-5 pull-right">
<!-- In iPhone examples -->
<div class="iphone">
<div class="iphone-content">
<div id="iwindow">
<header class="bar-nav">
<h1 class="title">Title</h1>
</header>
</div>
</div>
</div>
</div>
<div class="column units-2 lg-units-7"> <div class="column units-2 lg-units-7">
<!-- Bars --> <!-- Bars -->
<article class="component active" id="bars"> <article class="component active" id="bars">
@ -1049,21 +1062,7 @@ document
window.addEventListener('push', myFunction); window.addEventListener('push', myFunction);
{% endhighlight %} {% endhighlight %}
</article> </article>
</div>
<div class="phone-column column units-2 lg-units-5">
<!-- In iPhone examples -->
<div class="iphone">
<div class="iphone-content">
<div id="iwindow">
<header class="bar-nav">
<h1 class="title">Title</h1>
</header>
</div>
</div>
</div>
</div>
</div>
</div> </div>
</div>
</div>

20
docs-assets/css/docs.css

@ -146,7 +146,15 @@ h1, h2, h3, h4, h5, h6 {
} }
.platform-toggle { .platform-toggle {
z-index: 3;
border-bottom: 1px solid #ddd; border-bottom: 1px solid #ddd;
background-color: #fff;
}
.platform-toggle.fixed {
position: fixed;
top: 0;
left: 0;
right: 0;
} }
.platform-toggle .segmented-controller { .platform-toggle .segmented-controller {
max-width: 300px; max-width: 300px;
@ -268,15 +276,10 @@ hr {
} }
@media screen and (min-width: 768px) { @media screen and (min-width: 768px) {
.phone-column {
position: relative;
}
.iphone { .iphone {
display: block; position: relative;
position: absolute;
top: 50px; top: 50px;
float: right; display: block;
width: 395px; width: 395px;
height: 813px; height: 813px;
margin-left: -13px; margin-left: -13px;
@ -384,6 +387,9 @@ hr {
padding-right: 15px; padding-right: 15px;
float: left; float: left;
} }
.column.pull-right {
float: right;
}
.column .column-group { .column .column-group {
margin-left: -15px; margin-left: -15px;

10
docs-assets/js/docs.js

@ -35,7 +35,7 @@ $(function() {
iphone.initialLeft = iphone.offset().left; iphone.initialLeft = iphone.offset().left;
iphone.initialTop = iphone.initialTop || iphone.offset().top; 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(); checkDesktopContent();
calculateScroll(); calculateScroll();
@ -88,7 +88,7 @@ $(function() {
if(pageHeight - currentTop < footerHeight + contentPadding + 1400) { if(pageHeight - currentTop < footerHeight + contentPadding + 1400) {
iphone[0].className = "iphone iphone-bottom"; iphone[0].className = "iphone iphone-bottom";
iphone[0].setAttribute('style','') 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[0].className = "iphone iphone-fixed";
iphone.css({top: iphone.dockingOffset}) iphone.css({top: iphone.dockingOffset})
} else { } else {
@ -98,10 +98,10 @@ $(function() {
if(currentTop >= $('.docs-masthead').outerHeight()) { if(currentTop >= $('.docs-masthead').outerHeight()) {
$('.platform-toggle').addClass('fixed'); $('.platform-toggle').addClass('fixed');
console.log('fixed'); $('.docs-components').css('padding-top', $('.platform-toggle').outerHeight());
} else { } else {
$('.platform-toggle').removeClass('fixed'); $('.platform-toggle').removeClass('fixed');
console.log('not fixed'); $('.docs-components').css('padding-top', 0);
} }
// Injection of components into phone // Injection of components into phone
@ -131,4 +131,4 @@ $(function() {
$(window).on('load resize', initialize); $(window).on('load resize', initialize);
$(window).on('load', function () { new FingerBlast('.iphone-content'); }); $(window).on('load', function () { new FingerBlast('.iphone-content'); });
}); });

14
lib/sass/docs.scss

@ -156,7 +156,9 @@ h1, h2, h3, h4, h5, h6 {
// -------------------------------------------------- // --------------------------------------------------
.platform-toggle { .platform-toggle {
z-index: 3;
border-bottom: 1px solid #ddd; border-bottom: 1px solid #ddd;
background-color: #fff;
&.fixed { &.fixed {
position: fixed; position: fixed;
@ -287,14 +289,10 @@ hr {
// Tablet to desktop // Tablet to desktop
// -------------------------------------------------- // --------------------------------------------------
@media screen and (min-width: 768px) { @media screen and (min-width: 768px) {
.phone-column {
position: relative;
}
.iphone { .iphone {
display: block; position: relative;
position: absolute;
top: 50px; top: 50px;
float: right; display: block;
width: 395px; width: 395px;
height: 813px; height: 813px;
margin-left: -13px; margin-left: -13px;
@ -396,6 +394,10 @@ hr {
padding-left: 15px; padding-left: 15px;
padding-right: 15px; padding-right: 15px;
float: left; float: left;
&.pull-right {
float: right;
}
} }
// Lines nested grids up correctly. // Lines nested grids up correctly.
.column .column-group { .column .column-group {

Loading…
Cancel
Save