Skip to content
Browse files

New format for documentation

  • Loading branch information...
1 parent 7a93d74 commit 9081a0f8190084c004b9b49fca89f9e9637101ff Cesare Rocchi committed
Showing with 6,147 additions and 0 deletions.
  1. +29 −0 Gemfile
  2. +13 −0 LICENSE
  3. +5 −0 README.md
  4. +3 −0 Rakefile
  5. +36 −0 config.rb
  6. BIN source/fonts/icomoon.eot
  7. +17 −0 source/fonts/icomoon.svg
  8. BIN source/fonts/icomoon.ttf
  9. BIN source/fonts/icomoon.woff
  10. BIN source/images/Console_0.7.2/assets.png
  11. BIN source/images/Console_0.7.2/baasbox-db-management.png
  12. BIN source/images/Console_0.7.2/baasbox-documents-table.png
  13. BIN source/images/Console_0.7.2/baasbox_0-7-2-console.png
  14. BIN source/images/Console_0.7.2/collections.png
  15. BIN source/images/Console_0.7.2/create_new_collection.png
  16. BIN source/images/Console_0.7.2/create_new_user.png
  17. BIN source/images/Console_0.7.2/documents.png
  18. BIN source/images/Console_0.7.2/home_console.png
  19. BIN source/images/Console_0.7.2/image_resize.png
  20. BIN source/images/Console_0.7.2/login.png
  21. BIN source/images/Console_0.7.2/new_asset.png
  22. BIN source/images/Console_0.7.2/news.png
  23. BIN source/images/Console_0.7.2/settings.png
  24. BIN source/images/Console_0.7.2/social_login1.png
  25. BIN source/images/Console_0.7.2/social_login2.png
  26. BIN source/images/Console_0.7.2/users.png
  27. BIN source/images/Console_0.7.3/assets.png
  28. BIN source/images/Console_0.7.3/baasbox-db-management.png
  29. BIN source/images/Console_0.7.3/baasbox-documents-table.png
  30. BIN source/images/Console_0.7.3/baasbox_0-7-3-console.png
  31. BIN source/images/Console_0.7.3/collections.png
  32. BIN source/images/Console_0.7.3/create_new_collection.png
  33. BIN source/images/Console_0.7.3/create_new_user.png
  34. BIN source/images/Console_0.7.3/documents.png
  35. BIN source/images/Console_0.7.3/home_console.png
  36. BIN source/images/Console_0.7.3/login.png
  37. BIN source/images/Console_0.7.3/new_asset.png
  38. BIN source/images/Console_0.7.3/news.png
  39. BIN source/images/Console_0.7.3/settings.png
  40. BIN source/images/Console_0.7.3/social_login1.png
  41. BIN source/images/Console_0.7.3/social_login2.png
  42. BIN source/images/Console_0.7.3/users.png
  43. BIN source/images/logo.png
  44. +3,599 −0 source/index.md
  45. +2 −0 source/javascripts/all.js
  46. +1,025 −0 source/javascripts/jquery.tocify.js
  47. +6 −0 source/javascripts/jquery_ui.js
  48. +52 −0 source/javascripts/lang_selector.js
  49. +127 −0 source/layouts/layout.erb
  50. +95 −0 source/stylesheets/fix.css
  51. +50 −0 source/stylesheets/icon-font.scss
  52. +375 −0 source/stylesheets/normalize.css
  53. +110 −0 source/stylesheets/print.css.scss
  54. +470 −0 source/stylesheets/screen.css.scss
  55. +27 −0 source/stylesheets/syntax.css.scss.erb
  56. +106 −0 source/stylesheets/variables.scss
View
29 Gemfile
@@ -0,0 +1,29 @@
+# If you have OpenSSL installed, we recommend updating
+# the following line to use "https"
+source 'http://rubygems.org'
+
+gem "middleman", "~>3.2.0"
+
+# For syntax highlighting
+gem "middleman-syntax"
+
+# Plugin for middleman to generate Github pages
+gem 'middleman-gh-pages'
+
+# Live-reloading plugin
+gem "middleman-livereload", "~> 3.1.0"
+
+gem 'redcarpet', :git => 'https://github.com/vmg/redcarpet.git'
+
+# For faster file watcher updates on Windows:
+gem "wdm", "~> 0.1.0", :platforms => [:mswin, :mingw]
+
+# Failed to start middleman without this
+gem "therubyracer"
+
+# Cross-templating language block fix for Ruby 1.8
+platforms :mri_18 do
+ gem "ruby18_source_location"
+end
+
+gem "rake", "~> 10.1.0"
View
13 LICENSE
@@ -0,0 +1,13 @@
+Copyright 2008-2013 Concur Technologies, Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License"); you may
+not use this file except in compliance with the License. You may obtain
+a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+License for the specific language governing permissions and limitations
+under the License.
View
5 README.md
@@ -0,0 +1,5 @@
+docs
+====
+
+BaasBox documentation
+See: [http://docs.baasbox.com](http://docs.baasbox.com)
View
3 Rakefile
@@ -0,0 +1,3 @@
+require 'middleman-gh-pages'
+
+task :default => [:build]
View
36 config.rb
@@ -0,0 +1,36 @@
+set :css_dir, 'stylesheets'
+
+set :js_dir, 'javascripts'
+
+set :images_dir, 'images'
+
+set :fonts_dir, 'fonts'
+
+set :markdown_engine, :redcarpet
+
+set :markdown, :fenced_code_blocks => true, :smartypants => true, :disable_indented_code_blocks => true, :prettify => true, :tables => true, :with_toc_data => true, :no_intra_emphasis => true
+
+# Activate the syntax highlighter
+activate :syntax
+
+# This is needed for Github pages, since they're hosted on a subdomain
+activate :relative_assets
+set :relative_links, true
+
+# Build-specific configuration
+configure :build do
+ # For example, change the Compass output style for deployment
+ activate :minify_css
+
+ # Minify Javascript on build
+ activate :minify_javascript
+
+ # Enable cache buster
+ # activate :asset_hash
+
+ # Use relative URLs
+ # activate :relative_assets
+
+ # Or use a different image path
+ # set :http_prefix, "/Content/images/"
+end
View
BIN source/fonts/icomoon.eot
Binary file not shown.
View
17 source/fonts/icomoon.svg
@@ -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>
View
BIN source/fonts/icomoon.ttf
Binary file not shown.
View
BIN source/fonts/icomoon.woff
Binary file not shown.
View
BIN source/images/Console_0.7.2/assets.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN source/images/Console_0.7.2/baasbox-db-management.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN source/images/Console_0.7.2/baasbox-documents-table.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN source/images/Console_0.7.2/baasbox_0-7-2-console.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN source/images/Console_0.7.2/collections.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN source/images/Console_0.7.2/create_new_collection.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN source/images/Console_0.7.2/create_new_user.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN source/images/Console_0.7.2/documents.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN source/images/Console_0.7.2/home_console.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN source/images/Console_0.7.2/image_resize.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN source/images/Console_0.7.2/login.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN source/images/Console_0.7.2/new_asset.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN source/images/Console_0.7.2/news.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN source/images/Console_0.7.2/settings.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN source/images/Console_0.7.2/social_login1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN source/images/Console_0.7.2/social_login2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN source/images/Console_0.7.2/users.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN source/images/Console_0.7.3/assets.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN source/images/Console_0.7.3/baasbox-db-management.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN source/images/Console_0.7.3/baasbox-documents-table.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN source/images/Console_0.7.3/baasbox_0-7-3-console.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN source/images/Console_0.7.3/collections.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN source/images/Console_0.7.3/create_new_collection.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN source/images/Console_0.7.3/create_new_user.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN source/images/Console_0.7.3/documents.png
Diff not rendered.
View
BIN source/images/Console_0.7.3/home_console.png
Diff not rendered.
View
BIN source/images/Console_0.7.3/login.png
Diff not rendered.
View
BIN source/images/Console_0.7.3/new_asset.png
Diff not rendered.
View
BIN source/images/Console_0.7.3/news.png
Diff not rendered.
View
BIN source/images/Console_0.7.3/settings.png
Diff not rendered.
View
BIN source/images/Console_0.7.3/social_login1.png
Diff not rendered.
View
BIN source/images/Console_0.7.3/social_login2.png
Diff not rendered.
View
BIN source/images/Console_0.7.3/users.png
Diff not rendered.
View
BIN source/images/logo.png
Diff not rendered.
View
3,599 source/index.md
3,599 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
2 source/javascripts/all.js
@@ -0,0 +1,2 @@
+//= require './jquery_ui'
+//= require_tree .
View
1,025 source/javascripts/jquery.tocify.js
@@ -0,0 +1,1025 @@
+/* jquery Tocify - v1.8.0 - 2013-09-16
+* http://www.gregfranko.com/jquery.tocify.js/
+* Copyright (c) 2013 Greg Franko; Licensed MIT
+* Modified lightly by Robert Lord to fix a bug I found,
+* and also so it adds ids to headers
+* also because I want height caching, since the
+* height lookup for h1s and h2s was causing serious
+* lag spikes below 30 fps */
+
+// Immediately-Invoked Function Expression (IIFE) [Ben Alman Blog Post](http://benalman.com/news/2010/11/immediately-invoked-function-expression/) that calls another IIFE that contains all of the plugin logic. I used this pattern so that anyone viewing this code would not have to scroll to the bottom of the page to view the local parameters that were passed to the main IIFE.
+(function(tocify) {
+
+ // ECMAScript 5 Strict Mode: [John Resig Blog Post](http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/)
+ "use strict";
+
+ // Calls the second IIFE and locally passes in the global jQuery, window, and document objects
+ tocify(window.jQuery, window, document);
+
+}
+
+// Locally passes in `jQuery`, the `window` object, the `document` object, and an `undefined` variable. The `jQuery`, `window` and `document` objects are passed in locally, to improve performance, since javascript first searches for a variable match within the local variables set before searching the global variables set. All of the global variables are also passed in locally to be minifier friendly. `undefined` can be passed in locally, because it is not a reserved word in JavaScript.
+(function($, window, document, undefined) {
+
+ // ECMAScript 5 Strict Mode: [John Resig Blog Post](http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/)
+ "use strict";
+
+ var tocClassName = "tocify",
+ tocClass = "." + tocClassName,
+ tocFocusClassName = "tocify-focus",
+ tocHoverClassName = "tocify-hover",
+ hideTocClassName = "tocify-hide",
+ hideTocClass = "." + hideTocClassName,
+ headerClassName = "tocify-header",
+ headerClass = "." + headerClassName,
+ subheaderClassName = "tocify-subheader",
+ subheaderClass = "." + subheaderClassName,
+ itemClassName = "tocify-item",
+ itemClass = "." + itemClassName,
+ extendPageClassName = "tocify-extend-page",
+ extendPageClass = "." + extendPageClassName;
+
+ // Calling the jQueryUI Widget Factory Method
+ $.widget("toc.tocify", {
+
+ //Plugin version
+ version: "1.8.0",
+
+ // These options will be used as defaults
+ options: {
+
+ // **context**: Accepts String: Any jQuery selector
+ // The container element that holds all of the elements used to generate the table of contents
+ context: "body",
+
+ // **ignoreSelector**: Accepts String: Any jQuery selector
+ // A selector to any element that would be matched by selectors that you wish to be ignored
+ ignoreSelector: null,
+
+ // **selectors**: Accepts an Array of Strings: Any jQuery selectors
+ // The element's used to generate the table of contents. The order is very important since it will determine the table of content's nesting structure
+ selectors: "h1, h2, h3",
+
+ // **showAndHide**: Accepts a boolean: true or false
+ // Used to determine if elements should be shown and hidden
+ showAndHide: true,
+
+ // **showEffect**: Accepts String: "none", "fadeIn", "show", or "slideDown"
+ // Used to display any of the table of contents nested items
+ showEffect: "slideDown",
+
+ // **showEffectSpeed**: Accepts Number (milliseconds) or String: "slow", "medium", or "fast"
+ // The time duration of the show animation
+ showEffectSpeed: "medium",
+
+ // **hideEffect**: Accepts String: "none", "fadeOut", "hide", or "slideUp"
+ // Used to hide any of the table of contents nested items
+ hideEffect: "slideUp",
+
+ // **hideEffectSpeed**: Accepts Number (milliseconds) or String: "slow", "medium", or "fast"
+ // The time duration of the hide animation
+ hideEffectSpeed: "medium",
+
+ // **smoothScroll**: Accepts a boolean: true or false
+ // Determines if a jQuery animation should be used to scroll to specific table of contents items on the page
+ smoothScroll: true,
+
+ // **smoothScrollSpeed**: Accepts Number (milliseconds) or String: "slow", "medium", or "fast"
+ // The time duration of the smoothScroll animation
+ smoothScrollSpeed: "medium",
+
+ // **scrollTo**: Accepts Number (pixels)
+ // The amount of space between the top of page and the selected table of contents item after the page has been scrolled
+ scrollTo: 0,
+
+ // **showAndHideOnScroll**: Accepts a boolean: true or false
+ // Determines if table of contents nested items should be shown and hidden while scrolling
+ showAndHideOnScroll: true,
+
+ // **highlightOnScroll**: Accepts a boolean: true or false
+ // Determines if table of contents nested items should be highlighted (set to a different color) while scrolling
+ highlightOnScroll: true,
+
+ // **highlightOffset**: Accepts a number
+ // The offset distance in pixels to trigger the next active table of contents item
+ highlightOffset: 40,
+
+ // **theme**: Accepts a string: "bootstrap", "jqueryui", or "none"
+ // Determines if Twitter Bootstrap, jQueryUI, or Tocify classes should be added to the table of contents
+ theme: "bootstrap",
+
+ // **extendPage**: Accepts a boolean: true or false
+ // If a user scrolls to the bottom of the page and the page is not tall enough to scroll to the last table of contents item, then the page height is increased
+ extendPage: true,
+
+ // **extendPageOffset**: Accepts a number: pixels
+ // How close to the bottom of the page a user must scroll before the page is extended
+ extendPageOffset: 100,
+
+ // **history**: Accepts a boolean: true or false
+ // Adds a hash to the page url to maintain history
+ history: true,
+
+ // **scrollHistory**: Accepts a boolean: true or false
+ // Adds a hash to the page url, to maintain history, when scrolling to a TOC item
+ scrollHistory: false,
+
+ // **hashGenerator**: How the hash value (the anchor segment of the URL, following the
+ // # character) will be generated.
+ //
+ // "compact" (default) - #CompressesEverythingTogether
+ // "pretty" - #looks-like-a-nice-url-and-is-easily-readable
+ // function(text, element){} - Your own hash generation function that accepts the text as an
+ // argument, and returns the hash value.
+ hashGenerator: "compact",
+
+ // **highlightDefault**: Accepts a boolean: true or false
+ // Set's the first TOC item as active if no other TOC item is active.
+ highlightDefault: true
+
+ },
+
+ // _Create
+ // -------
+ // Constructs the plugin. Only called once.
+ _create: function() {
+
+ var self = this;
+
+ self.extendPageScroll = true;
+
+ // Internal array that keeps track of all TOC items (Helps to recognize if there are duplicate TOC item strings)
+ self.items = [];
+
+ // Generates the HTML for the dynamic table of contents
+ self._generateToc();
+
+ // Caches heights and anchors
+ self.cachedHeights = [],
+ self.cachedAnchors = [];
+
+ // Adds CSS classes to the newly generated table of contents HTML
+ self._addCSSClasses();
+
+ self.webkit = (function() {
+
+ for(var prop in window) {
+
+ if(prop) {
+
+ if(prop.toLowerCase().indexOf("webkit") !== -1) {
+
+ return true;
+
+ }
+
+ }
+
+ }
+
+ return false;
+
+ }());
+
+ // Adds jQuery event handlers to the newly generated table of contents
+ self._setEventHandlers();
+
+ // Binding to the Window load event to make sure the correct scrollTop is calculated
+ $(window).load(function() {
+
+ // Sets the active TOC item
+ self._setActiveElement(true);
+
+ // Once all animations on the page are complete, this callback function will be called
+ $("html, body").promise().done(function() {
+
+ setTimeout(function() {
+
+ self.extendPageScroll = false;
+
+ },0);
+
+ });
+
+ });
+
+ },
+
+ // _generateToc
+ // ------------
+ // Generates the HTML for the dynamic table of contents
+ _generateToc: function() {
+
+ // _Local variables_
+
+ // Stores the plugin context in the self variable
+ var self = this,
+
+ // All of the HTML tags found within the context provided (i.e. body) that match the top level jQuery selector above
+ firstElem,
+
+ // Instantiated variable that will store the top level newly created unordered list DOM element
+ ul,
+ ignoreSelector = self.options.ignoreSelector;
+
+ // If the selectors option has a comma within the string
+ if(this.options.selectors.indexOf(",") !== -1) {
+
+ // Grabs the first selector from the string
+ firstElem = $(this.options.context).find(this.options.selectors.replace(/ /g,"").substr(0, this.options.selectors.indexOf(",")));
+
+ }
+
+ // If the selectors option does not have a comman within the string
+ else {
+
+ // Grabs the first selector from the string and makes sure there are no spaces
+ firstElem = $(this.options.context).find(this.options.selectors.replace(/ /g,""));
+
+ }
+
+ if(!firstElem.length) {
+
+ self.element.addClass(hideTocClassName);
+
+ return;
+
+ }
+
+ self.element.addClass(tocClassName);
+
+ // Loops through each top level selector
+ firstElem.each(function(index) {
+
+ //If the element matches the ignoreSelector then we skip it
+ if($(this).is(ignoreSelector)) {
+ return;
+ }
+
+ // Creates an unordered list HTML element and adds a dynamic ID and standard class name
+ ul = $("<ul/>", {
+ "id": headerClassName + index,
+ "class": headerClassName
+ }).
+
+ // Appends a top level list item HTML element to the previously created HTML header
+ append(self._nestElements($(this), index));
+
+ // Add the created unordered list element to the HTML element calling the plugin
+ self.element.append(ul);
+
+ // Finds all of the HTML tags between the header and subheader elements
+ $(this).nextUntil(this.nodeName.toLowerCase()).each(function() {
+
+ // If there are no nested subheader elemements
+ if($(this).find(self.options.selectors).length === 0) {
+
+ // Loops through all of the subheader elements
+ $(this).filter(self.options.selectors).each(function() {
+
+ //If the element matches the ignoreSelector then we skip it
+ if($(this).is(ignoreSelector)) {
+ return;
+ }
+
+ self._appendSubheaders.call(this, self, ul);
+
+ });
+
+ }
+
+ // If there are nested subheader elements
+ else {
+
+ // Loops through all of the subheader elements
+ $(this).find(self.options.selectors).each(function() {
+
+ //If the element matches the ignoreSelector then we skip it
+ if($(this).is(ignoreSelector)) {
+ return;
+ }
+
+ self._appendSubheaders.call(this, self, ul);
+
+ });
+
+ }
+
+ });
+
+ });
+
+ },
+
+ _setActiveElement: function(pageload) {
+
+ var self = this,
+
+ hash = window.location.hash.substring(1),
+
+ elem = self.element.find("li[data-unique='" + hash + "']");
+
+ if(hash.length) {
+
+ // Removes highlighting from all of the list item's
+ self.element.find("." + self.focusClass).removeClass(self.focusClass);
+
+ // Highlights the current list item that was clicked
+ elem.addClass(self.focusClass);
+
+ // If the showAndHide option is true
+ if(self.options.showAndHide) {
+
+ // Triggers the click event on the currently focused TOC item
+ elem.click();
+
+ }
+
+ }
+
+ else {
+
+ // Removes highlighting from all of the list item's
+ self.element.find("." + self.focusClass).removeClass(self.focusClass);
+
+ if(!hash.length && pageload && self.options.highlightDefault) {
+
+ // Highlights the first TOC item if no other items are highlighted
+ self.element.find(itemClass).first().addClass(self.focusClass);
+
+ }
+
+ }
+
+ return self;
+
+ },
+
+ // _nestElements
+ // -------------
+ // Helps create the table of contents list by appending nested list items
+ _nestElements: function(self, index) {
+
+ var arr, item, hashValue;
+
+ arr = $.grep(this.items, function (item) {
+
+ return item === self.text();
+
+ });
+
+ // If there is already a duplicate TOC item
+ if(arr.length) {
+
+ // Adds the current TOC item text and index (for slight randomization) to the internal array
+ this.items.push(self.text() + index);
+
+ }
+
+ // If there not a duplicate TOC item
+ else {
+
+ // Adds the current TOC item text to the internal array
+ this.items.push(self.text());
+
+ }
+
+ hashValue = this._generateHashValue(arr, self, index);
+
+ // ADDED BY ROBERT
+ // actually add the hash value to the element's id
+ // self.attr("id", "link-" + hashValue);
+
+ // Appends a list item HTML element to the last unordered list HTML element found within the HTML element calling the plugin
+ item = $("<li/>", {
+
+ // Sets a common class name to the list item
+ "class": itemClassName,
+
+ "data-unique": hashValue
+
+ }).append($("<a/>", {
+
+ "text": self.text()
+
+ }));
+
+ // Adds an HTML anchor tag before the currently traversed HTML element
+ self.before($("<div/>", {
+
+ // Sets a name attribute on the anchor tag to the text of the currently traversed HTML element (also making sure that all whitespace is replaced with an underscore)
+ "name": hashValue,
+
+ "data-unique": hashValue
+
+ }));
+
+ return item;
+
+ },
+
+ // _generateHashValue
+ // ------------------
+ // Generates the hash value that will be used to refer to each item.
+ _generateHashValue: function(arr, self, index) {
+
+ var hashValue = "",
+ hashGeneratorOption = this.options.hashGenerator;
+
+ if (hashGeneratorOption === "pretty") {
+ // remove weird characters
+
+
+ // prettify the text
+ hashValue = self.text().toLowerCase().replace(/\s/g, "-");
+
+ // ADDED BY ROBERT
+ // remove weird characters
+ hashValue = hashValue.replace(/[^\x00-\x7F]/g, "");
+
+ // fix double hyphens
+ while (hashValue.indexOf("--") > -1) {
+ hashValue = hashValue.replace(/--/g, "-");
+ }
+
+ // fix colon-space instances
+ while (hashValue.indexOf(":-") > -1) {
+ hashValue = hashValue.replace(/:-/g, "-");
+ }
+
+ } else if (typeof hashGeneratorOption === "function") {
+
+ // call the function
+ hashValue = hashGeneratorOption(self.text(), self);
+
+ } else {
+
+ // compact - the default
+ hashValue = self.text().replace(/\s/g, "");
+
+ }
+
+ // add the index if we need to
+ if (arr.length) { hashValue += ""+index; }
+
+ // return the value
+ return hashValue;
+
+ },
+
+ // _appendElements
+ // ---------------
+ // Helps create the table of contents list by appending subheader elements
+
+ _appendSubheaders: function(self, ul) {
+
+ // The current element index
+ var index = $(this).index(self.options.selectors),
+
+ // Finds the previous header DOM element
+ previousHeader = $(self.options.selectors).eq(index - 1),
+
+ currentTagName = +$(this).prop("tagName").charAt(1),
+
+ previousTagName = +previousHeader.prop("tagName").charAt(1),
+
+ lastSubheader;
+
+ // If the current header DOM element is smaller than the previous header DOM element or the first subheader
+ if(currentTagName < previousTagName) {
+
+ // Selects the last unordered list HTML found within the HTML element calling the plugin
+ self.element.find(subheaderClass + "[data-tag=" + currentTagName + "]").last().append(self._nestElements($(this), index));
+
+ }
+
+ // If the current header DOM element is the same type of header(eg. h4) as the previous header DOM element
+ else if(currentTagName === previousTagName) {
+
+ ul.find(itemClass).last().after(self._nestElements($(this), index));
+
+ }
+
+ else {
+
+ // Selects the last unordered list HTML found within the HTML element calling the plugin
+ ul.find(itemClass).last().
+
+ // Appends an unorderedList HTML element to the dynamic `unorderedList` variable and sets a common class name
+ after($("<ul/>", {
+
+ "class": subheaderClassName,
+
+ "data-tag": currentTagName
+
+ })).next(subheaderClass).
+
+ // Appends a list item HTML element to the last unordered list HTML element found within the HTML element calling the plugin
+ append(self._nestElements($(this), index));
+ }
+
+ },
+
+ // _setEventHandlers
+ // ----------------
+ // Adds jQuery event handlers to the newly generated table of contents
+ _setEventHandlers: function() {
+
+ // _Local variables_
+
+ // Stores the plugin context in the self variable
+ var self = this,
+
+ // Instantiates a new variable that will be used to hold a specific element's context
+ $self,
+
+ // Instantiates a new variable that will be used to determine the smoothScroll animation time duration
+ duration;
+
+ // Event delegation that looks for any clicks on list item elements inside of the HTML element calling the plugin
+ this.element.on("click.tocify", "li", function(event) {
+
+ if(self.options.history) {
+
+ window.location.hash = $(this).attr("data-unique");
+
+ }
+
+ // Removes highlighting from all of the list item's
+ self.element.find("." + self.focusClass).removeClass(self.focusClass);
+
+ // Highlights the current list item that was clicked
+ $(this).addClass(self.focusClass);
+
+ // If the showAndHide option is true
+ if(self.options.showAndHide) {
+
+ var elem = $('li[data-unique="' + $(this).attr("data-unique") + '"]');
+
+ self._triggerShow(elem);
+
+ }
+
+ self._scrollTo($(this));
+
+ });
+
+ // Mouseenter and Mouseleave event handlers for the list item's within the HTML element calling the plugin
+ this.element.find("li").on({
+
+ // Mouseenter event handler
+ "mouseenter.tocify": function() {
+
+ // Adds a hover CSS class to the current list item
+ $(this).addClass(self.hoverClass);
+
+ // Makes sure the cursor is set to the pointer icon
+ $(this).css("cursor", "pointer");
+
+ },
+
+ // Mouseleave event handler
+ "mouseleave.tocify": function() {
+
+ if(self.options.theme !== "bootstrap") {
+
+ // Removes the hover CSS class from the current list item
+ $(this).removeClass(self.hoverClass);
+
+ }
+
+ }
+ });
+
+ // Reset height cache on scroll
+
+ $(window).on('resize', function() {
+ console.log("resizing" + self.cachedHeights);
+ self.calculateHeights();
+ console.log("done" + self.cachedHeights);
+ });
+
+ // Window scroll event handler
+ $(window).on("scroll.tocify", function() {
+
+ // Once all animations on the page are complete, this callback function will be called
+ $("html, body").promise().done(function() {
+
+ // Local variables
+
+ // Stores how far the user has scrolled
+ var winScrollTop = $(window).scrollTop(),
+
+ // Stores the height of the window
+ winHeight = $(window).height(),
+
+ // Stores the height of the document
+ docHeight = $(document).height(),
+
+ scrollHeight = $("body")[0].scrollHeight,
+
+ // Instantiates a variable that will be used to hold a selected HTML element
+ elem,
+
+ lastElem,
+
+ lastElemOffset,
+
+ currentElem;
+
+ if(self.options.extendPage) {
+
+ // If the user has scrolled to the bottom of the page and the last toc item is not focused
+ if((self.webkit && winScrollTop >= scrollHeight - winHeight - self.options.extendPageOffset) || (!self.webkit && winHeight + winScrollTop > docHeight - self.options.extendPageOffset)) {
+
+ if(!$(extendPageClass).length) {
+
+ lastElem = $('div[data-unique="' + $(itemClass).last().attr("data-unique") + '"]');
+
+ if(!lastElem.length) return;
+
+ // Gets the top offset of the page header that is linked to the last toc item
+ lastElemOffset = lastElem.offset().top;
+
+ // Appends a div to the bottom of the page and sets the height to the difference of the window scrollTop and the last element's position top offset
+ $(self.options.context).append($("<div />", {
+
+ "class": extendPageClassName,
+
+ "height": Math.abs(lastElemOffset - winScrollTop) + "px",
+
+ "data-unique": extendPageClassName
+
+ }));
+
+ if(self.extendPageScroll) {
+
+ currentElem = self.element.find('li.active');
+
+ self._scrollTo($("div[data-unique=" + currentElem.attr("data-unique") + "]"));
+
+ }
+
+ }
+
+ }
+
+ }
+
+ // The zero timeout ensures the following code is run after the scroll events
+ setTimeout(function() {
+
+ // _Local variables_
+
+ // Stores the distance to the closest anchor
+ var // Stores the index of the closest anchor
+ closestAnchorIdx = null,
+ anchorText;
+
+ // if never calculated before, calculate and cache the heights
+ if (self.cachedHeights.length == 0) {
+ self.calculateHeights();
+ }
+
+ // Determines the index of the closest anchor
+ self.cachedAnchors.each(function(idx) {
+ if (self.cachedHeights[idx] - $(window).scrollTop() < 0) {
+ closestAnchorIdx = idx;
+ } else {
+ return false;
+ }
+ });
+
+ anchorText = $(self.cachedAnchors[closestAnchorIdx]).attr("data-unique");
+
+ // Stores the list item HTML element that corresponds to the currently traversed anchor tag
+ elem = $('li[data-unique="' + anchorText + '"]');
+
+ // If the `highlightOnScroll` option is true and a next element is found
+ if(self.options.highlightOnScroll && elem.length) {
+
+ // Removes highlighting from all of the list item's
+ self.element.find("." + self.focusClass).removeClass(self.focusClass);
+
+ // Highlights the corresponding list item
+ elem.addClass(self.focusClass);
+
+ }
+
+ if(self.options.scrollHistory) {
+
+ if(window.location.hash !== "#" + anchorText) {
+
+ if(history.replaceState) {
+ history.replaceState({}, "", "#" + anchorText);
+ // provide a fallback
+ } else {
+ scrollV = document.body.scrollTop;
+ scrollH = document.body.scrollLeft;
+ location.hash = "#" + anchorText;
+ document.body.scrollTop = scrollV;
+ document.body.scrollLeft = scrollH;
+ }
+
+ }
+
+ }
+
+ // If the `showAndHideOnScroll` option is true
+ if(self.options.showAndHideOnScroll && self.options.showAndHide) {
+
+ self._triggerShow(elem, true);
+
+ }
+
+ }, 0);
+
+ });
+
+ });
+
+ },
+
+ // calculateHeights
+ // ----
+ // ADDED BY ROBERT
+ calculateHeights: function() {
+ var self = this;
+ self.cachedHeights = [];
+ self.cachedAnchors = [];
+ var anchors = $(self.options.context).find("div[data-unique]");
+ anchors.each(function(idx) {
+ var distance = (($(this).next().length ? $(this).next() : $(this)).offset().top - self.options.highlightOffset);
+ self.cachedHeights[idx] = distance;
+ });
+ self.cachedAnchors = anchors;
+ },
+
+ // Show
+ // ----
+ // Opens the current sub-header
+ show: function(elem, scroll) {
+
+ // Stores the plugin context in the `self` variable
+ var self = this,
+ element = elem;
+
+ // If the sub-header is not already visible
+ if (!elem.is(":visible")) {
+
+ // If the current element does not have any nested subheaders, is not a header, and its parent is not visible
+ if(!elem.find(subheaderClass).length && !elem.parent().is(headerClass) && !elem.parent().is(":visible")) {
+
+ // Sets the current element to all of the subheaders within the current header
+ elem = elem.parents(subheaderClass).add(elem);
+
+ }
+
+ // If the current element does not have any nested subheaders and is not a header
+ else if(!elem.children(subheaderClass).length && !elem.parent().is(headerClass)) {
+
+ // Sets the current element to the closest subheader
+ elem = elem.closest(subheaderClass);
+
+ }
+
+ //Determines what jQuery effect to use
+ switch (self.options.showEffect) {
+
+ //Uses `no effect`
+ case "none":
+
+ elem.show();
+
+ break;
+
+ //Uses the jQuery `show` special effect
+ case "show":
+
+ elem.show(self.options.showEffectSpeed);
+
+ break;
+
+ //Uses the jQuery `slideDown` special effect
+ case "slideDown":
+
+ elem.slideDown(self.options.showEffectSpeed);
+
+ break;
+
+ //Uses the jQuery `fadeIn` special effect
+ case "fadeIn":
+
+ elem.fadeIn(self.options.showEffectSpeed);
+
+ break;
+
+ //If none of the above options were passed, then a `jQueryUI show effect` is expected
+ default:
+
+ elem.show();
+
+ break;
+
+ }
+
+ }
+
+ // If the current subheader parent element is a header
+ if(elem.parent().is(headerClass)) {
+
+ // Hides all non-active sub-headers
+ self.hide($(subheaderClass).not(elem));
+
+ }
+
+ // If the current subheader parent element is not a header
+ else {
+
+ // Hides all non-active sub-headers
+ self.hide($(subheaderClass).not(elem.closest(headerClass).find(subheaderClass).not(elem.siblings())));
+
+ }
+
+ // Maintains chainablity
+ return self;
+
+ },
+
+ // Hide
+ // ----
+ // Closes the current sub-header
+ hide: function(elem) {
+
+ // Stores the plugin context in the `self` variable
+ var self = this;
+
+ //Determines what jQuery effect to use
+ switch (self.options.hideEffect) {
+
+ // Uses `no effect`
+ case "none":
+
+ elem.hide();
+
+ break;
+
+ // Uses the jQuery `hide` special effect
+ case "hide":
+
+ elem.hide(self.options.hideEffectSpeed);
+
+ break;
+
+ // Uses the jQuery `slideUp` special effect
+ case "slideUp":
+
+ elem.slideUp(self.options.hideEffectSpeed);
+
+ break;
+
+ // Uses the jQuery `fadeOut` special effect
+ case "fadeOut":
+
+ elem.fadeOut(self.options.hideEffectSpeed);
+
+ break;
+
+ // If none of the above options were passed, then a `jqueryUI hide effect` is expected
+ default:
+
+ elem.hide();
+
+ break;
+
+ }
+
+ // Maintains chainablity
+ return self;
+ },
+
+ // _triggerShow
+ // ------------
+ // Determines what elements get shown on scroll and click
+ _triggerShow: function(elem, scroll) {
+
+ var self = this;
+
+ // If the current element's parent is a header element or the next element is a nested subheader element
+ if(elem.parent().is(headerClass) || elem.next().is(subheaderClass)) {
+
+ // Shows the next sub-header element
+ self.show(elem.next(subheaderClass), scroll);
+
+ }
+
+ // If the current element's parent is a subheader element
+ else if(elem.parent().is(subheaderClass)) {
+
+ // Shows the parent sub-header element
+ self.show(elem.parent(), scroll);
+
+ }
+
+ // Maintains chainability
+ return self;
+
+ },
+
+ // _addCSSClasses
+ // --------------
+ // Adds CSS classes to the newly generated table of contents HTML
+ _addCSSClasses: function() {
+
+ // If the user wants a jqueryUI theme
+ if(this.options.theme === "jqueryui") {
+
+ this.focusClass = "ui-state-default";
+
+ this.hoverClass = "ui-state-hover";
+
+ //Adds the default styling to the dropdown list
+ this.element.addClass("ui-widget").find(".toc-title").addClass("ui-widget-header").end().find("li").addClass("ui-widget-content");
+
+ }
+
+ // If the user wants a twitterBootstrap theme
+ else if(this.options.theme === "bootstrap") {
+
+ this.element.find(headerClass + "," + subheaderClass).addClass("nav nav-list");
+
+ this.focusClass = "active";
+
+ }
+
+ // If a user does not want a prebuilt theme
+ else {
+
+ // Adds more neutral classes (instead of jqueryui)
+
+ this.focusClass = tocFocusClassName;
+
+ this.hoverClass = tocHoverClassName;
+
+ }
+
+ //Maintains chainability
+ return this;
+
+ },
+
+ // setOption
+ // ---------
+ // Sets a single Tocify option after the plugin is invoked
+ setOption: function() {
+
+ // Calls the jQueryUI Widget Factory setOption method
+ $.Widget.prototype._setOption.apply(this, arguments);
+
+ },
+
+ // setOptions
+ // ----------
+ // Sets a single or multiple Tocify options after the plugin is invoked
+ setOptions: function() {
+
+ // Calls the jQueryUI Widget Factory setOptions method
+ $.Widget.prototype._setOptions.apply(this, arguments);
+
+ },
+
+ // _scrollTo
+ // ---------
+ // Scrolls to a specific element
+ _scrollTo: function(elem) {
+
+ var self = this,
+ duration = self.options.smoothScroll || 0,
+ scrollTo = self.options.scrollTo;
+
+ // Once all animations on the page are complete, this callback function will be called
+ $("html, body").promise().done(function() {
+
+ // Animates the html and body element scrolltops
+ $("html, body").animate({
+
+ // Sets the jQuery `scrollTop` to the top offset of the HTML div tag that matches the current list item's `data-unique` tag
+ "scrollTop": $('div[data-unique="' + elem.attr("data-unique") + '"]').next().offset().top - ($.isFunction(scrollTo) ? scrollTo.call() : scrollTo) + "px"
+
+ }, {
+
+ // Sets the smoothScroll animation time duration to the smoothScrollSpeed option
+ "duration": duration
+
+ });
+
+ });
+
+ // Maintains chainability
+ return self;
+
+ }
+
+ });
+
+})); //end of plugin
View
6 source/javascripts/jquery_ui.js
@@ -0,0 +1,6 @@
+/*! jQuery UI - v1.10.3 - 2013-09-16
+* http://jqueryui.com
+* Includes: jquery.ui.widget.js
+* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
+
+(function(e,t){var i=0,s=Array.prototype.slice,a=e.cleanData;e.cleanData=function(t){for(var i,s=0;null!=(i=t[s]);s++)try{e(i).triggerHandler("remove")}catch(n){}a(t)},e.widget=function(i,s,a){var n,r,o,h,l={},u=i.split(".")[0];i=i.split(".")[1],n=u+"-"+i,a||(a=s,s=e.Widget),e.expr[":"][n.toLowerCase()]=function(t){return!!e.data(t,n)},e[u]=e[u]||{},r=e[u][i],o=e[u][i]=function(e,i){return this._createWidget?(arguments.length&&this._createWidget(e,i),t):new o(e,i)},e.extend(o,r,{version:a.version,_proto:e.extend({},a),_childConstructors:[]}),h=new s,h.options=e.widget.extend({},h.options),e.each(a,function(i,a){return e.isFunction(a)?(l[i]=function(){var e=function(){return s.prototype[i].apply(this,arguments)},t=function(e){return s.prototype[i].apply(this,e)};return function(){var i,s=this._super,n=this._superApply;return this._super=e,this._superApply=t,i=a.apply(this,arguments),this._super=s,this._superApply=n,i}}(),t):(l[i]=a,t)}),o.prototype=e.widget.extend(h,{widgetEventPrefix:r?h.widgetEventPrefix:i},l,{constructor:o,namespace:u,widgetName:i,widgetFullName:n}),r?(e.each(r._childConstructors,function(t,i){var s=i.prototype;e.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete r._childConstructors):s._childConstructors.push(o),e.widget.bridge(i,o)},e.widget.extend=function(i){for(var a,n,r=s.call(arguments,1),o=0,h=r.length;h>o;o++)for(a in r[o])n=r[o][a],r[o].hasOwnProperty(a)&&n!==t&&(i[a]=e.isPlainObject(n)?e.isPlainObject(i[a])?e.widget.extend({},i[a],n):e.widget.extend({},n):n);return i},e.widget.bridge=function(i,a){var n=a.prototype.widgetFullName||i;e.fn[i]=function(r){var o="string"==typeof r,h=s.call(arguments,1),l=this;return r=!o&&h.length?e.widget.extend.apply(null,[r].concat(h)):r,o?this.each(function(){var s,a=e.data(this,n);return a?e.isFunction(a[r])&&"_"!==r.charAt(0)?(s=a[r].apply(a,h),s!==a&&s!==t?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):t):e.error("no such method '"+r+"' for "+i+" widget instance"):e.error("cannot call methods on "+i+" prior to initialization; "+"attempted to call method '"+r+"'")}):this.each(function(){var t=e.data(this,n);t?t.option(r||{})._init():e.data(this,n,new a(r,this))}),l}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,s){s=e(s||this.defaultElement||this)[0],this.element=e(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),s!==this&&(e.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===s&&this.destroy()}}),this.document=e(s.style?s.ownerDocument:s.document||s),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(i,s){var a,n,r,o=i;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof i)if(o={},a=i.split("."),i=a.shift(),a.length){for(n=o[i]=e.widget.extend({},this.options[i]),r=0;a.length-1>r;r++)n[a[r]]=n[a[r]]||{},n=n[a[r]];if(i=a.pop(),s===t)return n[i]===t?null:n[i];n[i]=s}else{if(s===t)return this.options[i]===t?null:this.options[i];o[i]=s}return this._setOptions(o),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(i,s,a){var n,r=this;"boolean"!=typeof i&&(a=s,s=i,i=!1),a?(s=n=e(s),this.bindings=this.bindings.add(s)):(a=s,s=this.element,n=this.widget()),e.each(a,function(a,o){function h(){return i||r.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof o?r[o]:o).apply(r,arguments):t}"string"!=typeof o&&(h.guid=o.guid=o.guid||h.guid||e.guid++);var l=a.match(/^(\w+)\s*(.*)$/),u=l[1]+r.eventNamespace,c=l[2];c?n.delegate(c,u,h):s.bind(u,h)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){function i(){return("string"==typeof e?s[e]:e).apply(s,arguments)}var s=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,s){var a,n,r=this.options[t];if(s=s||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],n=i.originalEvent)for(a in n)a in i||(i[a]=n[a]);return this.element.trigger(i,s),!(e.isFunction(r)&&r.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(s,a,n){"string"==typeof a&&(a={effect:a});var r,o=a?a===!0||"number"==typeof a?i:a.effect||i:t;a=a||{},"number"==typeof a&&(a={duration:a}),r=!e.isEmptyObject(a),a.complete=n,a.delay&&s.delay(a.delay),r&&e.effects&&e.effects.effect[o]?s[t](a):o!==t&&s[o]?s[o](a.duration,a.easing,n):s.queue(function(i){e(this)[t](),n&&n.call(s[0]),i()})}})})(jQuery);
View
52 source/javascripts/lang_selector.js
@@ -0,0 +1,52 @@
+/*
+Copyright 2008-2013 Concur Technologies, Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License"); you may
+not use this file except in compliance with the License. You may obtain
+a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+License for the specific language governing permissions and limitations
+under the License.
+*/
+languages = []
+function activateLanguage(language) {
+ $("#lang-selector a").removeClass('active');
+ $("#lang-selector a[data-language-name='" + language + "']").addClass('active');
+ for (var i=0; i < languages.length; i++) {
+ $(".highlight." + languages[i]).hide();
+ }
+ $(".highlight." + language).show();
+
+}
+
+function setupLanguages(l) {
+ languages = l;
+ currentLanguage = languages[0];
+ defaultLanguage = localStorage.getItem("language");
+
+ if ((location.search.substr(1) != "") && (jQuery.inArray(location.search.substr(1), languages)) != -1) {
+ // the language is in the URL, so use that language!
+ activateLanguage(location.search.substr(1));
+
+ // set this language as the default for next time, if the URL has no language
+ localStorage.setItem("language", location.search.substr(1));
+ } 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);
+ } else {
+ // no language selected, so use the default
+ activateLanguage(languages[0]);
+ }
+
+ // if we click on a language tab, reload the page with that language in the URL
+ $("#lang-selector a").bind("click", function() {
+ window.location.replace("?" + $(this).data("language-name") + window.location.hash);
+ return false;
+ });
+
+}
View
127 source/layouts/layout.erb
@@ -0,0 +1,127 @@
+<%#
+Copyright 2008-2013 Concur Technologies, Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License"); you may
+not use this file except in compliance with the License. You may obtain
+a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+License for the specific language governing permissions and limitations
+under the License.
+%>
+<!doctype html>
+<html>
+ <head>
+ <meta charset="utf-8">
+
+ <!-- Always force latest IE rendering engine or request Chrome Frame -->
+ <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
+ <!-- Use title if it's in the page YAML frontmatter -->
+ <title><%= current_page.data.title || "API Documentation" %></title>
+
+ <%= stylesheet_link_tag "screen", media: 'screen' %>
+ <%= stylesheet_link_tag "print", media: 'print' %>
+ <script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
+ <%= javascript_include_tag "all" %>
+
+ <script>
+ $(function() {
+ var toc = $("#toc").tocify({
+ selectors: "h1,h2,h3",
+ extendPage: false,
+ theme: "none",
+ smoothScroll: false,
+ showEffectSpeed: 0,
+ hideEffectSpeed: 180,
+ ignoreSelector: ".toc-ignore",
+ hashGenerator: 'pretty',
+ highlightOffset: 60,
+ scrollTo: 50,
+ scrollHistory: true,
+ hashGenerator: function(text, element) {
+ return element[0].getAttribute('id');
+ }
+ }).data("toc-tocify");
+ // Hack to make already open sections to start opened,
+ // instead of displaying an ugly animation
+ setTimeout(function() {
+ toc.setOption("showEffectSpeed", 180);
+ },50);
+ setupLanguages([
+ <% if current_page.data.language_tabs %>
+ <% current_page.data.language_tabs.each do |lang| %>
+ <% if lang.is_a? Hash %>
+ '<%= lang.keys[0] %>',
+ <% else %>
+ '<%= lang %>',
+ <% end %>
+ <% end %>
+ <% end %>
+ ]);
+ });
+ </script>
+ </head>
+
+ <body class="<%= page_classes %>">
+
+ <div class="mainmenu">
+ <div class="menuwrapper">
+ <nav class="menulist">
+ <div class="iconmenu">
+ <i class="icon-th-list icon-2x"></i>
+ </div>
+ <ul class="items"><li class="menu-item menu-item-type-custom menu-item-object-custom current-menu-item current_page_item menu-item-home menu-item-6637" id="menu-item-6637"><a href="http://www.baasbox.com/#about" title="About">About</a></li>
+ <li class="menu-item menu-item-type-custom menu-item-object-custom current-menu-item current_page_item menu-item-home menu-item-6638" id="menu-item-6638"><a href="http://www.baasbox.com/#quick-start" title="Quick Start">Quick Start</a></li>
+ <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-6639" id="menu-item-6639"><a href="http://www.baasbox.com/documentation" title="Documentation">Documentation</a></li>
+ <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-6640" id="menu-item-6640"><a href="http://www.baasbox.com/download/" title="Downloads">Downloads</a></li>
+ <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-6641" id="menu-item-6641"><a href="http://www.baasbox.com/blog" title="Blog">Blog</a></li>
+ </ul> </nav>
+ <a class="logoblock" href="http://www.baasbox.com/#home">
+ <img src="http://www.baasbox.com/wp-content/uploads/2013/12/logo_baasbox.png" class="companylogo">
+ </a>
+
+ <div class="socialblock">
+ </div>
+ </div>
+ </div>
+
+ <div class="tocify-wrapper">
+ <div id="toc">
+ <div style="margin:20px 0 20px 60px">
+ <a href="http://www.baasbox.com/tutorial/">
+ <img class="alignright size-full wp-image-6742" width="166" height="35" alt="tryitnow" src="http://www.baasbox.com/wp-content/uploads/2013/12/tryitnow.png">
+ </a>
+ </div>
+ </div>
+ <% if current_page.data.toc_footers %>
+ <ul class="toc-footer">
+ <% current_page.data.toc_footers.each do |footer| %>
+ <li><%= footer %></li>
+ <% end %>
+ </ul>
+ <% end %>
+ </div>
+ <div class="page-wrapper">
+ <div class="content">
+ <%= yield %>
+ </div>
+ <div class="dark-box">
+ <div id="lang-selector">
+ <% if current_page.data.language_tabs %>
+ <% current_page.data.language_tabs.each do |lang| %>
+ <% if lang.is_a? Hash %>
+ <a href="#" data-language-name="<%= lang.keys[0] %>"><%= lang.values[0] %></a>
+ <% else %>
+ <a href="#" data-language-name="<%= lang %>"><%= lang %></a>
+ <% end %>
+ <% end %>
+ <% end %>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
View
95 source/stylesheets/fix.css
@@ -0,0 +1,95 @@
+@font-face {
+ font-family: "Lato";
+ font-style: normal;
+ font-weight: 300;
+ src: local("Lato Light"), local("Lato-Light"), url("http://themes.googleusercontent.com/static/fonts/lato/v7/kcf5uOXucLcbFOydGU24WALUuEpTyoUstqEm5AMlJo4.woff") format("woff");
+}
+@font-face {
+ font-family: "Lato";
+ font-style: normal;
+ font-weight: 400;
+ src: local("Lato Regular"), local("Lato-Regular"), url("http://themes.googleusercontent.com/static/fonts/lato/v7/qIIYRU-oROkIk8vfvxw6QvesZW2xOQ-xsNqO47m55DA.woff") format("woff");
+}
+@font-face {
+ font-family: "Lato Bold";
+ font-style: normal;
+ font-weight: 700;
+ src: local("Lato Bold"), local("Lato-Bold"), url("http://themes.googleusercontent.com/static/fonts/lato/v7/qdgUG4U09HnJwhYI-uK18wLUuEpTyoUstqEm5AMlJo4.woff") format("woff");
+}
+
+.mainmenu .menuwrapper .menulist {
+ display: inline-block;
+ float: right;
+ padding: 0.5em 1em;
+ position: relative;
+ text-align: center;
+}
+
+nav {
+ display: block;
+ float: right;
+}
+
+.mainmenu .menuwrapper {
+ margin: 0 auto;
+ max-width: 1200px;
+ position: relative;
+ width: 100%;
+}
+
+.mainmenu {
+ background-color: #00A99D;
+ border-bottom: 1px solid rgba(0, 0, 0, 0.1);
+ box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1);
+ left: 0;
+ height: 68px;
+ position: fixed;
+ text-align: center;
+ width: 100%;
+ z-index: 1000;
+}
+
+.mainmenu .menuwrapper .menulist ul li a {
+ border-radius: 4px;
+ color: #FFFFFF;
+ display: inline-block;
+ font-weight: 700;
+ margin: 0 0.5em;
+ padding: 0.6em 1em;
+ text-transform: uppercase;
+ transition: all 0.3s ease 0s;
+ text-decoration: none;
+ font-family: 'Lato Bold';
+}
+
+.mainmenu .menuwrapper .menulist ul li {
+ float: left;
+ list-style: none outside none;
+}
+
+.mainmenu .menuwrapper .menulist {
+ text-align: center;
+}
+
+.mainmenu .menuwrapper .menulist {
+ display: inline-block;
+ float: right;
+ padding: 0.5em 1em;
+ position: relative;
+ text-align: center;
+}
+
+.mainmenu .menuwrapper .logoblock {
+ display: inline-block;
+ left: 0;
+ padding: 0.8em 1em;
+ position: absolute;
+}
+
+.items {
+ margin-top: 3px;
+}
+
+.content {
+ padding-top:100px;
+}
View
50 source/stylesheets/icon-font.scss
@@ -0,0 +1,50 @@
+/*
+@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-weight: normal;
+ font-style: normal;
+}*/
+
+%icon {
+ font-family: 'icomoon';
+ speak: none;
+ font-style: normal;
+ font-weight: normal;
+ font-variant: normal;
+ text-transform: none;
+ line-height: 1;
+}
+
+%icon-exclamation-sign {
+ @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";
+}
View
375 source/stylesheets/normalize.css
@@ -0,0 +1,375 @@
+/*! normalize.css v2.0.1 | MIT License | git.io/normalize */
+
+/* ==========================================================================
+ HTML5 display definitions
+ ========================================================================== */
+
+/*
+ * Corrects `block` display not defined in IE 8/9.
+ */
+
+article,
+aside,
+details,
+figcaption,
+figure,
+footer,
+header,
+hgroup,
+nav,
+section,
+summary {
+ display: block;
+}
+
+/*
+ * Corrects `inline-block` display not defined in IE 8/9.
+ */
+
+audio,
+canvas,
+video {
+ display: inline-block;
+}
+
+/*
+ * Prevents modern browsers from displaying `audio` without controls.
+ * Remove excess height in iOS 5 devices.
+ */
+
+audio:not([controls]) {
+ display: none;
+ height: 0;
+}
+
+/*
+ * Addresses styling for `hidden` attribute not present in IE 8/9.
+ */
+
+[hidden] {
+ display: none;
+}
+
+/* ==========================================================================
+ Base
+ ========================================================================== */
+
+/*
+ * 1. Sets default font family to sans-serif.
+ * 2. Prevents iOS text size adjust after orientation change, without disabling
+ * user zoom.
+ */
+
+html {
+ font-family: sans-serif; /* 1 */
+ -webkit-text-size-adjust: 100%; /* 2 */
+ -ms-text-size-adjust: 100%; /* 2 */
+}
+
+/*
+ * Removes default margin.
+ */
+
+body {
+ margin: 0;
+}
+
+/* ==========================================================================
+ Links
+ ========================================================================== */
+
+/*
+ * Addresses `outline` inconsistency between Chrome and other browsers.
+ */
+
+a:focus {
+ outline: thin dotted;
+}
+
+/*
+ * Improves readability when focused and also mouse hovered in all browsers.
+ */
+
+a:active,
+a:hover {
+ outline: 0;
+}
+
+/* ==========================================================================
+ Typography
+ ========================================================================== */
+
+/*
+ * Addresses `h1` font sizes within `section` and `article` in Firefox 4+,
+ * Safari 5, and Chrome.
+ */
+
+h1 {
+ font-size: 2em;
+}
+
+/*
+ * Addresses styling not present in IE 8/9, Safari 5, and Chrome.
+ */
+
+abbr[title] {
+ border-bottom: 1px dotted;
+}
+
+/*
+ * Addresses style set to `bolder` in Firefox 4+, Safari 5, and Chrome.
+ */
+
+b,
+strong {
+ font-weight: bold;
+}
+
+/*
+ * Addresses styling not present in Safari 5 and Chrome.
+ */
+
+dfn {
+ font-style: italic;
+}
+
+/*
+ * Addresses styling not present in IE 8/9.
+ */
+
+mark {
+ background: #ff0;
+ color: #000;
+}
+
+
+/*
+ * Corrects font family set oddly in Safari 5 and Chrome.
+ */
+
+code,
+kbd,
+pre,
+samp {
+ font-family: monospace, serif;
+ font-size: 1em;
+}
+
+/*
+ * Improves readability of pre-formatted text in all browsers.
+ */
+
+pre {
+ white-space: pre;
+ white-space: pre-wrap;
+ word-wrap: break-word;
+}
+
+/*
+ * Sets consistent quote types.
+ */
+
+q {
+ quotes: "\201C" "\201D" "\2018" "\2019";
+}
+
+/*
+ * Addresses inconsistent and variable font size in all browsers.
+ */
+
+small {
+ font-size: 80%;
+}
+
+/*
+ * Prevents `sub` and `sup` affecting `line-height` in all browsers.
+ */
+
+sub,
+sup {
+ font-size: 75%;
+ line-height: 0;
+ position: relative;
+ vertical-align: baseline;
+}
+
+sup {
+ top: -0.5em;
+}
+
+sub {
+ bottom: -0.25em;
+}
+
+/* ==========================================================================
+ Embedded content
+ ========================================================================== */
+
+/*
+ * Removes border when inside `a` element in IE 8/9.
+ */
+
+img {
+ border: 0;
+}
+
+/*
+ * Corrects overflow displayed oddly in IE 9.
+ */
+
+svg:not(:root) {
+ overflow: hidden;
+}
+
+/* ==========================================================================
+ Figures
+ ========================================================================== */
+
+/*
+ * Addresses margin not present in IE 8/9 and Safari 5.
+ */
+
+figure {
+ margin: 0;
+}
+
+/* ==========================================================================
+ Forms
+ ========================================================================== */
+
+/*
+ * Define consistent border, margin, and padding.
+ */
+
+fieldset {
+ border: 1px solid #c0c0c0;
+ margin: 0 2px;
+ padding: 0.35em 0.625em 0.75em;
+}
+
+/*
+ * 1. Corrects color not being inherited in IE 8/9.
+ * 2. Remove padding so people aren't caught out if they zero out fieldsets.
+ */
+
+legend {
+ border: 0; /* 1 */
+ padding: 0; /* 2 */
+}
+
+/*
+ * 1. Corrects font family not being inherited in all browsers.
+ * 2. Corrects font size not being inherited in all browsers.
+ * 3. Addresses margins set differently in Firefox 4+, Safari 5, and Chrome
+ */
+
+button,
+input,
+select,
+textarea {
+ font-family: inherit; /* 1 */
+ font-size: 100%; /* 2 */
+ margin: 0; /* 3 */
+}
+
+/*
+ * Addresses Firefox 4+ setting `line-height` on `input` using `!important` in
+ * the UA stylesheet.
+ */
+
+button,
+input {
+ line-height: normal;
+}
+
+/*
+ * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
+ * and `video` controls.
+ * 2. Corrects inability to style clickable `input` types in iOS.
+ * 3. Improves usability and consistency of cursor style between image-type
+ * `input` and others.
+ */
+
+button,
+html input[type="button"], /* 1 */
+input[type="reset"],
+input[type="submit"] {
+ -webkit-appearance: button; /* 2 */
+ cursor: pointer; /* 3 */
+}
+
+/*
+ * Re-set default cursor for disabled elements.
+ */
+
+button[disabled],
+input[disabled] {
+ cursor: default;
+}
+
+/*
+ * 1. Addresses box sizing set to `content-box` in IE 8/9.
+ * 2. Removes excess padding in IE 8/9.
+ */
+
+input[type="checkbox"],
+input[type="radio"] {
+ box-sizing: border-box; /* 1 */
+ padding: 0; /* 2 */
+}
+
+/*
+ * 1. Addresses `appearance` set to `searchfield` in Safari 5 and Chrome.
+ * 2. Addresses `box-sizing` set to `border-box` in Safari 5 and Chrome
+ * (include `-moz` to future-proof).
+ */
+
+input[type="search"] {
+ -webkit-appearance: textfield; /* 1 */
+ -moz-box-sizing: content-box;
+ -webkit-box-sizing: content-box; /* 2 */
+ box-sizing: content-box;
+}
+
+/*
+ * Removes inner padding and search cancel button in Safari 5 and Chrome
+ * on OS X.
+ */
+
+input[type="search"]::-webkit-search-cancel-button,
+input[type="search"]::-webkit-search-decoration {
+ -webkit-appearance: none;
+}
+
+/*
+ * Removes inner padding and border in Firefox 4+.
+ */
+
+button::-moz-focus-inner,
+input::-moz-focus-inner {
+ border: 0;
+ padding: 0;
+}
+
+/*
+ * 1. Removes default vertical scrollbar in IE 8/9.
+ * 2. Improves readability and alignment in all browsers.
+ */
+
+textarea {
+ overflow: auto; /* 1 */
+ vertical-align: top; /* 2 */
+}
+
+/* ==========================================================================
+ Tables
+ ========================================================================== */
+
+/*
+ * Remove most spacing between table cells.
+ */
+
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
+}
View
110 source/stylesheets/print.css.scss
@@ -0,0 +1,110 @@
+@charset "utf-8";
+@import 'normalize';
+@import 'compass';
+@import 'variables';
+
+/*
+Copyright 2008-2013 Concur Technologies, Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License"); you may
+not use this file except in compliance with the License. You may obtain
+a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+License for the specific language governing permissions and limitations
+under the License.
+*/
+
+$print-color: #999;
+$print-color-light: #ccc;
+$print-font-size: 12px;
+
+body {
+ @extend %default-font;
+}
+
+.tocify, .toc-footer {
+ display: none;
+}
+
+.tocify-wrapper>img {
+ margin: 0 auto;
+ display: block;
+}
+
+.content {
+ font-size: 12px;
+
+ pre, code {
+ @extend %code-font;
+ @extend %break-words;
+ border: 1px solid $print-color;
+ border-radius: 5px;
+ font-size: 0.8em;
+ }
+
+ pre {
+ padding: 1.3em;
+ }
+
+ code {
+ padding: 0.2em;
+ }
+
+ table {
+ border: 1px solid $print-color;
+ tr {
+ border-bottom: 1px solid $print-color;
+ }
+ td,th {
+ padding: 0.7em;
+ }
+ }
+
+ p {
+ line-height: 1.5;
+ }
+
+ a {
+ text-decoration: none;
+ color: #000;
+ }
+
+ h1 {
+ @extend %header-font;
+ font-size: 2.5em;
+ padding-top: 0.5em;
+ padding-bottom: 0.5em;
+ margin-top: 1em;
+ margin-bottom: $h1-margin-bottom;
+ border: 2px solid $print-color-light;
+ border-width: 2px 0;
+ text-align: center;
+ }
+
+ h2 {
+ @extend %header-font;
+ font-size: 1.8em;
+ margin-top: 2em;
+ border-top: 2px solid $print-color-light;
+ padding-top: 0.8em;
+ }
+
+ h1+h2, h1+div+h2 {
+ border-top: none;
+ padding-top: 0;
+ margin-top: 0;
+ }
+
+ h3 {
+ @extend %header-font;
+ font-size: 0.8em;
+ margin-top: 1.5em;
+ margin-bottom: 0.8em;
+ text-transform: uppercase;
+ }
+}
View
470 source/stylesheets/screen.css.scss
@@ -0,0 +1,470 @@
+@charset "utf-8";
+@import 'normalize';
+@import 'compass';
+@import 'variables';
+@import 'syntax';
+@import 'icon-font';
+@import 'fix';
+
+/*
+Copyright 2008-2013 Concur Technologies, Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License"); you may
+not use this file except in compliance with the License. You may obtain
+a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+License for the specific language governing permissions and limitations
+under the License.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+// GENERAL STUFF
+////////////////////////////////////////////////////////////////////////////////
+
+html, body {
+ color: $main-text;
+ padding: 0;
+ margin: 0;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+ @extend %default-font;
+ background-color: $main-bg;
+}
+
+button, input.send, input[type="submit"], .hexagon .inner, .colorblock, .block .block-container .storebuttons .storebutton:hover, .mainmenu, .appsblock .apps .slider .navigation:hover, .priceblock .block-container .pricetable .priceitem, .contactsblock .block-container .wrapper .mailbutton:hover, .contactsblock .input-container input[type="submit"], .footerblock, .blogblock .navigation .page-numbers.current {
+ background-color: #538378;
+}
+
+#toc a {
+ color: #fff;
+}
+
+.content a {
+ color:#538378;
+ padding-top:120px;
+}
+.content a:visited {
+ color:#343131;
+}
+////////////////////////////////////////////////////////////////////////////////
+// TABLE OF CONTENTS
+////////////////////////////////////////////////////////////////////////////////
+
+.tocify-wrapper {
+ margin-top: 65px;
+ overflow-y: auto;
+ overflow-x: hidden;
+ position: fixed;
+ top: 0;
+ left: 0;
+ bottom: