Website tweaks

This commit is contained in:
Christopher Chedeau 2015-03-21 10:59:41 -07:00
parent edb9322fe4
commit 4f8a86e8d7
6 changed files with 15 additions and 13 deletions

View File

@ -4,7 +4,7 @@ title: Getting Started
layout: docs
category: Quick Start
permalink: docs/getting-started.html
next: network
next: pixels
---
Our first React Native implementation is `ReactKit`, targeting iOS. We are also

View File

@ -2,9 +2,9 @@
id: network
title: Network
layout: docs
category: Guides
category: Polyfills
permalink: docs/network.html
next: pixels
next: timers
---
One of React Native goal is to be a playground where we can experiment with different architectures and crazy ideas. Since browsers are not flexible enough, we had no choice but to reimplement the entire stack. In the places that we did not intend to change, we tried to be as faithful as possible to the browser APIs. The networking stack is a great example.

View File

@ -4,7 +4,7 @@ title: Style
layout: docs
category: Guides
permalink: docs/style.html
next: timers
next: activityindicatorios
---
## Declaring Styles

View File

@ -2,9 +2,8 @@
id: timers
title: Timers
layout: docs
category: Guides
category: Polyfills
permalink: docs/timers.html
next: activityindicatorios
---
Timers are an important part of an application and React Native implements the [browser timers](https://developer.mozilla.org/en-US/Add-ons/Code_snippets/Timers).
@ -59,7 +58,7 @@ InteractionManager.clearInteractionHandle(handle);
We found out that the primary cause of fatals in apps created with React Native was due to timers firing after a component was unmounted. To solve this recurring issue, we introduced `TimerMixin`. If you include `TimerMixin`, then you can replace your calls to `setTimeout(fn, 500)` with `this.setTimeout(fn, 500)` (just prepend `this.`) and everything will be properly cleaned up for you when the component unmounts.
```javascript
var { TimerMixin } = React;
var TimerMixin = require('react-timer-mixin');
var Component = React.createClass({
mixins: [TimerMixin],

View File

@ -28,7 +28,9 @@ function componentsToMarkdown(type, json, filepath, i) {
'layout: autodocs',
'category: ' + type + 's',
'permalink: docs/' + slugify(componentName) + '.html',
all[i + 1] && ('next: ' + slugify(getNameFromPath(all[i + 1]))),
'next: ' + (all[i + 1] ?
slugify(getNameFromPath(all[i + 1])) :
'network'),
'---',
JSON.stringify(json, null, 2),
].filter(function(line) { return line; }).join('\n');

View File

@ -345,15 +345,16 @@ h1:hover .hash-link, h2:hover .hash-link, h3:hover .hash-link, h4:hover .hash-li
}
.nav-docs {
color: #2d2d2d;
font-size: 14px;
float: left;
width: 210px;
margin-top: 5px;
}
.nav-docs ul {
list-style: none;
margin: 0;
margin-left: 10px;
}
.nav-docs ul ul {
@ -383,10 +384,10 @@ h1:hover .hash-link, h2:hover .hash-link, h3:hover .hash-link, h4:hover .hash-li
color: #0485A9;
}
.nav-docs .nav-docs-section {
border-bottom: 1px solid #ccc;
border-top: 1px solid #eee;
padding: 12px 0;
.nav-docs h3 {
margin: 0;
line-height: 25px;
margin-top: 5px;
}
.nav-docs .nav-docs-section:first-child {