mirror of
https://github.com/danbulant/api_docs
synced 2026-05-19 04:08:40 +00:00
Merge pull request #281 from tripit/dev
Slate v1.2
holy moly that's a lot of changes! 👍
This commit is contained in:
commit
7f873ca9e0
31 changed files with 359 additions and 129 deletions
|
|
@ -1,3 +1,9 @@
|
|||
sudo: false
|
||||
|
||||
language: ruby
|
||||
|
||||
rvm:
|
||||
- 1.9.3
|
||||
- 2.0.0
|
||||
|
||||
cache: bundler
|
||||
|
|
|
|||
19
CHANGELOG.md
19
CHANGELOG.md
|
|
@ -1,5 +1,24 @@
|
|||
# Changelog
|
||||
|
||||
## Version 1.2
|
||||
|
||||
*June 20, 2014*
|
||||
|
||||
**Fixes:**
|
||||
|
||||
- Remove crash on invalid languages
|
||||
- Update Tocify to scroll to the highlighted header in the Table of Contents
|
||||
- Fix variable leak and update search algorithms
|
||||
- Update Python examples to be valid Python
|
||||
- Update gems
|
||||
- More misc. bugfixes of Javascript errors
|
||||
- Add Dockerfile
|
||||
- Remove unused gems
|
||||
- Optimize images, fonts, and generated asset files
|
||||
- Add chinese font support
|
||||
- Remove RedCarpet header ID patch
|
||||
- Update language tabs to not disturb existing query strings
|
||||
|
||||
## Version 1.1
|
||||
|
||||
*July 27th, 2014*
|
||||
|
|
|
|||
7
Gemfile
7
Gemfile
|
|
@ -1,11 +1,12 @@
|
|||
source 'http://rubygems.org'
|
||||
source 'https://rubygems.org'
|
||||
|
||||
# Middleman
|
||||
gem 'middleman', '~>3.3.10'
|
||||
gem 'middleman-gh-pages', '~> 0.0.3'
|
||||
gem 'middleman-syntax', '~> 2.0.0'
|
||||
gem 'rouge', '~> 1.8.0'
|
||||
gem 'redcarpet', '~> 3.2.2'
|
||||
gem 'middleman-autoprefixer', '~> 2.4.4'
|
||||
gem 'rouge', '~> 1.9.0'
|
||||
gem 'redcarpet', '~> 3.3.1'
|
||||
|
||||
gem 'rake', '~> 10.4.2'
|
||||
gem 'therubyracer', '~> 0.12.1', platforms: :ruby
|
||||
|
|
|
|||
39
Gemfile.lock
39
Gemfile.lock
|
|
@ -1,12 +1,15 @@
|
|||
GEM
|
||||
remote: http://rubygems.org/
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
activesupport (4.1.10)
|
||||
activesupport (4.1.11)
|
||||
i18n (~> 0.6, >= 0.6.9)
|
||||
json (~> 1.7, >= 1.7.7)
|
||||
minitest (~> 5.1)
|
||||
thread_safe (~> 0.1)
|
||||
tzinfo (~> 1.1)
|
||||
autoprefixer-rails (5.2.0.1)
|
||||
execjs
|
||||
json
|
||||
celluloid (0.16.0)
|
||||
timers (~> 4.0.0)
|
||||
chunky_png (1.3.4)
|
||||
|
|
@ -36,25 +39,28 @@ GEM
|
|||
hooks (0.4.0)
|
||||
uber (~> 0.0.4)
|
||||
i18n (0.7.0)
|
||||
json (1.8.2)
|
||||
json (1.8.3)
|
||||
kramdown (1.7.0)
|
||||
libv8 (3.16.14.7)
|
||||
listen (2.10.0)
|
||||
listen (2.10.1)
|
||||
celluloid (~> 0.16.0)
|
||||
rb-fsevent (>= 0.9.3)
|
||||
rb-inotify (>= 0.9)
|
||||
middleman (3.3.11)
|
||||
middleman (3.3.12)
|
||||
coffee-script (~> 2.2)
|
||||
compass (>= 1.0.0, < 2.0.0)
|
||||
compass-import-once (= 1.0.5)
|
||||
execjs (~> 2.0)
|
||||
haml (>= 4.0.5)
|
||||
kramdown (~> 1.2)
|
||||
middleman-core (= 3.3.11)
|
||||
middleman-core (= 3.3.12)
|
||||
middleman-sprockets (>= 3.1.2)
|
||||
sass (>= 3.4.0, < 4.0)
|
||||
uglifier (~> 2.5)
|
||||
middleman-core (3.3.11)
|
||||
middleman-autoprefixer (2.4.4)
|
||||
autoprefixer-rails (~> 5.2.0)
|
||||
middleman-core (>= 3.3.3)
|
||||
middleman-core (3.3.12)
|
||||
activesupport (~> 4.1.0)
|
||||
bundler (~> 1.1)
|
||||
erubis
|
||||
|
|
@ -76,25 +82,25 @@ GEM
|
|||
middleman-syntax (2.0.0)
|
||||
middleman-core (~> 3.2)
|
||||
rouge (~> 1.0)
|
||||
minitest (5.6.1)
|
||||
multi_json (1.11.0)
|
||||
minitest (5.7.0)
|
||||
multi_json (1.11.1)
|
||||
padrino-helpers (0.12.5)
|
||||
i18n (~> 0.6, >= 0.6.7)
|
||||
padrino-support (= 0.12.5)
|
||||
tilt (~> 1.4.1)
|
||||
padrino-support (0.12.5)
|
||||
activesupport (>= 3.1)
|
||||
rack (1.6.0)
|
||||
rack (1.6.4)
|
||||
rack-test (0.6.3)
|
||||
rack (>= 1.0)
|
||||
rake (10.4.2)
|
||||
rb-fsevent (0.9.4)
|
||||
rb-fsevent (0.9.5)
|
||||
rb-inotify (0.9.5)
|
||||
ffi (>= 0.5.0)
|
||||
redcarpet (3.2.3)
|
||||
redcarpet (3.3.1)
|
||||
ref (1.0.5)
|
||||
rouge (1.8.0)
|
||||
sass (3.4.13)
|
||||
rouge (1.9.0)
|
||||
sass (3.4.14)
|
||||
sprockets (2.12.3)
|
||||
hike (~> 1.2)
|
||||
multi_json (~> 1.0)
|
||||
|
|
@ -125,9 +131,10 @@ PLATFORMS
|
|||
|
||||
DEPENDENCIES
|
||||
middleman (~> 3.3.10)
|
||||
middleman-autoprefixer (~> 2.4.4)
|
||||
middleman-gh-pages (~> 0.0.3)
|
||||
middleman-syntax (~> 2.0.0)
|
||||
rake (~> 10.4.2)
|
||||
redcarpet (~> 3.2.2)
|
||||
rouge (~> 1.8.0)
|
||||
redcarpet (~> 3.3.1)
|
||||
rouge (~> 1.9.0)
|
||||
therubyracer (~> 0.12.1)
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ Just [submit a issue](https://github.com/tripit/slate/issues) to the Slate Githu
|
|||
Contributors
|
||||
--------------------
|
||||
|
||||
Slate was built by [Robert Lord](http://lord.io) while at [TripIt](http://tripit.com).
|
||||
Slate was built by [Robert Lord](https://lord.io) while at [TripIt](http://tripit.com).
|
||||
|
||||
Thanks to the following people who have submitted major pull requests:
|
||||
|
||||
|
|
|
|||
3
Rakefile
3
Rakefile
|
|
@ -1,3 +1,6 @@
|
|||
require 'middleman-gh-pages'
|
||||
require 'rake/clean'
|
||||
|
||||
CLOBBER.include('build')
|
||||
|
||||
task :default => [:build]
|
||||
|
|
|
|||
|
|
@ -18,6 +18,12 @@ set :fonts_dir, 'fonts'
|
|||
# Activate the syntax highlighter
|
||||
activate :syntax
|
||||
|
||||
activate :autoprefixer do |config|
|
||||
config.browsers = ['last 2 version', 'Firefox ESR']
|
||||
config.cascade = false
|
||||
config.inline = true
|
||||
end
|
||||
|
||||
# Github pages require relative links
|
||||
activate :relative_assets
|
||||
set :relative_links, true
|
||||
|
|
|
|||
148
font-selection.json
Executable file
148
font-selection.json
Executable file
|
|
@ -0,0 +1,148 @@
|
|||
{
|
||||
"IcoMoonType": "selection",
|
||||
"icons": [
|
||||
{
|
||||
"icon": {
|
||||
"paths": [
|
||||
"M438.857 73.143q119.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 785.714v-108.571q0-8-5.143-13.429t-12.571-5.429h-109.714q-7.429 0-13.143 5.714t-5.714 13.143v108.571q0 7.429 5.714 13.143t13.143 5.714h109.714q7.429 0 12.571-5.429t5.143-13.429zM510.857 589.143l10.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"
|
||||
],
|
||||
"attrs": [],
|
||||
"isMulticolor": false,
|
||||
"tags": [
|
||||
"exclamation-circle"
|
||||
],
|
||||
"defaultCode": 61546,
|
||||
"grid": 14
|
||||
},
|
||||
"attrs": [],
|
||||
"properties": {
|
||||
"id": 100,
|
||||
"order": 4,
|
||||
"prevSize": 28,
|
||||
"code": 58880,
|
||||
"name": "exclamation-sign",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"iconIdx": 0
|
||||
},
|
||||
{
|
||||
"icon": {
|
||||
"paths": [
|
||||
"M585.143 786.286v-91.429q0-8-5.143-13.143t-13.143-5.143h-54.857v-292.571q0-8-5.143-13.143t-13.143-5.143h-182.857q-8 0-13.143 5.143t-5.143 13.143v91.429q0 8 5.143 13.143t13.143 5.143h54.857v182.857h-54.857q-8 0-13.143 5.143t-5.143 13.143v91.429q0 8 5.143 13.143t13.143 5.143h256q8 0 13.143-5.143t5.143-13.143zM512 274.286v-91.429q0-8-5.143-13.143t-13.143-5.143h-109.714q-8 0-13.143 5.143t-5.143 13.143v91.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"
|
||||
],
|
||||
"attrs": [],
|
||||
"isMulticolor": false,
|
||||
"tags": [
|
||||
"info-circle"
|
||||
],
|
||||
"defaultCode": 61530,
|
||||
"grid": 14
|
||||
},
|
||||
"attrs": [],
|
||||
"properties": {
|
||||
"id": 85,
|
||||
"order": 3,
|
||||
"name": "info-sign",
|
||||
"prevSize": 28,
|
||||
"code": 58882
|
||||
},
|
||||
"setIdx": 0,
|
||||
"iconIdx": 2
|
||||
},
|
||||
{
|
||||
"icon": {
|
||||
"paths": [
|
||||
"M733.714 419.429q0-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"
|
||||
],
|
||||
"attrs": [],
|
||||
"isMulticolor": false,
|
||||
"tags": [
|
||||
"check-circle"
|
||||
],
|
||||
"defaultCode": 61528,
|
||||
"grid": 14
|
||||
},
|
||||
"attrs": [],
|
||||
"properties": {
|
||||
"id": 83,
|
||||
"order": 9,
|
||||
"prevSize": 28,
|
||||
"code": 58886,
|
||||
"name": "ok-sign"
|
||||
},
|
||||
"setIdx": 0,
|
||||
"iconIdx": 6
|
||||
},
|
||||
{
|
||||
"icon": {
|
||||
"paths": [
|
||||
"M658.286 475.429q0-105.714-75.143-180.857t-180.857-75.143-180.857 75.143-75.143 180.857 75.143 180.857 180.857 75.143 180.857-75.143 75.143-180.857zM950.857 950.857q0 29.714-21.714 51.429t-51.429 21.714q-30.857 0-51.429-21.714l-196-195.429q-102.286 70.857-228 70.857-81.714 0-156.286-31.714t-128.571-85.714-85.714-128.571-31.714-156.286 31.714-156.286 85.714-128.571 128.571-85.714 156.286-31.714 156.286 31.714 128.571 85.714 85.714 128.571 31.714 156.286q0 125.714-70.857 228l196 196q21.143 21.143 21.143 51.429z"
|
||||
],
|
||||
"width": 951,
|
||||
"attrs": [],
|
||||
"isMulticolor": false,
|
||||
"tags": [
|
||||
"search"
|
||||
],
|
||||
"defaultCode": 61442,
|
||||
"grid": 14
|
||||
},
|
||||
"attrs": [],
|
||||
"properties": {
|
||||
"id": 2,
|
||||
"order": 1,
|
||||
"prevSize": 28,
|
||||
"code": 58887,
|
||||
"name": "icon-search"
|
||||
},
|
||||
"setIdx": 0,
|
||||
"iconIdx": 7
|
||||
}
|
||||
],
|
||||
"height": 1024,
|
||||
"metadata": {
|
||||
"name": "slate",
|
||||
"license": "SIL OFL 1.1"
|
||||
},
|
||||
"preferences": {
|
||||
"showGlyphs": true,
|
||||
"showQuickUse": true,
|
||||
"showQuickUse2": true,
|
||||
"showSVGs": true,
|
||||
"fontPref": {
|
||||
"prefix": "icon-",
|
||||
"metadata": {
|
||||
"fontFamily": "slate",
|
||||
"majorVersion": 1,
|
||||
"minorVersion": 0,
|
||||
"description": "Based on FontAwesome",
|
||||
"license": "SIL OFL 1.1"
|
||||
},
|
||||
"metrics": {
|
||||
"emSize": 1024,
|
||||
"baseline": 6.25,
|
||||
"whitespace": 50
|
||||
},
|
||||
"resetPoint": 58880,
|
||||
"showSelector": false,
|
||||
"selector": "class",
|
||||
"classSelector": ".icon",
|
||||
"showMetrics": false,
|
||||
"showMetadata": true,
|
||||
"showVersion": true,
|
||||
"ie7": false
|
||||
},
|
||||
"imagePref": {
|
||||
"prefix": "icon-",
|
||||
"png": true,
|
||||
"useClassSelector": true,
|
||||
"color": 4473924,
|
||||
"bgColor": 16777215
|
||||
},
|
||||
"historySize": 100,
|
||||
"showCodes": true,
|
||||
"gridSize": 16,
|
||||
"showLiga": false
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
|
@ -1,18 +0,0 @@
|
|||
<?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="512">
|
||||
<font-face units-per-em="512" ascent="480" descent="-32" />
|
||||
<missing-glyph horiz-adv-x="512" />
|
||||
<glyph unicode=" " d="" horiz-adv-x="256" />
|
||||
<glyph unicode="" d="M219.429 475.428q59.715 0 110.143-29.428t79.857-79.857 29.428-110.143-29.428-110.143-79.857-79.857-110.143-29.428-110.143 29.428-79.857 79.857-29.428 110.143 29.428 110.143 79.857 79.857 110.143 29.428zM256 119.143v54.286q0 4-2.571 6.714t-6.286 2.714h-54.857q-3.714 0-6.572-2.857t-2.857-6.572v-54.286q0-3.714 2.857-6.572t6.572-2.857h54.857q3.714 0 6.286 2.714t2.571 6.714zM255.429 217.428l5.143 177.428q0 3.429-2.857 5.143-2.857 2.286-6.857 2.286h-62.857q-4 0-6.857-2.286-2.857-1.714-2.857-5.143l4.857-177.428q0-2.857 2.857-5t6.857-2.143h52.857q4 0 6.714 2.143t3 5z" horiz-adv-x="439" />
|
||||
<glyph unicode="" d="M256 118.857v54.857q0 4-2.571 6.572t-6.571 2.572h-54.857q-4 0-6.571-2.572t-2.571-6.572v-54.857q0-4 2.571-6.572t6.572-2.572h54.857q4 0 6.571 2.572t2.572 6.572zM329.143 310.857q0 25.143-15.857 46.572t-39.572 33.143-48.572 11.714q-69.428 0-106-60.857-4.285-6.857 2.285-12l37.715-28.571q2-1.714 5.428-1.714 4.572 0 7.143 3.428 15.143 19.429 24.571 26.286 9.714 6.857 24.572 6.857 13.714 0 24.428-7.429t10.714-16.857q0-10.857-5.714-17.428t-19.428-12.857q-18-8-33-24.715t-15-35.857v-10.286q0-4 2.571-6.572t6.571-2.572h54.857q4 0 6.571 2.572t2.572 6.572q0 5.428 6.143 14.143t15.572 14.143q9.143 5.143 14 8.143t13.143 10 12.714 13.714 8 17.286 3.572 23.143zM438.857 256q0-59.714-29.428-110.143t-79.857-79.857-110.143-29.428-110.143 29.428-79.857 79.857-29.428 110.143 29.428 110.143 79.857 79.857 110.143 29.428 110.143-29.428 79.857-79.857 29.428-110.143z" horiz-adv-x="439" />
|
||||
<glyph unicode="" d="M292.572 118.857v45.714q0 4-2.572 6.572t-6.572 2.572h-27.428v146.286q0 4-2.571 6.572t-6.571 2.571h-91.428q-4 0-6.572-2.571t-2.571-6.572v-45.714q0-4 2.571-6.572t6.572-2.572h27.428v-91.428h-27.428q-4 0-6.572-2.572t-2.571-6.572v-45.714q0-4 2.571-6.572t6.572-2.572h128q4 0 6.572 2.572t2.572 6.572zM256 374.857v45.715q0 4-2.571 6.572t-6.571 2.571h-54.857q-4 0-6.571-2.571t-2.571-6.572v-45.715q0-4 2.571-6.571t6.572-2.572h54.857q4 0 6.571 2.572t2.572 6.571zM438.857 256q0-59.714-29.428-110.143t-79.857-79.857-110.143-29.428-110.143 29.428-79.857 79.857-29.428 110.143 29.428 110.143 79.857 79.857 110.143 29.428 110.143-29.428 79.857-79.857 29.428-110.143z" horiz-adv-x="439" />
|
||||
<glyph unicode="" d="M328.286 191.428q0 7.428-5.428 12.857l-51.714 51.714 51.714 51.714q5.428 5.428 5.428 12.857 0 7.715-5.428 13.143l-25.714 25.714q-5.428 5.429-13.143 5.429-7.428 0-12.857-5.429l-51.714-51.714-51.714 51.714q-5.428 5.429-12.857 5.429-7.714 0-13.143-5.429l-25.715-25.714q-5.428-5.428-5.428-13.143 0-7.428 5.428-12.857l51.715-51.714-51.715-51.714q-5.428-5.428-5.428-12.857 0-7.714 5.428-13.143l25.715-25.714q5.428-5.428 13.143-5.428 7.429 0 12.857 5.428l51.714 51.714 51.714-51.714q5.428-5.428 12.857-5.428 7.714 0 13.143 5.428l25.714 25.714q5.428 5.428 5.428 13.143zM438.857 256q0-59.714-29.428-110.143t-79.857-79.857-110.143-29.428-110.143 29.428-79.857 79.857-29.428 110.143 29.428 110.143 79.857 79.857 110.143 29.428 110.143-29.428 79.857-79.857 29.428-110.143z" horiz-adv-x="439" />
|
||||
<glyph unicode="" d="M347.428 237.714v36.572q0 7.428-5.428 12.857t-12.857 5.428h-73.143v73.143q0 7.428-5.428 12.857t-12.857 5.428h-36.571q-7.428 0-12.857-5.428t-5.429-12.857v-73.143h-73.143q-7.428 0-12.857-5.428t-5.428-12.857v-36.572q0-7.428 5.428-12.857t12.857-5.429h73.143v-73.143q0-7.428 5.428-12.857t12.857-5.428h36.571q7.428 0 12.857 5.428t5.429 12.857v73.143h73.143q7.428 0 12.857 5.428t5.428 12.857zM438.857 256q0-59.714-29.428-110.143t-79.857-79.857-110.143-29.428-110.143 29.428-79.857 79.857-29.428 110.143 29.428 110.143 79.857 79.857 110.143 29.428 110.143-29.428 79.857-79.857 29.428-110.143z" horiz-adv-x="439" />
|
||||
<glyph unicode="" d="M347.428 237.714v36.572q0 7.428-5.428 12.857t-12.857 5.428h-219.429q-7.428 0-12.857-5.428t-5.428-12.857v-36.572q0-7.428 5.428-12.857t12.857-5.429h219.429q7.428 0 12.857 5.428t5.428 12.857zM438.857 256q0-59.714-29.428-110.143t-79.857-79.857-110.143-29.428-110.143 29.428-79.857 79.857-29.428 110.143 29.428 110.143 79.857 79.857 110.143 29.428 110.143-29.428 79.857-79.857 29.428-110.143z" horiz-adv-x="439" />
|
||||
<glyph unicode="" d="M366.857 302.286q0 8-5.143 13.143l-26 25.715q-5.428 5.428-12.857 5.428t-12.857-5.428l-116.572-116.286-64.572 64.572q-5.428 5.428-12.857 5.428t-12.857-5.428l-26-25.714q-5.143-5.143-5.143-13.143 0-7.714 5.143-12.857l103.428-103.428q5.428-5.428 12.857-5.428 7.714 0 13.143 5.428l155.143 155.143q5.143 5.143 5.143 12.857zM438.857 256q0-59.714-29.428-110.143t-79.857-79.857-110.143-29.428-110.143 29.428-79.857 79.857-29.428 110.143 29.428 110.143 79.857 79.857 110.143 29.428 110.143-29.428 79.857-79.857 29.428-110.143z" horiz-adv-x="439" />
|
||||
<glyph unicode="" d="M496.131 44.302l-121.276 103.147c-12.537 11.283-25.945 16.463-36.776 15.963 28.628 33.534 45.921 77.039 45.921 124.588 0 106.039-85.961 192-192 192-106.038 0-192-85.961-192-192 0-106.039 85.961-192 192-192 47.549 0 91.054 17.293 124.588 45.922-0.5-10.831 4.68-24.239 15.963-36.776l103.147-121.276c17.661-19.623 46.511-21.277 64.11-3.678s15.946 46.449-3.677 64.11zM192 160c-70.692 0-128 57.308-128 128s57.308 128 128 128 128-57.308 128-128-57.307-128-128-128z" />
|
||||
</font></defs></svg>
|
||||
|
Before Width: | Height: | Size: 5.5 KiB |
Binary file not shown.
Binary file not shown.
BIN
source/fonts/slate.eot
Executable file
BIN
source/fonts/slate.eot
Executable file
Binary file not shown.
14
source/fonts/slate.svg
Executable file
14
source/fonts/slate.svg
Executable file
|
|
@ -0,0 +1,14 @@
|
|||
<?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="slate" horiz-adv-x="1024">
|
||||
<font-face units-per-em="1024" ascent="960" descent="-64" />
|
||||
<missing-glyph horiz-adv-x="1024" />
|
||||
<glyph unicode=" " d="" horiz-adv-x="512" />
|
||||
<glyph unicode="" d="M438.857 877.714q119.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 165.143v108.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 361.714l10.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" />
|
||||
<glyph unicode="" d="M585.143 164.571v91.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 676.571v91.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 438.857q0-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" />
|
||||
<glyph unicode="" d="M733.714 531.428q0 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 438.857q0-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" />
|
||||
<glyph unicode="" d="M658.286 475.428q0 105.714-75.143 180.857t-180.857 75.143-180.857-75.143-75.143-180.857 75.143-180.857 180.857-75.143 180.857 75.143 75.143 180.857zM950.857 0q0-29.714-21.714-51.429t-51.429-21.714q-30.857 0-51.429 21.714l-196 195.429q-102.286-70.857-228-70.857-81.714 0-156.286 31.714t-128.571 85.714-85.714 128.571-31.714 156.286 31.714 156.286 85.714 128.571 128.571 85.714 156.286 31.714 156.286-31.714 128.571-85.714 85.714-128.571 31.714-156.286q0-125.714-70.857-228l196-196q21.143-21.143 21.143-51.429z" horiz-adv-x="951" />
|
||||
</font></defs></svg>
|
||||
|
After Width: | Height: | Size: 2.9 KiB |
BIN
source/fonts/slate.ttf
Executable file
BIN
source/fonts/slate.ttf
Executable file
Binary file not shown.
BIN
source/fonts/slate.woff
Executable file
BIN
source/fonts/slate.woff
Executable file
Binary file not shown.
BIN
source/fonts/slate.woff2
Executable file
BIN
source/fonts/slate.woff2
Executable file
Binary file not shown.
|
|
@ -106,7 +106,7 @@ This endpoint retrieves all kittens.
|
|||
|
||||
### HTTP Request
|
||||
|
||||
`GET http://example.com/kittens`
|
||||
`GET http://example.com/api/kittens`
|
||||
|
||||
### Query Parameters
|
||||
|
||||
|
|
@ -136,7 +136,7 @@ api.kittens.get(2)
|
|||
```
|
||||
|
||||
```shell
|
||||
curl "http://example.com/api/kittens/3"
|
||||
curl "http://example.com/api/kittens/2"
|
||||
-H "Authorization: meowmeowmeow"
|
||||
```
|
||||
|
||||
|
|
@ -164,5 +164,5 @@ This endpoint retrieves a specific kitten.
|
|||
|
||||
Parameter | Description
|
||||
--------- | -----------
|
||||
ID | The ID of the cat to retrieve
|
||||
ID | The ID of the kitten to retrieve
|
||||
|
||||
|
|
|
|||
|
|
@ -1,2 +1,4 @@
|
|||
//= require_tree ./lib
|
||||
//= require_tree ./app
|
||||
//= require ./lib/_energize
|
||||
//= require ./app/_lang
|
||||
//= require ./app/_search
|
||||
//= require ./app/_toc
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
//= require_tree ./lib
|
||||
//= require_tree ./app
|
||||
//= stub ./app/search.js
|
||||
//= stub ./lib/lunr.js
|
||||
//= require ./lib/_energize
|
||||
//= require ./app/_lang
|
||||
//= require ./app/_toc
|
||||
|
|
|
|||
|
|
@ -40,6 +40,80 @@ under the License.
|
|||
}
|
||||
}
|
||||
|
||||
// parseURL and stringifyURL are from https://github.com/sindresorhus/query-string
|
||||
// MIT licensed
|
||||
// https://github.com/sindresorhus/query-string/blob/7bee64c16f2da1a326579e96977b9227bf6da9e6/license
|
||||
function parseURL(str) {
|
||||
if (typeof str !== 'string') {
|
||||
return {};
|
||||
}
|
||||
|
||||
str = str.trim().replace(/^(\?|#|&)/, '');
|
||||
|
||||
if (!str) {
|
||||
return {};
|
||||
}
|
||||
|
||||
return str.split('&').reduce(function (ret, param) {
|
||||
var parts = param.replace(/\+/g, ' ').split('=');
|
||||
var key = parts[0];
|
||||
var val = parts[1];
|
||||
|
||||
key = decodeURIComponent(key);
|
||||
// missing `=` should be `null`:
|
||||
// http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters
|
||||
val = val === undefined ? null : decodeURIComponent(val);
|
||||
|
||||
if (!ret.hasOwnProperty(key)) {
|
||||
ret[key] = val;
|
||||
} else if (Array.isArray(ret[key])) {
|
||||
ret[key].push(val);
|
||||
} else {
|
||||
ret[key] = [ret[key], val];
|
||||
}
|
||||
|
||||
return ret;
|
||||
}, {});
|
||||
};
|
||||
|
||||
function stringifyURL(obj) {
|
||||
return obj ? Object.keys(obj).sort().map(function (key) {
|
||||
var val = obj[key];
|
||||
|
||||
if (Array.isArray(val)) {
|
||||
return val.sort().map(function (val2) {
|
||||
return encodeURIComponent(key) + '=' + encodeURIComponent(val2);
|
||||
}).join('&');
|
||||
}
|
||||
|
||||
return encodeURIComponent(key) + '=' + encodeURIComponent(val);
|
||||
}).join('&') : '';
|
||||
};
|
||||
|
||||
// gets the language set in the query string
|
||||
function getLanguageFromQueryString() {
|
||||
if (location.search.length >= 1) {
|
||||
var language = parseURL(location.search).language
|
||||
if (language) {
|
||||
return language;
|
||||
} else if (jQuery.inArray(location.search.substr(1), languages) != -1) {
|
||||
return location.search.substr(1);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// returns a new query string with the new language in it
|
||||
function generateNewQueryString(language) {
|
||||
var url = parseURL(location.search);
|
||||
if (url.language) {
|
||||
url.language = language;
|
||||
return stringifyURL(url);
|
||||
}
|
||||
return language;
|
||||
}
|
||||
|
||||
// if a button is clicked, add the state to the history
|
||||
function pushURL(language) {
|
||||
if (!history) { return; }
|
||||
|
|
@ -47,23 +121,23 @@ under the License.
|
|||
if (hash) {
|
||||
hash = hash.replace(/^#+/, '');
|
||||
}
|
||||
history.pushState({}, '', '?' + language + '#' + hash);
|
||||
history.pushState({}, '', '?' + generateNewQueryString(language) + '#' + hash);
|
||||
|
||||
// save language as next default
|
||||
localStorage.setItem("language", language);
|
||||
}
|
||||
|
||||
function setupLanguages(l) {
|
||||
var currentLanguage = l[0];
|
||||
var defaultLanguage = localStorage.getItem("language");
|
||||
|
||||
languages = l;
|
||||
|
||||
if ((location.search.substr(1) !== "") && (jQuery.inArray(location.search.substr(1), languages)) != -1) {
|
||||
var presetLanguage = getLanguageFromQueryString();
|
||||
if (presetLanguage) {
|
||||
// the language is in the URL, so use that language!
|
||||
activateLanguage(location.search.substr(1));
|
||||
activateLanguage(presetLanguage);
|
||||
|
||||
localStorage.setItem("language", location.search.substr(1));
|
||||
localStorage.setItem("language", presetLanguage);
|
||||
} else if ((defaultLanguage !== null) && (jQuery.inArray(defaultLanguage, languages) != -1)) {
|
||||
// the language was the last selected one saved in localstorage, so use that language!
|
||||
activateLanguage(defaultLanguage);
|
||||
|
|
@ -81,8 +155,8 @@ under the License.
|
|||
activateLanguage(language);
|
||||
return false;
|
||||
});
|
||||
window.onpopstate = function(event) {
|
||||
activateLanguage(window.location.search.substr(1));
|
||||
window.onpopstate = function() {
|
||||
activateLanguage(getLanguageFromQueryString());
|
||||
};
|
||||
});
|
||||
})(window);
|
||||
|
|
@ -1,8 +1,9 @@
|
|||
(function (global) {
|
||||
//= require ../lib/_lunr
|
||||
//= require ../lib/_jquery.highlight
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
var $global = $(global);
|
||||
var content, darkBox, searchResults;
|
||||
var content, searchResults;
|
||||
var highlightOpts = { element: 'span', className: 'search-highlight' };
|
||||
|
||||
var index = new lunr.Index();
|
||||
|
|
@ -29,7 +30,6 @@
|
|||
|
||||
function bind() {
|
||||
content = $('.content');
|
||||
darkBox = $('.dark-box');
|
||||
searchResults = $('.search-results');
|
||||
|
||||
$('#input-search').on('keyup', search);
|
||||
|
|
@ -56,7 +56,7 @@
|
|||
highlight.call(this);
|
||||
} else {
|
||||
searchResults.html('<li></li>');
|
||||
$('.search-results li').text('No Results Found for "' + this.value + '"');
|
||||
$('.search-results li').text('No Results Found for "' + this.value + '"');
|
||||
}
|
||||
} else {
|
||||
unhighlight();
|
||||
|
|
@ -71,5 +71,4 @@
|
|||
function unhighlight() {
|
||||
content.unhighlight(highlightOpts);
|
||||
}
|
||||
|
||||
})(window);
|
||||
})();
|
||||
|
|
@ -1,3 +1,5 @@
|
|||
//= require ../lib/_jquery_ui
|
||||
//= require ../lib/_jquery.tocify
|
||||
(function (global) {
|
||||
'use strict';
|
||||
|
||||
|
|
@ -1,4 +1,3 @@
|
|||
//= require ./jquery_ui
|
||||
/* jquery Tocify - v1.8.0 - 2013-09-16
|
||||
* http://www.gregfranko.com/jquery.tocify.js/
|
||||
* Copyright (c) 2013 Greg Franko; Licensed MIT
|
||||
|
|
@ -1040,4 +1039,4 @@
|
|||
|
||||
});
|
||||
|
||||
})); //end of plugin
|
||||
})); //end of plugin
|
||||
|
|
@ -1,16 +1,17 @@
|
|||
@font-face {
|
||||
font-family: 'icomoon';
|
||||
src:font-url('icomoon.eot');
|
||||
src:font-url('icomoon.eot?#iefix') format('embedded-opentype'),
|
||||
font-url('icomoon.ttf') format('truetype'),
|
||||
font-url('icomoon.woff') format('woff'),
|
||||
font-url('icomoon.svg#icomoon') format('svg');
|
||||
font-family: 'slate';
|
||||
src:font-url('slate.eot?-syv14m');
|
||||
src:font-url('slate.eot?#iefix-syv14m') format('embedded-opentype'),
|
||||
font-url('slate.woff2?-syv14m') format('woff2'),
|
||||
font-url('slate.woff?-syv14m') format('woff'),
|
||||
font-url('slate.ttf?-syv14m') format('truetype'),
|
||||
font-url('slate.svg?-syv14m#slate') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
%icon {
|
||||
font-family: 'icomoon';
|
||||
font-family: 'slate';
|
||||
speak: none;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
|
|
@ -23,26 +24,10 @@
|
|||
@extend %icon;
|
||||
content: "\e600";
|
||||
}
|
||||
%icon-question-sign {
|
||||
@extend %icon;
|
||||
content: "\e601";
|
||||
}
|
||||
%icon-info-sign {
|
||||
@extend %icon;
|
||||
content: "\e602";
|
||||
}
|
||||
%icon-remove-sign {
|
||||
@extend %icon;
|
||||
content: "\e603";
|
||||
}
|
||||
%icon-plus-sign {
|
||||
@extend %icon;
|
||||
content: "\e604";
|
||||
}
|
||||
%icon-minus-sign {
|
||||
@extend %icon;
|
||||
content: "\e605";
|
||||
}
|
||||
%icon-ok-sign {
|
||||
@extend %icon;
|
||||
content: "\e606";
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ $phone-width: $tablet-width - $nav-width; // min width before reverting to mobil
|
|||
// FONTS
|
||||
////////////////////
|
||||
%default-font {
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, "Microsoft Yahei","微软雅黑", STXihei, "华文细黑", sans-serif;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
|
|
@ -100,13 +100,10 @@ $search-box-border-color: #666;
|
|||
// These settings are probably best left alone.
|
||||
|
||||
%break-words {
|
||||
-ms-word-break: break-all;
|
||||
word-break: break-all;
|
||||
|
||||
/* Non standard for webkit */
|
||||
word-break: break-word;
|
||||
|
||||
-webkit-hyphens: auto;
|
||||
-moz-hyphens: auto;
|
||||
hyphens: auto;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,25 +49,17 @@ html, body {
|
|||
}
|
||||
|
||||
@mixin embossed-bg {
|
||||
@include background(
|
||||
linear-gradient(top,
|
||||
rgba(#000, 0.2),
|
||||
rgba(#000, 0) 8px),
|
||||
linear-gradient(bottom,
|
||||
rgba(#000, 0.2),
|
||||
rgba(#000, 0) 8px),
|
||||
linear-gradient(top,
|
||||
rgba($nav-embossed-border-top, 1),
|
||||
rgba($nav-embossed-border-top, 0) 1.5px),
|
||||
linear-gradient(bottom,
|
||||
rgba($nav-embossed-border-bottom, 1),
|
||||
rgba($nav-embossed-border-bottom, 0) 1.5px),
|
||||
$nav-subitem-bg
|
||||
);
|
||||
background:
|
||||
linear-gradient(to bottom, rgba(#000, 0.2), rgba(#000, 0) 8px),
|
||||
linear-gradient(to top, rgba(#000, 0.2), rgba(#000, 0) 8px),
|
||||
linear-gradient(to bottom, rgba($nav-embossed-border-top, 1), rgba($nav-embossed-border-top, 0) 1.5px),
|
||||
linear-gradient(to top, rgba($nav-embossed-border-bottom, 1), rgba($nav-embossed-border-bottom, 0) 1.5px),
|
||||
$nav-subitem-bg;
|
||||
}
|
||||
|
||||
.tocify-wrapper {
|
||||
@include transition(left ease-in-out 0.3s);
|
||||
transition: left 0.3s ease-in-out;
|
||||
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
position: fixed;
|
||||
|
|
@ -102,7 +94,7 @@ html, body {
|
|||
border-width: 0 0 1px 0;
|
||||
border-color: $search-box-border-color;
|
||||
padding: 6px 0 6px 20px;
|
||||
@include box-sizing(border-box);
|
||||
box-sizing: border-box;
|
||||
margin: $nav-v-padding $nav-padding;
|
||||
width: $nav-width - 30;
|
||||
outline: none;
|
||||
|
|
@ -125,13 +117,13 @@ html, body {
|
|||
|
||||
.search-results {
|
||||
margin-top: 0;
|
||||
@include box-sizing(border-box);
|
||||
box-sizing: border-box;
|
||||
height: 0;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
@include transition-property(height margin);
|
||||
@include transition-duration(180ms);
|
||||
@include transition-timing-function(ease-in-out);
|
||||
transition-property: height, margin;
|
||||
transition-duration: 180ms;
|
||||
transition-timing-function: ease-in-out;
|
||||
&.visible {
|
||||
height: 30%;
|
||||
margin-bottom: 1em;
|
||||
|
|
@ -175,14 +167,14 @@ html, body {
|
|||
|
||||
li {
|
||||
color: $nav-text;
|
||||
@include transition-property('background');
|
||||
@include transition-timing-function('linear');
|
||||
@include transition-duration(230ms);
|
||||
transition-property: background;
|
||||
transition-timing-function: linear;
|
||||
transition-duration: 230ms;
|
||||
}
|
||||
|
||||
// This is the currently selected ToC entry
|
||||
.tocify-focus {
|
||||
@include box-shadow(0px 1px 0px $nav-active-shadow);
|
||||
box-shadow: 0px 1px 0px $nav-active-shadow;
|
||||
background-color: $nav-active-bg;
|
||||
color: $nav-active-text;
|
||||
}
|
||||
|
|
@ -235,8 +227,8 @@ html, body {
|
|||
$side-pad: $main-padding / 2 - 8px;
|
||||
padding: $side-pad $side-pad $side-pad;
|
||||
background-color: rgba($main-bg, 0.7);
|
||||
@include transform-origin(0, 0);
|
||||
@include transform(rotate(-90deg) translate(-100%, 0));
|
||||
transform-origin: 0 0;
|
||||
transform: rotate(-90deg) translate(-100%, 0);
|
||||
border-radius: 0 0 0 5px;
|
||||
}
|
||||
padding: 0 1.5em 5em 0; // increase touch size area
|
||||
|
|
@ -255,7 +247,7 @@ html, body {
|
|||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
@include transition(left ease-in-out 0.3s);
|
||||
transition: left 0.3s ease-in-out;
|
||||
|
||||
&:hover { opacity: 1; }
|
||||
&.open {left: $nav-width}
|
||||
|
|
@ -346,7 +338,7 @@ html, body {
|
|||
&>h1, &>h2, &>h3, &>h4, &>h5, &>h6, &>p, &>table, &>ul, &>ol, &>aside, &>dl {
|
||||
margin-right: $examples-width;
|
||||
padding: 0 $main-padding;
|
||||
@include box-sizing(border-box);
|
||||
box-sizing: border-box;
|
||||
display: block;
|
||||
@include text-shadow($main-embossed-text-shadow);
|
||||
|
||||
|
|
@ -371,9 +363,7 @@ html, body {
|
|||
margin-bottom: $h1-margin-bottom;
|
||||
margin-top: 2em;
|
||||
border-top: 1px solid #ddd;
|
||||
@include background-image(
|
||||
linear-gradient(top, #fff, #f9f9f9)
|
||||
);
|
||||
background-image: linear-gradient(to bottom, #fff, #f9f9f9);
|
||||
}
|
||||
|
||||
h1:first-child, div:first-child + h1 {
|
||||
|
|
@ -389,9 +379,7 @@ html, body {
|
|||
border-top: 1px solid #ccc;
|
||||
padding-top: 1.2em;
|
||||
padding-bottom: 1.2em;
|
||||
@include background-image(
|
||||
linear-gradient(top, rgba(#fff,0.4), rgba(#fff, 0))
|
||||
);
|
||||
background-image: linear-gradient(to bottom, rgba(#fff, 0.4), rgba(#fff, 0));
|
||||
}
|
||||
|
||||
// h2s right after h1s should bump right up
|
||||
|
|
@ -403,10 +391,9 @@ html, body {
|
|||
|
||||
h3, h4, h5, h6 {
|
||||
@extend %header-font;
|
||||
font-size: 12px;
|
||||
font-size: 15px;
|
||||
margin-top: 2.5em;
|
||||
margin-bottom: 0.8em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
h4, h5, h6 {
|
||||
|
|
@ -525,7 +512,7 @@ html, body {
|
|||
border-radius: 4px;
|
||||
border: 1px solid #F7E633;
|
||||
@include text-shadow(1px 1px 0 #666);
|
||||
@include background(linear-gradient(bottom right, #F7E633 0%, #F1D32F 100%));
|
||||
background: linear-gradient(to top left, #F7E633 0%, #F1D32F 100%);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -546,7 +533,7 @@ html, body {
|
|||
float:right;
|
||||
clear:right;
|
||||
|
||||
@include box-sizing(border-box);
|
||||
box-sizing: border-box;
|
||||
@include text-shadow(0px 1px 2px rgba(0,0,0,0.4));
|
||||
|
||||
@extend %right-col;
|
||||
|
|
|
|||
Loading…
Reference in a new issue