feat: Add Be and tbd skill, also added Roadmap file

This commit is contained in:
2026-05-10 16:32:12 -04:00
parent 3500ade13f
commit 0bb8885802
29587 changed files with 10611695 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
# localForage Docs #
localForage is a handy JavaScript library that improves the offline experience
of your web app by using asynchronous storage (via IndexedDB or WebSQL where
available) but with a simple, `localStorage`-like API.
These are the API docs for
[localForage](http://localForage.github.io/localForage). You can browse the
code in the [master branch](https://github.com/localForage/localForage).

498
Skills/@be/be/node_modules/localforage/docs/api.md generated vendored Normal file
View File

@@ -0,0 +1,498 @@
# localForage
**Offline storage, improved.**
```js
// Set a value with localStorage:
localStorage.setItem('key', JSON.stringify('value'));
doSomethingElse();
// The same code with localForage:
localforage.setItem('key', 'value').then(doSomethingElse);
// localForage also support callbacks:
localforage.setItem('key', 'value', doSomethingElse);
```
localForage is a JavaScript library that improves the offline experience of your web app by using an asynchronous data store with a simple, `localStorage`-like API. It allows developers to [store many types of data](#data-api-setitem) instead of just strings.
localForage includes a localStorage-backed fallback store for browsers with no IndexedDB or WebSQL support. Asynchronous storage is available in the current versions of all major browsers: Chrome, Firefox, IE, and Safari (including Safari Mobile).
**localForage offers a callback API as well as support for the [ES6 Promises API][]**, so you can use whichever you prefer.
[Download localforage.min.js][download]
[download]: https://raw.githubusercontent.com/mozilla/localForage/master/dist/localforage.min.js
[ES6 Promises API]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise
# Installation
```bash
# Install via npm:
npm install localforage
# Or with bower:
bower install localforage
```
```html
<script src="localforage.js"></script>
<script>console.log('localforage is: ', localforage);</script>
```
To use localForage, [download the latest release](https://github.com/mozilla/localForage/releases) or install with [npm](https://www.npmjs.org/) (`npm install localforage`) or [bower](http://bower.io/) (`bower install localforage`).
Then simply include the JS file and start using localForage: `<script src="localforage.js"></script>`. You don't need to run any init method or wait for any `onready` events.
# Data API
These APIs deal with getting and setting data in the offline store.
## getItem
```js
localforage.getItem('somekey').then(function(value) {
// This code runs once the value has been loaded
// from the offline store.
console.log(value);
}).catch(function(err) {
// This code runs if there were any errors
console.log(err);
});
// Callback version:
localforage.getItem('somekey', function(err, value) {
// Run this code once the value has been
// loaded from the offline store.
console.log(value);
});
```
`getItem(key, successCallback)`
Gets an item from the storage library and supplies the result to a callback. If the key does not exist, `getItem()` will return `null`.
<aside class="notice">
Even if `undefined` is saved, `null` will be returned by `getItem()`. This is due to a [limitation in localStorage](https://github.com/mozilla/localForage/pull/42), and for compatibility reasons localForage cannot store the value `undefined`.
</aside>
## setItem
```js
localforage.setItem('somekey', 'some value').then(function (value) {
// Do other things once the value has been saved.
console.log(value);
}).catch(function(err) {
// This code runs if there were any errors
console.log(err);
});
// Unlike localStorage, you can store non-strings.
localforage.setItem('my array', [1, 2, 'three']).then(function(value) {
// This will output `1`.
console.log(value[0]);
}).catch(function(err) {
// This code runs if there were any errors
console.log(err);
});
// You can even store binary data from an AJAX request.
req = new XMLHttpRequest();
req.open('GET', '/photo.jpg', true);
req.responseType = 'arraybuffer';
req.addEventListener('readystatechange', function() {
if (req.readyState === 4) { // readyState DONE
localforage.setItem('photo', req.response).then(function(image) {
// This will be a valid blob URI for an <img> tag.
var blob = new Blob([image]);
var imageURI = window.URL.createObjectURL(blob);
}).catch(function(err) {
// This code runs if there were any errors
console.log(err);
});
}
});
```
`setItem(key, value, successCallback)`
Saves data to an offline store. You can store the following types of JavaScript objects:
* **`Array`**
* **`ArrayBuffer`**
* **`Blob`**
* **`Float32Array`**
* **`Float64Array`**
* **`Int8Array`**
* **`Int16Array`**
* **`Int32Array`**
* **`Number`**
* **`Object`**
* **`Uint8Array`**
* **`Uint8ClampedArray`**
* **`Uint16Array`**
* **`Uint32Array`**
* **`String`**
<aside class="notice">
When using localStorage and WebSQL backends, binary data will be serialized before being saved (and retrieved). This serialization will incur a size increase when binary data is saved.
</aside>
<a href="http://jsfiddle.net/ryfo1jk4/161/">Live demo</a>
## removeItem
```js
localforage.removeItem('somekey').then(function() {
// Run this code once the key has been removed.
console.log('Key is cleared!');
}).catch(function(err) {
// This code runs if there were any errors
console.log(err);
});
```
`removeItem(key, successCallback)`
Removes the value of a key from the offline store.
<a href="http://jsfiddle.net/y1Ly0hk1/37/">Live demo</a>
## clear
```js
localforage.clear().then(function() {
// Run this code once the database has been entirely deleted.
console.log('Database is now empty.');
}).catch(function(err) {
// This code runs if there were any errors
console.log(err);
});
```
`clear(successCallback)`
Removes every key from the database, returning it to a blank slate.
<aside class="warning">
`localforage.clear()` will remove **every item in the offline store**. Use this method with caution.
</aside>
## length
```js
localforage.length().then(function(numberOfKeys) {
// Outputs the length of the database.
console.log(numberOfKeys);
}).catch(function(err) {
// This code runs if there were any errors
console.log(err);
});
```
`length(successCallback)`
Gets the number of keys in the offline store (i.e. its "length").
## key
```js
localforage.key(2).then(function(keyName) {
// Name of the key.
console.log(keyName);
}).catch(function(err) {
// This code runs if there were any errors
console.log(err);
});
```
`key(keyIndex, successCallback)`
Get the name of a key based on its ID.
<aside class="notice">
This method is inherited from the localStorage API, but is acknowledged to be kinda weird.
</aside>
## keys
```js
localforage.keys().then(function(keys) {
// An array of all the key names.
console.log(keys);
}).catch(function(err) {
// This code runs if there were any errors
console.log(err);
});
```
`keys(successCallback)`
Get the list of all keys in the datastore.
## iterate
```js
// The same code, but using ES6 Promises.
localforage.iterate(function(value, key, iterationNumber) {
// Resulting key/value pair -- this callback
// will be executed for every item in the
// database.
console.log([key, value]);
}).then(function() {
console.log('Iteration has completed');
}).catch(function(err) {
// This code runs if there were any errors
console.log(err);
});
// Exit the iteration early:
localforage.iterate(function(value, key, iterationNumber) {
if (iterationNumber < 3) {
console.log([key, value]);
} else {
return [key, value];
}
}).then(function(result) {
console.log('Iteration has completed, last iterated pair:');
console.log(result);
}).catch(function(err) {
// This code runs if there were any errors
console.log(err);
});
```
`iterate(iteratorCallback, successCallback)`
Iterate over all value/key pairs in datastore.
`iteratorCallback` is called once for each pair, with the following arguments:
1. value
2. key
3. iterationNumber - one-based number
<aside class="notice">
<code>iterate</code> supports early exit by returning non `undefined` value inside `iteratorCallback` callback. Resulting value will be passed to `successCallback` as the result of iteration.
This means if you're using CoffeeScript, you'll need to manually `return` nothing to keep iterating through each key/value pair.
</aside>
# Settings API
These methods allow driver selection and database configuration. These methods should generally be called before the first _data_ API call to localForage (i.e. before you call `getItem()` or `length()`, etc.)
## setDriver
```js
// Force localStorage to be the backend driver.
localforage.setDriver(localforage.LOCALSTORAGE);
// Supply a list of drivers, in order of preference.
localforage.setDriver([localforage.WEBSQL, localforage.INDEXEDDB]);
```
`setDriver(driverName)`<br>
`setDriver([driverName, nextDriverName])`
Force usage of a particular driver or drivers, if available.
By default, localForage selects backend drivers for the datastore in this order:
1. IndexedDB
2. WebSQL
3. localStorage
If you would like to force usage of a particular driver you can use `setDriver()` with one or more of the following arguments:
* `localforage.INDEXEDDB`
* `localforage.WEBSQL`
* `localforage.LOCALSTORAGE`
<aside class="notice">
If the backend you're trying to load isn't available on the user's browser, localForage will continue to use whatever backend driver it was previously using. This means that if you try to force a Gecko browser to use WebSQL, it will fail and continue using IndexedDB.
</aside>
## config
```js
// This will rename the database from "localforage"
// to "Hipster PDA App".
localforage.config({
name: 'Hipster PDA App'
});
// This will force localStorage as the storage
// driver even if another is available. You can
// use this instead of `setDriver()`.
localforage.config({
driver: localforage.LOCALSTORAGE,
name: 'I-heart-localStorage'
});
// This will use a different driver order.
localforage.config({
driver: [localforage.WEBSQL,
localforage.INDEXEDDB,
localforage.LOCALSTORAGE],
name: 'WebSQL-Rox'
});
```
`config(options)`
Set and persist localForage options. This must be called *before* any other calls to localForage are made, but can be called after localForage is loaded. If you set any config values with this method they will persist after driver changes, so you can call `config()` then `setDriver()`. The following config values can be set:
<dl>
<dt>driver</dt>
<dd>
The preferred driver(s) to use. Same format as what is passed to <a href="#settings-api-setdriver"><code>setDriver</code></a>, above.<br>
Default: <code>[localforage.INDEXEDDB, localforage.WEBSQL, localforage.LOCALSTORAGE]</code>
</dd>
<dt>name</dt>
<dd>
The name of the database. May appear during storage limit prompts. Useful to use the name of your app here. In localStorage, this is used as a key prefix for all keys stored in localStorage.<br>
Default: <code>'localforage'</code>
</dd>
<dt>size</dt>
<dd>
The size of the database in bytes. Used only in WebSQL for now.<br>
Default: <code>4980736</code>
</dd>
<dt>storeName</dt>
<dd>
The name of the datastore. In IndexedDB this is the <code>dataStore</code>, in WebSQL this is the name of the key/value table in the database. <strong>Must be alphanumeric, with underscores.</strong> Any non-alphanumeric characters will be converted to underscores.<br>
Default: <code>'keyvaluepairs'</code>
</dd>
<dt>version</dt>
<dd>
The version of your database. May be used for upgrades in the future; currently unused.<br>
Default: <code>1.0</code>
</dd>
<dt>description</dt>
<dd>
A description of the database, essentially for developer usage.<br>
Default: <code>''</code>
</dd>
</dl>
<aside class="notice">
Unlike most of the localForage API, the <code>config</code> method is synchronous.
</aside>
# Driver API
You can write your own, custom driver for localForage since **version 1.1**.
## defineDriver
```js
// Implement the driver here.
var myCustomDriver = {
_driver: 'customDriverUniqueName',
_initStorage: function(options) {
// Custom implementation here...
},
clear: function(callback) {
// Custom implementation here...
},
getItem: function(key, callback) {
// Custom implementation here...
},
key: function(n, callback) {
// Custom implementation here...
},
keys: function(callback) {
// Custom implementation here...
},
length: function(callback) {
// Custom implementation here...
},
removeItem: function(key, callback) {
// Custom implementation here...
},
setItem: function(key, value, callback) {
// Custom implementation here...
}
}
// Add the driver to localForage.
localforage.defineDriver(myCustomDriver);
```
You'll want to make sure you accept a `callback` argument and that you pass the same arguments to callbacks as the default drivers do. You'll also want to resolve or reject promises. Check any of the [default drivers][] for an idea of how to implement your own, custom driver.
The custom implementation may contain a `_support` property that is either boolean (`true`/`false`) or returns a `Promise` that resolves to a boolean value. If `_support` is omitted, then `true` is the default value. You can use this to make sure the browser in use supports your custom driver.
<aside class="notice">
These drivers are available to every instance of localForage on the page, regardless of which instance you use to add the implementation.
</aside>
[default drivers]: https://github.com/mozilla/localForage/tree/master/src/drivers
## driver
```js
localforage.driver();
// "asyncStorage"
```
`driver()`
Returns the name of the driver being used, or `null` if none can be used.
<aside class="notice">
In case that a driver fails during or right after the initialization process, then localForage will try to use the next in order driver. That is with respect to the default driver order while loading localForage or to the order the drivers were passed to `setDriver()`.
</aside>
## ready
```js
localforage.ready().then(function() {
// This code runs once localforage
// has fully initialized the selected driver.
console.log(localforage.driver()); // LocalStorage
}).catch(function (e) {
console.log(e); // `No available storage method found.`
// One of the cases that `ready()` rejects,
// is when no usable storage driver is found
});
```
Even though localForage queues up all of its data API method calls, `ready()` provides a way to determine whether the asynchronous driver initialization process has finished. That's useful in cases like when we want to know which driver localForage has settled down using.
## supports
```js
localforage.supports(localforage.INDEXEDDB);
// true
```
`supports(driverName)`
Returns (boolean) whether `driverName` is supported by the browser.
See <a href="#settings-api-setdriver"><code>setDriver</code></a> for default driver names.
# Multiple Instances
You can create multiple instances of localForage that point to different stores. All the configuration options used by [config](#config) are supported.
## createInstance
```js
var store = localforage.createInstance({
name: "nameHere"
});
var otherStore = localforage.createInstance({
name: "otherName"
});
// Setting the key on one of these doesn't affect the other.
store.setItem("key", "value");
otherStore.setItem("key", "value2");
```
Creates a new instance of localForage and returns it. Each object contains its own database and doesn't affect other instances of localForage.

Binary file not shown.

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Generated by IcoMoon</metadata>
<defs>
<font id="icomoon" horiz-adv-x="1024">
<font-face units-per-em="1024" ascent="960" descent="-64" />
<missing-glyph horiz-adv-x="1024" />
<glyph unicode="&#x20;" d="" horiz-adv-x="512" />
<glyph unicode="&#xe600;" d="M438.857 950.857q119.429 0 220.286-58.857t159.714-159.714 58.857-220.286-58.857-220.286-159.714-159.714-220.286-58.857-220.286 58.857-159.714 159.714-58.857 220.286 58.857 220.286 159.714 159.714 220.286 58.857zM512 238.286v108.571q0 8-5.143 13.429t-12.571 5.429h-109.714q-7.429 0-13.143-5.714t-5.714-13.143v-108.571q0-7.429 5.714-13.143t13.143-5.714h109.714q7.429 0 12.571 5.429t5.143 13.429zM510.857 434.857l10.286 354.857q0 6.857-5.714 10.286-5.714 4.571-13.714 4.571h-125.714q-8 0-13.714-4.571-5.714-3.429-5.714-10.286l9.714-354.857q0-5.714 5.714-10t13.714-4.286h105.714q8 0 13.429 4.286t6 10z" horiz-adv-x="878" />
<glyph unicode="&#xe601;" d="M512 237.714v109.714q0 8-5.143 13.143t-13.143 5.143h-109.714q-8 0-13.143-5.143t-5.143-13.143v-109.714q0-8 5.143-13.143t13.143-5.143h109.714q8 0 13.143 5.143t5.143 13.143zM658.286 621.714q0 50.286-31.714 93.143t-79.143 66.286-97.143 23.429q-138.857 0-212-121.714-8.571-13.714 4.571-24l75.429-57.143q4-3.429 10.857-3.429 9.143 0 14.286 6.857 30.286 38.857 49.143 52.571 19.429 13.714 49.143 13.714 27.429 0 48.857-14.857t21.429-33.714q0-21.714-11.429-34.857t-38.857-25.714q-36-16-66-49.429t-30-71.714v-20.571q0-8 5.143-13.143t13.143-5.143h109.714q8 0 13.143 5.143t5.143 13.143q0 10.857 12.286 28.286t31.143 28.286q18.286 10.286 28 16.286t26.286 20 25.429 27.429 16 34.571 7.143 46.286zM877.714 512q0-119.429-58.857-220.286t-159.714-159.714-220.286-58.857-220.286 58.857-159.714 159.714-58.857 220.286 58.857 220.286 159.714 159.714 220.286 58.857 220.286-58.857 159.714-159.714 58.857-220.286z" horiz-adv-x="878" />
<glyph unicode="&#xe602;" d="M585.143 237.714v91.429q0 8-5.143 13.143t-13.143 5.143h-54.857v292.571q0 8-5.143 13.143t-13.143 5.143h-182.857q-8 0-13.143-5.143t-5.143-13.143v-91.429q0-8 5.143-13.143t13.143-5.143h54.857v-182.857h-54.857q-8 0-13.143-5.143t-5.143-13.143v-91.429q0-8 5.143-13.143t13.143-5.143h256q8 0 13.143 5.143t5.143 13.143zM512 749.714v91.429q0 8-5.143 13.143t-13.143 5.143h-109.714q-8 0-13.143-5.143t-5.143-13.143v-91.429q0-8 5.143-13.143t13.143-5.143h109.714q8 0 13.143 5.143t5.143 13.143zM877.714 512q0-119.429-58.857-220.286t-159.714-159.714-220.286-58.857-220.286 58.857-159.714 159.714-58.857 220.286 58.857 220.286 159.714 159.714 220.286 58.857 220.286-58.857 159.714-159.714 58.857-220.286z" horiz-adv-x="878" />
<glyph unicode="&#xe603;" d="M656.571 382.857q0 14.857-10.857 25.714l-103.429 103.429 103.429 103.429q10.857 10.857 10.857 25.714 0 15.429-10.857 26.286l-51.429 51.429q-10.857 10.857-26.286 10.857-14.857 0-25.714-10.857l-103.429-103.429-103.429 103.429q-10.857 10.857-25.714 10.857-15.429 0-26.286-10.857l-51.429-51.429q-10.857-10.857-10.857-26.286 0-14.857 10.857-25.714l103.429-103.429-103.429-103.429q-10.857-10.857-10.857-25.714 0-15.429 10.857-26.286l51.429-51.429q10.857-10.857 26.286-10.857 14.857 0 25.714 10.857l103.429 103.429 103.429-103.429q10.857-10.857 25.714-10.857 15.429 0 26.286 10.857l51.429 51.429q10.857 10.857 10.857 26.286zM877.714 512q0-119.429-58.857-220.286t-159.714-159.714-220.286-58.857-220.286 58.857-159.714 159.714-58.857 220.286 58.857 220.286 159.714 159.714 220.286 58.857 220.286-58.857 159.714-159.714 58.857-220.286z" horiz-adv-x="878" />
<glyph unicode="&#xe604;" d="M694.857 475.429v73.143q0 14.857-10.857 25.714t-25.714 10.857h-146.286v146.286q0 14.857-10.857 25.714t-25.714 10.857h-73.143q-14.857 0-25.714-10.857t-10.857-25.714v-146.286h-146.286q-14.857 0-25.714-10.857t-10.857-25.714v-73.143q0-14.857 10.857-25.714t25.714-10.857h146.286v-146.286q0-14.857 10.857-25.714t25.714-10.857h73.143q14.857 0 25.714 10.857t10.857 25.714v146.286h146.286q14.857 0 25.714 10.857t10.857 25.714zM877.714 512q0-119.429-58.857-220.286t-159.714-159.714-220.286-58.857-220.286 58.857-159.714 159.714-58.857 220.286 58.857 220.286 159.714 159.714 220.286 58.857 220.286-58.857 159.714-159.714 58.857-220.286z" horiz-adv-x="878" />
<glyph unicode="&#xe605;" d="M694.857 475.429v73.143q0 14.857-10.857 25.714t-25.714 10.857h-438.857q-14.857 0-25.714-10.857t-10.857-25.714v-73.143q0-14.857 10.857-25.714t25.714-10.857h438.857q14.857 0 25.714 10.857t10.857 25.714zM877.714 512q0-119.429-58.857-220.286t-159.714-159.714-220.286-58.857-220.286 58.857-159.714 159.714-58.857 220.286 58.857 220.286 159.714 159.714 220.286 58.857 220.286-58.857 159.714-159.714 58.857-220.286z" horiz-adv-x="878" />
<glyph unicode="&#xe606;" d="M733.714 604.571q0 16-10.286 26.286l-52 51.429q-10.857 10.857-25.714 10.857t-25.714-10.857l-233.143-232.571-129.143 129.143q-10.857 10.857-25.714 10.857t-25.714-10.857l-52-51.429q-10.286-10.286-10.286-26.286 0-15.429 10.286-25.714l206.857-206.857q10.857-10.857 25.714-10.857 15.429 0 26.286 10.857l310.286 310.286q10.286 10.286 10.286 25.714zM877.714 512q0-119.429-58.857-220.286t-159.714-159.714-220.286-58.857-220.286 58.857-159.714 159.714-58.857 220.286 58.857 220.286 159.714 159.714 220.286 58.857 220.286-58.857 159.714-159.714 58.857-220.286z" horiz-adv-x="878" />
</font></defs></svg>

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Binary file not shown.

56
Skills/@be/be/node_modules/localforage/docs/index.html generated vendored Normal file
View File

@@ -0,0 +1,56 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width">
<title>localForage</title>
<!-- Flatdoc -->
<script src="https://cdn.jsdelivr.net/npm/jquery@1.12/dist/jquery.min.js"></script>
<script src="scripts/legacy.js"></script>
<script src="scripts/flatdoc.js"></script>
<!-- Flatdoc theme -->
<link href="theme/style.css" rel="stylesheet">
<script src="theme/script.js"></script>
<!-- localForage extras -->
<script src="https://cdn.jsdelivr.net/gh/localforage/localforage/dist/localforage.min.js"></script>
<link href="theme/localforage.css" rel="stylesheet">
<!-- Meta -->
<meta content="localForage" property="og:title">
<meta content="localForage is a JavaScript library that improves the offline experience of your web app by using an asynchronous data store with a simple, localStorage-like API." name="description">
<!-- Initializer -->
<script>
Flatdoc.run({
fetcher: (window.location.host === 'mozilla.github.io') ?
Flatdoc.github('localForage/localForage', 'docs/api.md') :
Flatdoc.file('api.md')
});
</script>
</head>
<body role="flatdoc">
<div class="header">
<div class="left">
<h1>localForage</h1>
<ul>
<li><a href="https://github.com/localForage/localForage">View on GitHub</a></li>
<li><a href="https://github.com/localForage/localForage/issues">Issues</a></li>
</ul>
</div>
<div class="right">
</div>
</div>
<div class="content-root">
<div class="menubar">
<div class="menu section" role="flatdoc-menu"></div>
</div>
<div role="flatdoc-content" class="content"></div>
</div>
</body>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,369 @@
/*!
Support JS for legacy browsers.
Includes:
HTML5 Shiv
@afarkas @jdalton @jon_neal @rem
MIT/GPL2 Licensed
https://github.com/aFarkas/html5shiv
matchMedia() polyfill
(c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license
Respond.js
min/max-width media query polyfill
(c) Scott Jehl. MIT/GPLv2 Lic.
http://j.mp/respondjs
*/
/*
HTML5 Shiv v3.6.2 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
*/
(function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();
a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/\w+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x<style>article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}</style>";
c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="<xyz></xyz>";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode||
"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup main mark meter nav output progress section summary time video",version:"3.6.2",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);if(g)return a.createDocumentFragment();
for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d<h;d++)c.createElement(e[d]);return c}};l.html5=e;q(f)})(this,document);
/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */
/*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */
window.matchMedia = window.matchMedia || (function( doc, undefined ) {
"use strict";
var bool,
docElem = doc.documentElement,
refNode = docElem.firstElementChild || docElem.firstChild,
// fakeBody required for <FF4 when executed in <head>
fakeBody = doc.createElement( "body" ),
div = doc.createElement( "div" );
div.id = "mq-test-1";
div.style.cssText = "position:absolute;top:-100em";
fakeBody.style.background = "none";
fakeBody.appendChild(div);
return function(q){
div.innerHTML = "&shy;<style media=\"" + q + "\"> #mq-test-1 { width: 42px; }</style>";
docElem.insertBefore( fakeBody, refNode );
bool = div.offsetWidth === 42;
docElem.removeChild( fakeBody );
return {
matches: bool,
media: q
};
};
}( document ));
/*! Respond.js v1.1.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */
(function( win ){
"use strict";
//exposed namespace
var respond = {};
win.respond = respond;
//define update even in native-mq-supporting browsers, to avoid errors
respond.update = function(){};
//expose media query support flag for external use
respond.mediaQueriesSupported = win.matchMedia && win.matchMedia( "only all" ).matches;
//if media queries are supported, exit here
if( respond.mediaQueriesSupported ){
return;
}
//define vars
var doc = win.document,
docElem = doc.documentElement,
mediastyles = [],
rules = [],
appendedEls = [],
parsedSheets = {},
resizeThrottle = 30,
head = doc.getElementsByTagName( "head" )[0] || docElem,
base = doc.getElementsByTagName( "base" )[0],
links = head.getElementsByTagName( "link" ),
requestQueue = [],
//loop stylesheets, send text content to translate
ripCSS = function(){
for( var i = 0; i < links.length; i++ ){
var sheet = links[ i ],
href = sheet.href,
media = sheet.media,
isCSS = sheet.rel && sheet.rel.toLowerCase() === "stylesheet";
//only links plz and prevent re-parsing
if( !!href && isCSS && !parsedSheets[ href ] ){
// selectivizr exposes css through the rawCssText expando
if (sheet.styleSheet && sheet.styleSheet.rawCssText) {
translate( sheet.styleSheet.rawCssText, href, media );
parsedSheets[ href ] = true;
} else {
if( (!/^([a-zA-Z:]*\/\/)/.test( href ) && !base) ||
href.replace( RegExp.$1, "" ).split( "/" )[0] === win.location.host ){
requestQueue.push( {
href: href,
media: media
} );
}
}
}
}
makeRequests();
},
//recurse through request queue, get css text
makeRequests = function(){
if( requestQueue.length ){
var thisRequest = requestQueue.shift();
ajax( thisRequest.href, function( styles ){
translate( styles, thisRequest.href, thisRequest.media );
parsedSheets[ thisRequest.href ] = true;
// by wrapping recursive function call in setTimeout
// we prevent "Stack overflow" error in IE7
win.setTimeout(function(){ makeRequests(); },0);
} );
}
},
//find media blocks in css text, convert to style blocks
translate = function( styles, href, media ){
var qs = styles.match( /@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi ),
ql = qs && qs.length || 0;
//try to get CSS path
href = href.substring( 0, href.lastIndexOf( "/" ) );
var repUrls = function( css ){
return css.replace( /(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g, "$1" + href + "$2$3" );
},
useMedia = !ql && media;
//if path exists, tack on trailing slash
if( href.length ){ href += "/"; }
//if no internal queries exist, but media attr does, use that
//note: this currently lacks support for situations where a media attr is specified on a link AND
//its associated stylesheet has internal CSS media queries.
//In those cases, the media attribute will currently be ignored.
if( useMedia ){
ql = 1;
}
for( var i = 0; i < ql; i++ ){
var fullq, thisq, eachq, eql;
//media attr
if( useMedia ){
fullq = media;
rules.push( repUrls( styles ) );
}
//parse for styles
else{
fullq = qs[ i ].match( /@media *([^\{]+)\{([\S\s]+?)$/ ) && RegExp.$1;
rules.push( RegExp.$2 && repUrls( RegExp.$2 ) );
}
eachq = fullq.split( "," );
eql = eachq.length;
for( var j = 0; j < eql; j++ ){
thisq = eachq[ j ];
mediastyles.push( {
media : thisq.split( "(" )[ 0 ].match( /(only\s+)?([a-zA-Z]+)\s?/ ) && RegExp.$2 || "all",
rules : rules.length - 1,
hasquery : thisq.indexOf("(") > -1,
minw : thisq.match( /\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/ ) && parseFloat( RegExp.$1 ) + ( RegExp.$2 || "" ),
maxw : thisq.match( /\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/ ) && parseFloat( RegExp.$1 ) + ( RegExp.$2 || "" )
} );
}
}
applyMedia();
},
lastCall,
resizeDefer,
// returns the value of 1em in pixels
getEmValue = function() {
var ret,
div = doc.createElement('div'),
body = doc.body,
fakeUsed = false;
div.style.cssText = "position:absolute;font-size:1em;width:1em";
if( !body ){
body = fakeUsed = doc.createElement( "body" );
body.style.background = "none";
}
body.appendChild( div );
docElem.insertBefore( body, docElem.firstChild );
ret = div.offsetWidth;
if( fakeUsed ){
docElem.removeChild( body );
}
else {
body.removeChild( div );
}
//also update eminpx before returning
ret = eminpx = parseFloat(ret);
return ret;
},
//cached container for 1em value, populated the first time it's needed
eminpx,
//enable/disable styles
applyMedia = function( fromResize ){
var name = "clientWidth",
docElemProp = docElem[ name ],
currWidth = doc.compatMode === "CSS1Compat" && docElemProp || doc.body[ name ] || docElemProp,
styleBlocks = {},
lastLink = links[ links.length-1 ],
now = (new Date()).getTime();
//throttle resize calls
if( fromResize && lastCall && now - lastCall < resizeThrottle ){
win.clearTimeout( resizeDefer );
resizeDefer = win.setTimeout( applyMedia, resizeThrottle );
return;
}
else {
lastCall = now;
}
for( var i in mediastyles ){
if( mediastyles.hasOwnProperty( i ) ){
var thisstyle = mediastyles[ i ],
min = thisstyle.minw,
max = thisstyle.maxw,
minnull = min === null,
maxnull = max === null,
em = "em";
if( !!min ){
min = parseFloat( min ) * ( min.indexOf( em ) > -1 ? ( eminpx || getEmValue() ) : 1 );
}
if( !!max ){
max = parseFloat( max ) * ( max.indexOf( em ) > -1 ? ( eminpx || getEmValue() ) : 1 );
}
// if there's no media query at all (the () part), or min or max is not null, and if either is present, they're true
if( !thisstyle.hasquery || ( !minnull || !maxnull ) && ( minnull || currWidth >= min ) && ( maxnull || currWidth <= max ) ){
if( !styleBlocks[ thisstyle.media ] ){
styleBlocks[ thisstyle.media ] = [];
}
styleBlocks[ thisstyle.media ].push( rules[ thisstyle.rules ] );
}
}
}
//remove any existing respond style element(s)
for( var j in appendedEls ){
if( appendedEls.hasOwnProperty( j ) ){
if( appendedEls[ j ] && appendedEls[ j ].parentNode === head ){
head.removeChild( appendedEls[ j ] );
}
}
}
//inject active styles, grouped by media type
for( var k in styleBlocks ){
if( styleBlocks.hasOwnProperty( k ) ){
var ss = doc.createElement( "style" ),
css = styleBlocks[ k ].join( "\n" );
ss.type = "text/css";
ss.media = k;
//originally, ss was appended to a documentFragment and sheets were appended in bulk.
//this caused crashes in IE in a number of circumstances, such as when the HTML element had a bg image set, so appending beforehand seems best. Thanks to @dvelyk for the initial research on this one!
head.insertBefore( ss, lastLink.nextSibling );
if ( ss.styleSheet ){
ss.styleSheet.cssText = css;
}
else {
ss.appendChild( doc.createTextNode( css ) );
}
//push to appendedEls to track for later removal
appendedEls.push( ss );
}
}
},
//tweaked Ajax functions from Quirksmode
ajax = function( url, callback ) {
var req = xmlHttp();
if (!req){
return;
}
req.open( "GET", url, true );
req.onreadystatechange = function () {
if ( req.readyState !== 4 || req.status !== 200 && req.status !== 304 ){
return;
}
callback( req.responseText );
};
if ( req.readyState === 4 ){
return;
}
req.send( null );
},
//define ajax obj
xmlHttp = (function() {
var xmlhttpmethod = false;
try {
xmlhttpmethod = new win.XMLHttpRequest();
}
catch( e ){
xmlhttpmethod = new win.ActiveXObject( "Microsoft.XMLHTTP" );
}
return function(){
return xmlhttpmethod;
};
})();
//translate CSS
ripCSS();
//expose update for re-running respond later on
respond.update = ripCSS;
//adjust on resize
function callMedia(){
applyMedia( true );
}
if( win.addEventListener ){
win.addEventListener( "resize", callMedia, false );
}
else if( win.attachEvent ){
win.attachEvent( "onresize", callMedia );
}
})(this);

View File

@@ -0,0 +1,97 @@
@font-face {
font-family: 'icomoon';
src: url("../fonts/icomoon.eot");
src: url("../fonts/icomoon.eot?#iefix") format("embedded-opentype"),
url("../fonts/icomoon.ttf") format("truetype"),
url("../fonts/icomoon.woff") format("woff"),
url("../fonts/icomoon.svg#icomoon") format("svg");
font-weight:normal;
font-style:normal;
}
body,
td,
textarea,
input {
font-family: "Helvetica Neue", "Open Sans", sans-serif;
line-height: 1.6;
font-size: 16px;
color: #505050;
}
@media (max-width: 480px) {
body,
td,
textarea,
input {
font-size: 14px;
}
}
body:not(.no-literate) .content > pre + p,
body:not(.no-literate) .content > blockquote + p,
body:not(.no-literate) .content > pre + ul,
body:not(.no-literate) .content > blockquote + ul,
body:not(.no-literate) .content > pre + dl,
body:not(.no-literate) .content > blockquote + dl,
body:not(.no-literate) .content > pre + ol,
body:not(.no-literate) .content > blockquote + ol,
body:not(.no-literate) .content > pre + h4,
body:not(.no-literate) .content > blockquote + h4,
body:not(.no-literate) .content > pre + h5,
body:not(.no-literate) .content > blockquote + h5,
body:not(.no-literate) .content > pre + h6,
body:not(.no-literate) .content > blockquote + h6 {
clear: left;
}
body:not(.no-literate) .content > p,
body:not(.no-literate) .content > ul,
body:not(.no-literate) .content > dl,
body:not(.no-literate) .content > ol,
body:not(.no-literate) .content > h4,
body:not(.no-literate) .content > h5,
body:not(.no-literate) .content > h6 {
float: none;
}
.content dl > dt {
font-weight: bold;
margin-left: -1.5em;
}
.content dl > dd {
width: 85%;
}
aside {
box-sizing: border-box;
clear: left;
display: block;
margin: 10px 40px;
padding: 10px;
max-width: 50%;
}
aside a,
aside a:focus,
aside a:hover {
display: inline-block;
color: #000;
padding: 0 1px;
text-decoration: underline;
}
aside a:active {
background: #f3f6fb;
}
aside.notice {
background: #d2dbeb;
}
aside.notice::before {
content: "\e602";
display: inline-block;
font-family: 'icomoon';
margin: 0 0.5em;
}

View File

@@ -0,0 +1,243 @@
(function($) {
var $window = $(window);
var $document = $(document);
/*
* Scrollspy.
*/
$document.on('flatdoc:ready', function() {
$("h2, h3").scrollagent(function(cid, pid, currentElement, previousElement) {
if (pid) {
$("[href='#"+pid+"']").removeClass('active');
}
if (cid) {
$("[href='#"+cid+"']").addClass('active');
}
});
});
/*
* Anchor jump links.
*/
$document.on('flatdoc:ready', function() {
$('.menu a').anchorjump();
});
/*
* Title card.
*/
$(function() {
var $card = $('.title-card');
if (!$card.length) return;
var $header = $('.header');
var headerHeight = $header.length ? $header.outerHeight() : 0;
$window
.on('resize.title-card', function() {
var windowWidth = $window.width();
if (windowWidth < 480) {
$card.css('height', '');
} else {
var height = $window.height();
$card.css('height', height - headerHeight);
}
})
.trigger('resize.title-card');
});
/*
* Sidebar stick.
*/
$(function() {
var $sidebar = $('.menubar');
var elTop;
$window
.on('resize.sidestick', function() {
$sidebar.removeClass('fixed');
elTop = $sidebar.offset().top;
$window.trigger('scroll.sidestick');
})
.on('scroll.sidestick', function() {
var scrollY = $window.scrollTop();
$sidebar.toggleClass('fixed', (scrollY >= elTop));
})
.trigger('resize.sidestick');
});
})(jQuery);
/*! jQuery.scrollagent (c) 2012, Rico Sta. Cruz. MIT License.
* https://github.com/rstacruz/jquery-stuff/tree/master/scrollagent */
// Call $(...).scrollagent() with a callback function.
//
// The callback will be called everytime the focus changes.
//
// Example:
//
// $("h2").scrollagent(function(cid, pid, currentElement, previousElement) {
// if (pid) {
// $("[href='#"+pid+"']").removeClass('active');
// }
// if (cid) {
// $("[href='#"+cid+"']").addClass('active');
// }
// });
(function($) {
$.fn.scrollagent = function(options, callback) {
// Account for $.scrollspy(function)
if (typeof callback === 'undefined') {
callback = options;
options = {};
}
var $sections = $(this);
var $parent = options.parent || $(window);
// Find the top offsets of each section
var offsets = [];
$sections.each(function(i) {
var offset = $(this).attr('data-anchor-offset') ?
parseInt($(this).attr('data-anchor-offset'), 10) :
(options.offset || 0);
offsets.push({
id: $(this).attr('id'),
index: i,
el: this,
offset: offset
});
});
// State
var current = null;
var height = null;
var range = null;
// Save the height. Do this only whenever the window is resized so we don't
// recalculate often.
$(window).on('resize', function() {
height = $parent.height();
range = $(document).height();
});
// Find the current active section every scroll tick.
$parent.on('scroll', function() {
var y = $parent.scrollTop();
y += height * (0.3 + 0.7 * Math.pow(y/range, 2));
var latest = null;
for (var i in offsets) {
if (offsets.hasOwnProperty(i)) {
var offset = offsets[i];
if ($(offset.el).offset().top + offset.offset < y) latest = offset;
}
}
if (latest && (!current || (latest.index !== current.index))) {
callback.call($sections,
latest ? latest.id : null,
current ? current.id : null,
latest ? latest.el : null,
current ? current.el : null);
current = latest;
}
});
$(window).trigger('resize');
$parent.trigger('scroll');
return this;
};
})(jQuery);
/*! Anchorjump (c) 2012, Rico Sta. Cruz. MIT License.
* http://github.com/rstacruz/jquery-stuff/tree/master/anchorjump */
// Makes anchor jumps happen with smooth scrolling.
//
// $("#menu a").anchorjump();
// $("#menu a").anchorjump({ offset: -30 });
//
// // Via delegate:
// $("#menu").anchorjump({ for: 'a', offset: -30 });
//
// You may specify a parent. This makes it scroll down to the parent.
// Great for tabbed views.
//
// $('#menu a').anchorjump({ parent: '.anchor' });
//
// You can jump to a given area.
//
// $.anchorjump('#bank-deposit', options);
(function($) {
var defaults = {
'speed': 500,
'offset': 0,
'for': null,
'parent': null
};
$.fn.anchorjump = function(options) {
options = $.extend({}, defaults, options);
if (options['for']) {
this.on('click', options['for'], onClick);
} else {
this.on('click', onClick);
}
function onClick(e) {
var $a = $(e.target).closest('a');
if (e.ctrlKey || e.metaKey || e.altKey || $a.attr('target')) return;
e.preventDefault();
var href = $a.attr('href');
$.anchorjump(href, options);
}
};
// Jump to a given area.
$.anchorjump = function(href, options) {
options = $.extend({}, defaults, options);
var top = 0;
if (href != '#') {
var $area = $(href);
// Find the parent
if (options.parent) {
var $parent = $area.closest(options.parent);
if ($parent.length) { $area = $parent; }
}
if (!$area.length) { return; }
// Determine the pixel offset; use the default if not available
var offset =
$area.attr('data-anchor-offset') ?
parseInt($area.attr('data-anchor-offset'), 10) :
options.offset;
top = Math.max(0, $area.offset().top + offset);
}
$('html, body').animate({ scrollTop: top }, options.speed);
$('body').trigger('anchor', href);
// Add the location hash via pushState.
if (window.history.pushState) {
window.history.pushState({ href: href }, "", href);
}
};
})(jQuery);

View File

@@ -0,0 +1,891 @@
/*
Please don't edit this file directly.
Instead, edit the stylus (.styl) files and compile it to CSS on your machine.
*/
/* ----------------------------------------------------------------------------
* Fonts
*/
@import url("//fonts.googleapis.com/css?family=Montserrat:700|Open+Sans:300");
/* ----------------------------------------------------------------------------
* Base
*/
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-weight: inherit;
font-style: inherit;
font-family: inherit;
font-size: 100%;
vertical-align: baseline;
}
body {
line-height: 1;
color: #000;
background: #fff;
}
ol,
ul,
dl {
list-style: none;
}
table {
border-collapse: separate;
border-spacing: 0;
vertical-align: middle;
}
caption,
th,
td {
text-align: left;
font-weight: normal;
vertical-align: middle;
}
a img {
border: none;
}
html,
body {
height: 100%;
}
html {
overflow-x: hidden;
}
body,
td,
textarea,
input {
font-family: Helvetica Neue, Open Sans, sans-serif;
line-height: 1.6;
font-size: 13px;
color: #505050;
}
@media (max-width: 480px) {
body,
td,
textarea,
input {
font-size: 12px;
}
}
a {
color: #2badad;
text-decoration: none;
}
a:hover {
color: #228a8a;
}
/* ----------------------------------------------------------------------------
* Content styling
*/
.content p,
.content ul,
.content dl,
.content ol,
.content h1,
.content h2,
.content h3,
.content h4,
.content h5,
.content h6,
.content pre,
.content blockquote {
padding: 10px 0;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.content h1,
.content h2,
.content h3,
.content h4,
.content h5,
.content h6 {
font-weight: bold;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
}
.content pre {
font-family: Menlo, monospace;
}
.content ul > li,
.content dl > dt {
list-style-type: disc;
}
.content ol > li {
list-style-type: decimal;
}
.content ul,
.content ol,
.content dl {
margin-left: 20px;
}
.content ul > li
.content dl > dt {
list-style-type: none;
position: relative;
}
.content ul > li:before,
.content dl > dd:before {
content: '';
display: block;
position: absolute;
left: -17px;
top: 7px;
width: 5px;
height: 5px;
-webkit-border-radius: 4px;
border-radius: 4px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
background: #fff;
border: solid 1px #9090aa;
}
.content li > :first-child {
padding-top: 0;
}
.content strong,
.content b {
font-weight: bold;
}
.content i,
.content em {
font-style: italic;
color: #9090aa;
}
.content code {
font-family: Menlo, monospace;
background: #f3f6fb;
padding: 1px 3px;
font-size: 0.95em;
}
.content pre > code {
display: block;
background: transparent;
font-size: 0.85em;
letter-spacing: -1px;
}
.content blockquote :first-child {
padding-top: 0;
}
.content blockquote :last-child {
padding-bottom: 0;
}
.content table {
margin-top: 10px;
margin-bottom: 10px;
padding: 0;
border-collapse: collapse;
clear: both;
}
.content table tr {
border-top: 1px solid #ccc;
background-color: #fff;
margin: 0;
padding: 0;
}
.content table tr :nth-child(2n) {
background-color: #f8f8f8;
}
.content table tr th {
text-align: auto;
font-weight: bold;
border: 1px solid #ccc;
margin: 0;
padding: 6px 13px;
}
.content table tr td {
text-align: auto;
border: 1px solid #ccc;
margin: 0;
padding: 6px 13px;
}
.content table tr th :first-child,
.content table tr td :first-child {
margin-top: 0;
}
.content table tr th :last-child,
.content table tr td :last-child {
margin-bottom: 0;
}
/* ----------------------------------------------------------------------------
* Content
*/
.content-root {
min-height: 90%;
position: relative;
}
.content {
padding-top: 30px;
padding-bottom: 40px;
padding-left: 40px;
padding-right: 40px;
zoom: 1;
max-width: 700px;
}
.content:before,
.content:after {
content: "";
display: table;
}
.content:after {
clear: both;
}
.content blockquote {
color: #9090aa;
text-shadow: 0 1px 0 rgba(255,255,255,0.5);
}
.content h1,
.content h2,
.content h3 {
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
font-family: montserrat;
padding-bottom: 0;
}
.content h1 + p,
.content h2 + p,
.content h3 + p,
.content h1 ul,
.content h2 ul,
.content h3 ul,
.content h1 ol,
.content h2 ol,
.content h3 ol,
.content h1 dl,
.content h2 dl,
.content h3 dl {
padding-top: 10px;
}
.content h1,
.content h2 {
text-transform: uppercase;
letter-spacing: 1px;
font-size: 1.5em;
}
.content h3 {
font-size: 1.2em;
}
.content h1,
.content h2,
.content .big-heading,
body.big-h3 .content h3 {
padding-top: 80px;
}
.content h1:before,
.content h2:before,
.content .big-heading:before,
body.big-h3 .content h3:before {
display: block;
content: '';
background: -webkit-gradient(linear, left top, right top, color-stop(0.8, #dfe2e7), color-stop(1, rgba(223,226,231,0)));
background: -webkit-linear-gradient(left, #dfe2e7 80%, rgba(223,226,231,0) 100%);
background: -moz-linear-gradient(left, #dfe2e7 80%, rgba(223,226,231,0) 100%);
background: -o-linear-gradient(left, #dfe2e7 80%, rgba(223,226,231,0) 100%);
background: -ms-linear-gradient(left, #dfe2e7 80%, rgba(223,226,231,0) 100%);
background: linear-gradient(left, #dfe2e7 80%, rgba(223,226,231,0) 100%);
-webkit-box-shadow: 0 1px 0 rgba(255,255,255,0.4);
box-shadow: 0 1px 0 rgba(255,255,255,0.4);
height: 1px;
position: relative;
top: -40px;
left: -40px;
width: 100%;
}
@media (max-width: 768px) {
.content h1,
.content h2,
.content .big-heading,
body.big-h3 .content h3 {
padding-top: 40px;
}
.content h1:before,
.content h2:before,
.content .big-heading:before,
body.big-h3 .content h3:before {
background: #dfe2e7;
left: -40px;
top: -20px;
width: 120%;
}
}
.content h4,
.content h5,
.content .small-heading,
body:not(.big-h3) .content h3 {
border-bottom: solid 1px rgba(0,0,0,0.07);
color: #9090aa;
padding-top: 30px;
padding-bottom: 10px;
}
body:not(.big-h3) .content h3 {
font-size: 0.9em;
}
.content h1:first-child {
padding-top: 0;
}
.content h1:first-child,
.content h1:first-child a,
.content h1:first-child a:visited {
color: #505050;
}
.content h1:first-child:before {
display: none;
}
@media (max-width: 768px) {
.content h4,
.content h5,
.content .small-heading,
body:not(.big-h3) .content h3 {
padding-top: 20px;
}
}
@media (max-width: 480px) {
.content {
padding: 20px;
padding-top: 40px;
}
.content h4,
.content h5,
.content .small-heading,
body:not(.big-h3) .content h3 {
padding-top: 10px;
}
}
body.no-literate .content pre > code {
background: #f3f6fb;
border: solid 1px #e7eaee;
border-top: solid 1px #dbdde2;
border-left: solid 1px #e2e5e9;
display: block;
padding: 10px;
-webkit-border-radius: 2px;
border-radius: 2px;
overflow: auto;
}
body.no-literate .content pre > code {
-webkit-overflow-scrolling: touch;
}
body.no-literate .content pre > code::-webkit-scrollbar {
width: 15px;
height: 15px;
}
body.no-literate .content pre > code::-webkit-scrollbar-thumb {
background: #ddd;
-webkit-border-radius: 8px;
border-radius: 8px;
border: solid 4px #f3f6fb;
}
body.no-literate .content pre > code:hover::-webkit-scrollbar-thumb {
background: #999;
-webkit-box-shadow: inset 2px 2px 3px rgba(0,0,0,0.2);
box-shadow: inset 2px 2px 3px rgba(0,0,0,0.2);
}
@media (max-width: 1180px) {
.content pre > code {
background: #f3f6fb;
border: solid 1px #e7eaee;
border-top: solid 1px #dbdde2;
border-left: solid 1px #e2e5e9;
display: block;
padding: 10px;
-webkit-border-radius: 2px;
border-radius: 2px;
overflow: auto;
}
.content pre > code {
-webkit-overflow-scrolling: touch;
}
.content pre > code::-webkit-scrollbar {
width: 15px;
height: 15px;
}
.content pre > code::-webkit-scrollbar-thumb {
background: #ddd;
-webkit-border-radius: 8px;
border-radius: 8px;
border: solid 4px #f3f6fb;
}
.content pre > code:hover::-webkit-scrollbar-thumb {
background: #999;
-webkit-box-shadow: inset 2px 2px 3px rgba(0,0,0,0.2);
box-shadow: inset 2px 2px 3px rgba(0,0,0,0.2);
}
}
.button {
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
font-family: montserrat, sans-serif;
letter-spacing: -1px;
font-weight: bold;
display: inline-block;
padding: 3px 25px;
border: solid 2px #2badad;
-webkit-border-radius: 20px;
border-radius: 20px;
margin-right: 15px;
}
.button,
.button:visited {
background: #2badad;
color: #fff;
text-shadow: none;
}
.button:hover {
border-color: #111;
background: #111;
color: #fff;
}
.button.light,
.button.light:visited {
background: transparent;
color: #9090aa;
border-color: #9090aa;
text-shadow: none;
}
.button.light:hover {
border-color: #9090aa;
background: #9090aa;
color: #fff;
}
.content .button + em {
color: #9090aa;
}
@media (min-width: 1180px) {
body:not(.no-literate) .content-root {
background-color: #f3f6fb;
-webkit-box-shadow: inset 780px 0 #fff, inset 781px 0 #dfe2e7, inset 790px 0 5px -10px rgba(0,0,0,0.1);
box-shadow: inset 780px 0 #fff, inset 781px 0 #dfe2e7, inset 790px 0 5px -10px rgba(0,0,0,0.1);
}
}
@media (min-width: 1180px) {
body:not(.no-literate) .content {
padding-left: 0;
padding-right: 0;
width: 930px;
max-width: none;
}
body:not(.no-literate) .content > p,
body:not(.no-literate) .content > ul,
body:not(.no-literate) .content > dl,
body:not(.no-literate) .content > ol,
body:not(.no-literate) .content > h1,
body:not(.no-literate) .content > h2,
body:not(.no-literate) .content > h3,
body:not(.no-literate) .content > h4,
body:not(.no-literate) .content > h5,
body:not(.no-literate) .content > h6,
body:not(.no-literate) .content > pre,
body:not(.no-literate) .content > blockquote {
width: 550px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
padding-right: 40px;
padding-left: 40px;
}
body:not(.no-literate) .content > h1,
body:not(.no-literate) .content > h2,
body:not(.no-literate) .content > h3 {
clear: both;
width: 100%;
}
body:not(.no-literate) .content > pre,
body:not(.no-literate) .content > blockquote {
width: 380px;
padding-left: 20px;
padding-right: 20px;
float: right;
clear: right;
}
body:not(.no-literate) .content > pre + p,
body:not(.no-literate) .content > blockquote + p,
body:not(.no-literate) .content > pre + ul,
body:not(.no-literate) .content > blockquote + ul,
body:not(.no-literate) .content > pre + dl,
body:not(.no-literate) .content > blockquote + dl,
body:not(.no-literate) .content > pre + ol,
body:not(.no-literate) .content > blockquote + ol,
body:not(.no-literate) .content > pre + h4,
body:not(.no-literate) .content > blockquote + h4,
body:not(.no-literate) .content > pre + h5,
body:not(.no-literate) .content > blockquote + h5,
body:not(.no-literate) .content > pre + h6,
body:not(.no-literate) .content > blockquote + h6 {
clear: both;
}
body:not(.no-literate) .content > p,
body:not(.no-literate) .content > ul,
body:not(.no-literate) .content > dl,
body:not(.no-literate) .content > ol,
body:not(.no-literate) .content > h4,
body:not(.no-literate) .content > h5,
body:not(.no-literate) .content > h6 {
float: left;
clear: left;
}
body:not(.no-literate) .content > h4,
body:not(.no-literate) .content > h5,
body:not(.no-literate) .content > .small-heading,
body:not(.big-h3) body:not(.no-literate) .content > h3 {
margin-left: 40px;
width: 470px;
margin-bottom: 3px;
padding-left: 0;
padding-right: 0;
}
body:not(.no-literate) .content > table {
margin-left: 40px;
margin-right: 40px;
max-width: 470px;
}
body:not(.no-literate):not(.big-h3) .content > h3 {
margin-left: 40px;
width: 470px;
margin-bottom: 3px;
padding-left: 0;
padding-right: 0;
}
}
.header {
background: #f3f6fb;
text-shadow: 0 1px 0 rgba(255,255,255,0.5);
border-bottom: solid 1px #dfe2e7;
padding: 15px 15px 15px 30px;
zoom: 1;
line-height: 20px;
position: relative;
}
.header:before,
.header:after {
content: "";
display: table;
}
.header:after {
clear: both;
}
.header .left {
float: left;
}
.header .right {
text-align: right;
position: absolute;
right: 15px;
top: 15px;
}
.header .right iframe {
display: inline-block;
vertical-align: middle;
}
.header h1 {
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
font-weight: bold;
font-family: montserrat, sans-serif;
font-size: 13px;
}
.header h1,
.header h1 a,
.header h1 a:visited {
color: #9090aa;
}
.header h1 a:hover {
color: #505050;
}
.header li a {
font-size: 0.88em;
color: #9090aa;
display: block;
}
.header li a:hover {
color: #3a3a44;
}
@media (min-width: 480px) {
.header h1 {
float: left;
}
.header ul,
.header li {
display: block;
float: left;
}
.header ul {
margin-left: -15px;
}
.header h1 + ul {
border-left: solid 1px #dfe2e7;
margin-left: 15px;
}
.header li {
border-left: solid 1px rgba(255,255,255,0.5);
border-right: solid 1px #dfe2e7;
}
.header li:last-child {
border-right: 0;
}
.header li a {
padding: 0 15px;
}
}
@media (max-width: 480px) {
.right {
display: none;
}
}
.menubar {
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
}
.menubar .section {
padding: 30px 30px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.menubar .section + .section {
border-top: solid 1px #dfe2e7;
}
.menubar .section.no-line {
border-top: 0;
padding-top: 0;
}
a.big.button {
display: block;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
width: 100%;
padding: 10px 20px;
text-align: center;
font-weight: bold;
font-size: 1.1em;
background: transparent;
border: solid 3px #2badad;
-webkit-border-radius: 30px;
border-radius: 30px;
font-family: montserrat, sans-serif;
}
a.big.button,
a.big.button:visited {
color: #2badad;
text-decoration: none;
}
a.big.button:hover {
background: #2badad;
}
a.big.button:hover,
a.big.button:hover:visited {
color: #fff;
}
@media (max-width: 480px) {
.menubar {
padding: 20px;
border-bottom: solid 1px #dfe2e7;
}
}
@media (max-width: 768px) {
.menubar {
display: none;
}
}
@media (min-width: 768px) {
.content-root {
padding-left: 230px;
}
.menubar {
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 230px;
border-right: solid 1px #dfe2e7;
}
.menubar.fixed {
position: fixed;
overflow-y: auto;
}
.menubar.fixed {
-webkit-overflow-scrolling: touch;
}
.menubar.fixed::-webkit-scrollbar {
width: 15px;
height: 15px;
}
.menubar.fixed::-webkit-scrollbar-thumb {
background: #ddd;
-webkit-border-radius: 8px;
border-radius: 8px;
border: solid 4px #fff;
}
.menubar.fixed:hover::-webkit-scrollbar-thumb {
background: #999;
-webkit-box-shadow: inset 2px 2px 3px rgba(0,0,0,0.2);
box-shadow: inset 2px 2px 3px rgba(0,0,0,0.2);
}
}
.menubar {
font-size: 0.9em;
}
.menu ul.level-1 > li + li {
margin-top: 20px;
}
.menu a {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
position: relative;
display: block;
padding-top: 1px;
padding-bottom: 1px;
margin-right: -30px;
}
.menu a,
.menu a:visited {
color: #2badad;
}
.menu a:hover {
color: #228a8a;
}
.menu a.level-1 {
font-family: montserrat, sans-serif;
text-transform: uppercase;
font-size: 0.9em;
font-weight: bold;
}
.menu a.level-1,
.menu a.level-1:visited {
color: #9090aa;
}
.menu a.level-1:hover {
color: #565666;
}
.menu a.level-2 {
font-weight: normal;
}
.menu a.level-3 {
font-weight: normal;
font-size: 0.9em;
padding-left: 10px;
}
.menu a.active {
font-weight: bold !important;
}
.menu a.active,
.menu a.active:visited,
.menu a.active:hover {
color: #505050 !important;
}
.menu a.active:after {
content: '';
display: block;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
position: absolute;
top: 10px;
right: 30px;
width: 9px;
height: 3px;
-webkit-border-radius: 2px;
border-radius: 2px;
background: #2badad;
}
code .string,
code .number {
color: #3ac;
}
code .init {
color: #383;
}
code .keyword {
font-weight: bold;
}
code .comment {
color: #adadcc;
}
.large-brief .content > h1:first-child + p,
.content > p.brief {
font-size: 1.3em;
font-family: Open Sans, sans-serif;
font-weight: 300;
}
.title-area {
min-height: 100px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
text-align: center;
border-bottom: solid 1px #dfe2e7;
overflow: hidden;
}
.title-area > img.bg {
z-index: 0;
position: absolute;
left: -9999px;
}
.title-area > div {
position: relative;
z-index: 1;
}