diff --git a/docs/GettingStarted.md b/docs/GettingStarted.md index b7ec6d708d..5549e1fa99 100644 --- a/docs/GettingStarted.md +++ b/docs/GettingStarted.md @@ -1,5 +1,5 @@ --- -id: quick-start-getting-started +id: getting-started title: Getting Started layout: docs category: The Basics @@ -638,12 +638,133 @@ to the [Tutorial](docs/tutorial.html). If you're curious to learn more about React Native, continue on to the [Tutorial](docs/tutorial.html). - diff --git a/docs/IntegrationWithExistingApps.md b/docs/IntegrationWithExistingApps.md index fc99c2fc34..c3cef9c48c 100644 --- a/docs/IntegrationWithExistingApps.md +++ b/docs/IntegrationWithExistingApps.md @@ -812,10 +812,132 @@ Now just create a release build of your native app from within Android Studio as At this point you can continue developing your app as usual. Refer to our [debugging](docs/debugging.html) and [deployment](docs/running-on-device.html) docs to learn more about working with React Native. diff --git a/docs/RunningOnDevice.md b/docs/RunningOnDevice.md index 07e98dd193..e4ef2dff9e 100644 --- a/docs/RunningOnDevice.md +++ b/docs/RunningOnDevice.md @@ -360,9 +360,131 @@ You can now build your app for release by tapping `⌘B` or selecting **Product* You have built a great app using React Native, and you are now itching to release it in the Play Store. The process is the same as any other native Android app, with some additional considerations to take into account. Follow the guide for [generating a signed APK](docs/signed-apk-android.html) to learn more. diff --git a/website/src/react-native/js/scripts.js b/website/src/react-native/js/scripts.js index 7b8a272886..7200b866c7 100644 --- a/website/src/react-native/js/scripts.js +++ b/website/src/react-native/js/scripts.js @@ -75,10 +75,6 @@ } } - // handle tabs in docs - convertBlocks(); - guessPlatformAndOS(); - var backdrop = document.querySelector( '.modal-backdrop' ); @@ -160,138 +156,4 @@ navigator.userAgent ); } - - function convertBlocks() { - // Convert
......
- // Into
......
- var blocks = document.querySelectorAll('block'); - for (var i = 0; i < blocks.length; ++i) { - var block = blocks[i]; - var span = blocks[i].parentNode; - var container = span.parentNode; - container.insertBefore(block, span); - container.removeChild(span); - } - // Convert
...content...
- // Into
...content...
- blocks = document.querySelectorAll('block'); - for (var i = 0; i < blocks.length; ++i) { - var block = blocks[i]; - while ( - block.nextSibling && - block.nextSibling.tagName !== 'BLOCK' - ) { - block.appendChild(block.nextSibling); - } - } - } - - function displayTab(type, value) { - var container = document.querySelectorAll('block')[ - 0 - ].parentNode; - container.className = 'display-' + - type + - '-' + - value + - ' ' + - container.className.replace( - RegExp('display-' + type + '-[a-z]+ ?'), - '' - ); - } - - function guessPlatformAndOS() { - if (!document.querySelector('block')) { - return; - } - - // If we are coming to the page with a hash in it (i.e. from a search, for example), try to get - // us as close as possible to the correct platform and dev os using the hashtag and block walk up. - var foundHash = false; - if ( - window.location.hash !== '' && - window.location.hash !== 'content' - ) { - // content is default - var hashLinks = document.querySelectorAll( - 'a.hash-link' - ); - for ( - var i = 0; - i < hashLinks.length && !foundHash; - ++i - ) { - if (hashLinks[i].hash === window.location.hash) { - var parent = hashLinks[i].parentElement; - while (parent) { - if (parent.tagName === 'BLOCK') { - // Could be more than one target os and dev platform, but just choose some sort of order - // of priority here. - - // Dev OS - if (parent.className.indexOf('mac') > -1) { - displayTab('os', 'mac'); - foundHash = true; - } else if ( - parent.className.indexOf('linux') > -1 - ) { - displayTab('os', 'linux'); - foundHash = true; - } else if ( - parent.className.indexOf('windows') > -1 - ) { - displayTab('os', 'windows'); - foundHash = true; - } else { - break; - } - - // Target Platform - if (parent.className.indexOf('ios') > -1) { - displayTab('platform', 'ios'); - foundHash = true; - } else if ( - parent.className.indexOf('android') > -1 - ) { - displayTab('platform', 'android'); - foundHash = true; - } else { - break; - } - - // Guide - if (parent.className.indexOf('native') > -1) { - displayTab('guide', 'native'); - foundHash = true; - } else if ( - parent.className.indexOf('quickstart') > -1 - ) { - displayTab('guide', 'quickstart'); - foundHash = true; - } else { - break; - } - - break; - } - parent = parent.parentElement; - } - } - } - } - - // Do the default if there is no matching hash - if (!foundHash) { - var isMac = navigator.platform === 'MacIntel'; - var isWindows = navigator.platform === 'Win32'; - displayTab('platform', isMac ? 'ios' : 'android'); - displayTab( - 'os', - isMac ? 'mac' : isWindows ? 'windows' : 'linux' - ); - displayTab('guide', 'quickstart'); - displayTab('language', 'objc'); - } - } })();