Skip to content

Commit b5e6a24

Browse files
committed
Updated docs for 0.27
1 parent 63a3ba8 commit b5e6a24

File tree

8 files changed

+127
-53
lines changed

8 files changed

+127
-53
lines changed

css/react-native.css

Lines changed: 50 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -481,42 +481,53 @@ h1:hover .hash-link, h2:hover .hash-link, h3:hover .hash-link, h4:hover .hash-li
481481
border-bottom: 0;
482482
}
483483

484-
@media screen and (max-device-width: 960px) {
484+
@media only screen and (max-device-width: 1024px) {
485+
@-webkit-keyframes slide-in {
486+
0% { top: -30px; opacity: 0; }
487+
100% { top: 0; opacity: 1; }
488+
}
489+
@-moz-keyframes slide-in {
490+
0% { top: -30px; opacity: 0; }
491+
100% { top: 0; opacity: 1; }
492+
}
493+
@-o-keyframes slide-in {
494+
0% { top: -30px; opacity: 0; }
495+
100% { top: 0; opacity: 1; }
496+
}
497+
@keyframes slide-in {
498+
0% { top: -30px; opacity: 0; }
499+
100% { top: 0; opacity: 1; }
500+
}
501+
485502
.nav-docs {
486503
position: fixed;
487504
z-index: 90;
488-
top: 0;
505+
top: -100%;
489506
left: 0;
490507
width: 100%;
491508
height: 100%;
492509
margin: 0;
493510
padding: 53px 0 0 0;
494511
background: #3B3738;
495-
/* Transition these properties */
496-
transition: opacity 0.3s, visibility 0.3s;
497-
visibility: hidden;
498-
opacity: 0;
499512
}
500513

501514
.nav-docs-viewport {
502515
border-top: 1px solid rgb(5, 165, 209);
503-
height: 100%;
504516
padding: 25px;
505517
overflow: scroll;
506518
-webkit-overflow-scrolling: touch;
507-
top: -30px;
508519
position: relative;
509-
transition: top 0.3s;
520+
width: 100%;
521+
height: 100%;
510522
}
511523

512524
/* Active state */
513525
.nav-docs.in {
514-
visibility: visible;
515-
opacity: 1;
516-
}
517-
518-
.nav-docs.in .nav-docs-viewport {
519526
top: 0;
527+
-webkit-animation: slide-in 0.3s forwards;
528+
-moz-animation: slide-in 0.3s forwards;
529+
-o-animation: slide-in 0.3s forwards;
530+
animation: slide-in 0.3s forwards;
520531
}
521532

522533
.nav-docs * {
@@ -555,18 +566,38 @@ h1:hover .hash-link, h2:hover .hash-link, h3:hover .hash-link, h4:hover .hash-li
555566
}
556567
}
557568

558-
@media screen and (min-device-width: 641px) and (max-device-width: 1024px) {
569+
/**
570+
* Multicolumn layout for phone (landscape only) & tablet (regardless its screen orientation)/
571+
*/
572+
@media only screen and (min-device-width : 375px) and (max-device-width : 1024px) {
559573
.nav-docs-section ul {
560574
display: flex;
561575
flex-wrap: wrap;
562576
}
563577

564-
/* Display 2 columns on tablet */
578+
.nav-docs-section li {
579+
width: 100%;
580+
}
581+
}
582+
583+
/* 2 columns layout */
584+
@media
585+
/*Phone, landscape screen orientation*/
586+
only screen and (min-device-width : 375px) and (max-device-width : 1024px) and (orientation : landscape),
587+
/*Tablet, portrait screen orientation*/
588+
only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : portrait) {
565589
.nav-docs-section li {
566590
width: 50%;
567591
}
568592
}
569593

594+
/* 3 columns layout on tablet (landscape screen orientation) */
595+
@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : landscape) {
596+
.nav-docs-section li {
597+
width: 33%;
598+
}
599+
}
600+
570601
.nav-blog li {
571602
margin-bottom: 5px;
572603
}
@@ -1351,13 +1382,10 @@ div[data-twttr-id] iframe {
13511382
}
13521383

13531384
.survey-image {
1354-
position: absolute;
1355-
top: 10px;
1356-
height: 83px;
1357-
width: 120px;
1385+
float: left;
1386+
height: 128px;
1387+
width: 128px;
13581388
background-image: url('../img/survey.png');
1359-
background-size: 272px 198px;
1360-
background-position: -8px -8px;
13611389
}
13621390

13631391
.survey p {

img/survey.png

-108 KB
Loading

js/scripts.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
function init() {
1010
if (isMobile()) {
11-
document.querySelector('.nav-site-wrapper a[data-target]').addEventListener('click', toggleTargetNav);
11+
document.querySelector('.nav-site-wrapper a[data-target]').addEventListener('click', toggleTarget);
1212
}
1313

1414
var backdrop = document.querySelector('.modal-backdrop');
@@ -46,12 +46,21 @@
4646
modal.classList.remove('modal-open');
4747
}
4848

49-
function toggleTargetNav(event) {
49+
var toggledTarget;
50+
function toggleTarget(event) {
5051
var target = document.body.querySelector(event.target.getAttribute('data-target'));
5152

5253
if (target) {
5354
event.preventDefault();
54-
target.classList.toggle('in');
55+
56+
if (toggledTarget === target) {
57+
toggledTarget.classList.toggle('in');
58+
} else {
59+
toggledTarget && toggledTarget.classList.remove('in');
60+
target.classList.add('in');
61+
}
62+
63+
toggledTarget = target;
5564
}
5665
}
5766

releases/0.27/css/react-native.css

Lines changed: 50 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -481,42 +481,53 @@ h1:hover .hash-link, h2:hover .hash-link, h3:hover .hash-link, h4:hover .hash-li
481481
border-bottom: 0;
482482
}
483483

484-
@media screen and (max-device-width: 960px) {
484+
@media only screen and (max-device-width: 1024px) {
485+
@-webkit-keyframes slide-in {
486+
0% { top: -30px; opacity: 0; }
487+
100% { top: 0; opacity: 1; }
488+
}
489+
@-moz-keyframes slide-in {
490+
0% { top: -30px; opacity: 0; }
491+
100% { top: 0; opacity: 1; }
492+
}
493+
@-o-keyframes slide-in {
494+
0% { top: -30px; opacity: 0; }
495+
100% { top: 0; opacity: 1; }
496+
}
497+
@keyframes slide-in {
498+
0% { top: -30px; opacity: 0; }
499+
100% { top: 0; opacity: 1; }
500+
}
501+
485502
.nav-docs {
486503
position: fixed;
487504
z-index: 90;
488-
top: 0;
505+
top: -100%;
489506
left: 0;
490507
width: 100%;
491508
height: 100%;
492509
margin: 0;
493510
padding: 53px 0 0 0;
494511
background: #3B3738;
495-
/* Transition these properties */
496-
transition: opacity 0.3s, visibility 0.3s;
497-
visibility: hidden;
498-
opacity: 0;
499512
}
500513

501514
.nav-docs-viewport {
502515
border-top: 1px solid rgb(5, 165, 209);
503-
height: 100%;
504516
padding: 25px;
505517
overflow: scroll;
506518
-webkit-overflow-scrolling: touch;
507-
top: -30px;
508519
position: relative;
509-
transition: top 0.3s;
520+
width: 100%;
521+
height: 100%;
510522
}
511523

512524
/* Active state */
513525
.nav-docs.in {
514-
visibility: visible;
515-
opacity: 1;
516-
}
517-
518-
.nav-docs.in .nav-docs-viewport {
519526
top: 0;
527+
-webkit-animation: slide-in 0.3s forwards;
528+
-moz-animation: slide-in 0.3s forwards;
529+
-o-animation: slide-in 0.3s forwards;
530+
animation: slide-in 0.3s forwards;
520531
}
521532

522533
.nav-docs * {
@@ -555,18 +566,38 @@ h1:hover .hash-link, h2:hover .hash-link, h3:hover .hash-link, h4:hover .hash-li
555566
}
556567
}
557568

558-
@media screen and (min-device-width: 641px) and (max-device-width: 1024px) {
569+
/**
570+
* Multicolumn layout for phone (landscape only) & tablet (regardless its screen orientation)/
571+
*/
572+
@media only screen and (min-device-width : 375px) and (max-device-width : 1024px) {
559573
.nav-docs-section ul {
560574
display: flex;
561575
flex-wrap: wrap;
562576
}
563577

564-
/* Display 2 columns on tablet */
578+
.nav-docs-section li {
579+
width: 100%;
580+
}
581+
}
582+
583+
/* 2 columns layout */
584+
@media
585+
/*Phone, landscape screen orientation*/
586+
only screen and (min-device-width : 375px) and (max-device-width : 1024px) and (orientation : landscape),
587+
/*Tablet, portrait screen orientation*/
588+
only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : portrait) {
565589
.nav-docs-section li {
566590
width: 50%;
567591
}
568592
}
569593

594+
/* 3 columns layout on tablet (landscape screen orientation) */
595+
@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : landscape) {
596+
.nav-docs-section li {
597+
width: 33%;
598+
}
599+
}
600+
570601
.nav-blog li {
571602
margin-bottom: 5px;
572603
}
@@ -1351,13 +1382,10 @@ div[data-twttr-id] iframe {
13511382
}
13521383

13531384
.survey-image {
1354-
position: absolute;
1355-
top: 10px;
1356-
height: 83px;
1357-
width: 120px;
1385+
float: left;
1386+
height: 128px;
1387+
width: 128px;
13581388
background-image: url('../img/survey.png');
1359-
background-size: 272px 198px;
1360-
background-position: -8px -8px;
13611389
}
13621390

13631391
.survey p {

releases/0.27/img/survey.png

-108 KB
Loading

releases/0.27/js/scripts.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
function init() {
1010
if (isMobile()) {
11-
document.querySelector('.nav-site-wrapper a[data-target]').addEventListener('click', toggleTargetNav);
11+
document.querySelector('.nav-site-wrapper a[data-target]').addEventListener('click', toggleTarget);
1212
}
1313

1414
var backdrop = document.querySelector('.modal-backdrop');
@@ -46,12 +46,21 @@
4646
modal.classList.remove('modal-open');
4747
}
4848

49-
function toggleTargetNav(event) {
49+
var toggledTarget;
50+
function toggleTarget(event) {
5051
var target = document.body.querySelector(event.target.getAttribute('data-target'));
5152

5253
if (target) {
5354
event.preventDefault();
54-
target.classList.toggle('in');
55+
56+
if (toggledTarget === target) {
57+
toggledTarget.classList.toggle('in');
58+
} else {
59+
toggledTarget && toggledTarget.classList.remove('in');
60+
target.classList.add('in');
61+
}
62+
63+
toggledTarget = target;
5564
}
5665
}
5766

releases/0.27/versions.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><title>Documentation archive – React Native | A framework for building native apps using React</title><meta name="viewport" content="width=device-width"><meta property="og:title" content="Documentation archive – React Native | A framework for building native apps using React"><meta property="og:type" content="website"><meta property="og:url" content="http://facebook.github.io/react-native/index.html"><meta property="og:image" content="http://facebook.github.io/react-native/img/opengraph.png?2"><meta property="og:description" content="A framework for building native apps using React"><base href="/react-native/releases/0.27/"><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"><link rel="shortcut icon" href="img/favicon.png?2"><link rel="stylesheet" href="css/react-native.css"><script type="text/javascript" src="//use.typekit.net/vqa1hcx.js"></script><script type="text/javascript">try{Typekit.load();}catch(e){}</script></head><body><div class="container"><div class="nav-main"><div class="wrap"><a class="nav-home" href=""><img src="img/header_logo.png">React Native</a><a class="nav-version" href="/react-native/versions.html">0.27</a><div class="nav-site-wrapper"><ul class="nav-site nav-site-internal"><li><a href="docs/getting-started.html" class="" data-target=".nav-docs">Docs</a></li><li><a href="support.html" class="">Support</a></li><li><a href="showcase.html" class="">Showcase</a></li><li><a href="blog/" class="">Blog</a></li></ul><div class="algolia-search-wrapper"><input id="algolia-doc-search" type="text" placeholder="Search docs..."></div><ul class="nav-site nav-site-external"><li><a href="https://github.com/facebook/react-native" class="">GitHub</a></li><li><a href="http://facebook.github.io/react" class="">React</a></li></ul></div></div></div><section class="content wrap documentationContent nosidebar"><div class="inner-content"><h1>React Native Versions</h1><p>React Native is following a 2-week train release. Every two weeks, a Release Candidate (rc) branch is created off of master and the previous rc branch is being officially released.</p><table class="versions"><tbody><tr><th>master</th><td><a href="/react-native/releases/next">Docs</a></td><td></td></tr><tr><th>(current) 0.27</th><td><a href="/react-native">Docs</a></td><td><a href="https://github.com/facebook/react-native/releases/tag/v0.27.0">Release Notes</a></td></tr><tr><th>0.26</th><td><a href="/react-native/releases/0.26">Docs</a></td><td><a href="https://github.com/facebook/react-native/releases/tag/v0.26.0">Release Notes</a></td></tr><tr><th>0.25</th><td><a href="/react-native/releases/0.25">Docs</a></td><td><a href="https://github.com/facebook/react-native/releases/tag/v0.25.0">Release Notes</a></td></tr><tr><th>0.24</th><td><a href="/react-native/releases/0.24">Docs</a></td><td><a href="https://github.com/facebook/react-native/releases/tag/v0.24.0">Release Notes</a></td></tr><tr><th>0.23</th><td><a href="/react-native/releases/0.23">Docs</a></td><td><a href="https://github.com/facebook/react-native/releases/tag/v0.23.0">Release Notes</a></td></tr><tr><th>0.22</th><td><a href="/react-native/releases/0.22">Docs</a></td><td><a href="https://github.com/facebook/react-native/releases/tag/v0.22.0">Release Notes</a></td></tr><tr><th>0.21</th><td><a href="/react-native/releases/0.21">Docs</a></td><td><a href="https://github.com/facebook/react-native/releases/tag/v0.21.0">Release Notes</a></td></tr><tr><th>0.20</th><td><a href="/react-native/releases/0.20">Docs</a></td><td><a href="https://github.com/facebook/react-native/releases/tag/v0.20.0">Release Notes</a></td></tr><tr><th>0.19</th><td><a href="/react-native/releases/0.19">Docs</a></td><td><a href="https://github.com/facebook/react-native/releases/tag/v0.19.0">Release Notes</a></td></tr><tr><th>0.18</th><td><a href="/react-native/releases/0.18">Docs</a></td><td><a href="https://github.com/facebook/react-native/releases/tag/v0.18.0">Release Notes</a></td></tr></tbody></table></div></section><footer class="wrap"><div class="center">© 2016 Facebook Inc.</div></footer></div><div id="fb-root"></div><script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script><script>
1+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><title>Documentation archive – React Native | A framework for building native apps using React</title><meta name="viewport" content="width=device-width"><meta property="og:title" content="Documentation archive – React Native | A framework for building native apps using React"><meta property="og:type" content="website"><meta property="og:url" content="http://facebook.github.io/react-native/index.html"><meta property="og:image" content="http://facebook.github.io/react-native/img/opengraph.png?2"><meta property="og:description" content="A framework for building native apps using React"><base href="/react-native/releases/0.27/"><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"><link rel="shortcut icon" href="img/favicon.png?2"><link rel="stylesheet" href="css/react-native.css"><script type="text/javascript" src="//use.typekit.net/vqa1hcx.js"></script><script type="text/javascript">try{Typekit.load();}catch(e){}</script></head><body><div class="container"><div class="nav-main"><div class="wrap"><a class="nav-home" href=""><img src="img/header_logo.png">React Native</a><a class="nav-version" href="/react-native/versions.html">0.27</a><div class="nav-site-wrapper"><ul class="nav-site nav-site-internal"><li><a href="docs/getting-started.html" class="" data-target=".nav-docs">Docs</a></li><li><a href="support.html" class="">Support</a></li><li><a href="showcase.html" class="">Showcase</a></li><li><a href="blog/" class="">Blog</a></li></ul><div class="algolia-search-wrapper"><input id="algolia-doc-search" type="text" placeholder="Search docs..."></div><ul class="nav-site nav-site-external"><li><a href="https://github.com/facebook/react-native" class="">GitHub</a></li><li><a href="http://facebook.github.io/react" class="">React</a></li></ul></div></div></div><section class="content wrap documentationContent nosidebar"><div class="inner-content"><h1>React Native Versions</h1><p>React Native is following a 2-week train release. Every two weeks, a Release Candidate (rc) branch is created off of master and the previous rc branch is being officially released.</p><table class="versions"><tbody><tr><th>master</th><td><a href="/react-native/releases/next">Docs</a></td><td></td></tr><tr><th>0.28-rc</th><td><a href="/react-native/releases/0.28">Docs</a></td><td><a href="https://github.com/facebook/react-native/releases/tag/v0.28.0-rc">Release Notes</a></td></tr><tr><th>(current) 0.27</th><td><a href="/react-native">Docs</a></td><td><a href="https://github.com/facebook/react-native/releases/tag/v0.27.0">Release Notes</a></td></tr><tr><th>0.26</th><td><a href="/react-native/releases/0.26">Docs</a></td><td><a href="https://github.com/facebook/react-native/releases/tag/v0.26.0">Release Notes</a></td></tr><tr><th>0.25</th><td><a href="/react-native/releases/0.25">Docs</a></td><td><a href="https://github.com/facebook/react-native/releases/tag/v0.25.0">Release Notes</a></td></tr><tr><th>0.24</th><td><a href="/react-native/releases/0.24">Docs</a></td><td><a href="https://github.com/facebook/react-native/releases/tag/v0.24.0">Release Notes</a></td></tr><tr><th>0.23</th><td><a href="/react-native/releases/0.23">Docs</a></td><td><a href="https://github.com/facebook/react-native/releases/tag/v0.23.0">Release Notes</a></td></tr><tr><th>0.22</th><td><a href="/react-native/releases/0.22">Docs</a></td><td><a href="https://github.com/facebook/react-native/releases/tag/v0.22.0">Release Notes</a></td></tr><tr><th>0.21</th><td><a href="/react-native/releases/0.21">Docs</a></td><td><a href="https://github.com/facebook/react-native/releases/tag/v0.21.0">Release Notes</a></td></tr><tr><th>0.20</th><td><a href="/react-native/releases/0.20">Docs</a></td><td><a href="https://github.com/facebook/react-native/releases/tag/v0.20.0">Release Notes</a></td></tr><tr><th>0.19</th><td><a href="/react-native/releases/0.19">Docs</a></td><td><a href="https://github.com/facebook/react-native/releases/tag/v0.19.0">Release Notes</a></td></tr><tr><th>0.18</th><td><a href="/react-native/releases/0.18">Docs</a></td><td><a href="https://github.com/facebook/react-native/releases/tag/v0.18.0">Release Notes</a></td></tr></tbody></table></div></section><footer class="wrap"><div class="center">© 2016 Facebook Inc.</div></footer></div><div id="fb-root"></div><script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script><script>
22
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
33
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
44
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)

0 commit comments

Comments
 (0)