Initial commit: Backup der Webseiten

- zoesch.de
- blitzkiste.net
- gruene-hassberge (norbert.zoesch.de)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Felix Zösch
2025-12-13 01:17:15 +01:00
commit 07c290a453
4607 changed files with 1202735 additions and 0 deletions

View File

@@ -0,0 +1,394 @@
/*!
* Jasny Bootstrap's Gruntfile
* http://jasny.github.io/bootstrap
* Copyright 2013-2014 Arnold Daniels.
* Licensed under Apache License 2.0 (https://github.com/jasny/bootstrap/blob/master/LICENSE)
*/
module.exports = function (grunt) {
'use strict';
// Force use of Unix newlines
grunt.util.linefeed = '\n';
RegExp.quote = function (string) {
return string.replace(/[-\\^$*+?.()|[\]{}]/g, '\\$&');
};
var fs = require('fs');
var path = require('path');
var BsLessdocParser = require('./grunt/bs-lessdoc-parser.js');
var generateRawFilesJs = require('./grunt/bs-raw-files-generator.js');
var updateShrinkwrap = require('./grunt/shrinkwrap.js');
// Project configuration.
grunt.initConfig({
// Metadata.
pkg: grunt.file.readJSON('package.json'),
banner: '/*!\n' +
' * Jasny Bootstrap v<%= pkg.version %> (<%= pkg.homepage %>)\n' +
' * Copyright 2012-<%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' +
' * Licensed under <%= pkg.license.type %> (<%= pkg.license.url %>)\n' +
' */\n',
jqueryCheck: 'if (typeof jQuery === \'undefined\') { throw new Error(\'Jasny Bootstrap\\\'s JavaScript requires jQuery\') }\n\n',
// Task configuration.
clean: {
dist: ['dist', 'docs/dist'],
jekyll: ['_gh_pages'],
assets: ['assets/css/*.min.css', 'assets/js/*.min.js'],
jade: ['jade/*.jade']
},
jshint: {
options: {
jshintrc: 'js/.jshintrc'
},
grunt: {
options: {
jshintrc: 'grunt/.jshintrc'
},
src: ['Gruntfile.js', 'grunt/*.js']
},
src: {
src: 'js/*.js'
},
test: {
src: 'js/tests/unit/*.js'
},
assets: {
src: ['docs/assets/js/application.js', 'docs/assets/js/customizer.js']
}
},
jscs: {
options: {
config: 'js/.jscs.json',
},
grunt: {
src: ['Gruntfile.js', 'grunt/*.js']
},
src: {
src: 'js/*.js'
},
test: {
src: 'js/tests/unit/*.js'
},
assets: {
src: ['docs/assets/js/application.js', 'docs/assets/js/customizer.js']
}
},
csslint: {
options: {
csslintrc: 'less/.csslintrc'
},
src: [
'dist/css/<%= pkg.name %>.css',
'docs/assets/css/docs.css',
'docs/examples/**/*.css'
]
},
concat: {
options: {
banner: '<%= banner %>\n<%= jqueryCheck %>',
stripBanners: false
},
bootstrap: {
src: [
'js/transition.js',
'js/offcanvas.js',
'js/rowlink.js',
'js/inputmask.js',
'js/fileinput.js'
],
dest: 'dist/js/<%= pkg.name %>.js'
}
},
uglify: {
options: {
report: 'min'
},
bootstrap: {
options: {
banner: '<%= banner %>'
},
src: '<%= concat.bootstrap.dest %>',
dest: 'dist/js/<%= pkg.name %>.min.js'
},
customize: {
options: {
preserveComments: 'some'
},
src: [
'docs/assets/js/vendor/less.min.js',
'docs/assets/js/vendor/jszip.min.js',
'docs/assets/js/vendor/uglify.min.js',
'docs/assets/js/vendor/blob.js',
'docs/assets/js/vendor/filesaver.js',
'docs/assets/js/raw-files.min.js',
'docs/assets/js/customizer.js'
],
dest: 'docs/assets/js/customize.min.js'
},
docsJs: {
options: {
preserveComments: 'some'
},
src: [
'docs/assets/js/vendor/holder.js',
'docs/assets/js/application.js'
],
dest: 'docs/assets/js/docs.min.js'
}
},
less: {
compileCore: {
options: {
strictMath: true,
sourceMap: true,
outputSourceFiles: true,
sourceMapURL: '<%= pkg.name %>.css.map',
sourceMapFilename: 'dist/css/<%= pkg.name %>.css.map'
},
files: {
'dist/css/<%= pkg.name %>.css': 'less/build/<%= pkg.name %>.less'
}
},
minify: {
options: {
cleancss: true,
report: 'min'
},
files: {
'dist/css/<%= pkg.name %>.min.css': 'dist/css/<%= pkg.name %>.css'
}
}
},
cssmin: {
compress: {
options: {
keepSpecialComments: '*',
noAdvanced: true, // turn advanced optimizations off until the issue is fixed in clean-css
report: 'min',
selectorsMergeMode: 'ie8'
},
src: [
'docs/assets/css/docs.css',
'docs/assets/css/pygments-manni.css'
],
dest: 'docs/assets/css/docs.min.css'
}
},
usebanner: {
dist: {
options: {
position: 'top',
banner: '<%= banner %>'
},
files: {
src: [
'dist/css/<%= pkg.name %>.css',
'dist/css/<%= pkg.name %>.min.css'
]
}
}
},
csscomb: {
options: {
config: 'less/.csscomb.json'
},
dist: {
files: {
'dist/css/<%= pkg.name %>.css': 'dist/css/<%= pkg.name %>.css'
}
},
examples: {
expand: true,
cwd: 'docs/examples/',
src: ['**/*.css'],
dest: 'docs/examples/'
}
},
copy: {
docs: {
expand: true,
cwd: './dist',
src: [
'{css,js}/*.min.*',
'css/*.map'
],
dest: 'docs/dist'
}
},
qunit: {
options: {
inject: 'js/tests/unit/phantom.js'
},
files: 'js/tests/index.html'
},
connect: {
server: {
options: {
port: 3000,
base: '.'
}
}
},
jekyll: {
docs: {}
},
jade: {
compile: {
options: {
pretty: true,
data: function () {
var filePath = path.join(__dirname, 'less/build/variables.less');
var fileContent = fs.readFileSync(filePath, {encoding: 'utf8'});
var parser = new BsLessdocParser(fileContent);
return {sections: parser.parseFile()};
}
},
files: {
'docs/_includes/customizer-variables.html': 'docs/jade/customizer-variables.jade',
'docs/_includes/nav-customize.html': 'docs/jade/customizer-nav.jade'
}
}
},
validation: {
options: {
charset: 'utf-8',
doctype: 'HTML5',
failHard: true,
reset: true,
relaxerror: [
'Bad value X-UA-Compatible for attribute http-equiv on element meta.',
'Element img is missing required attribute src.'
]
},
files: {
src: '_gh_pages/**/*.html'
}
},
watch: {
src: {
files: '<%= jshint.src.src %>',
tasks: ['jshint:src', 'qunit']
},
test: {
files: '<%= jshint.test.src %>',
tasks: ['jshint:test', 'qunit']
},
less: {
files: 'less/*.less',
tasks: 'less'
}
},
replace: {
versionNumber: {
src: ['*.js', '*.md', '*.json', '*.yml', 'js/*.js'],
overwrite: true,
replacements: [{
from: grunt.option('oldver'),
to: grunt.option('newver')
}]
}
},
'saucelabs-qunit': {
all: {
options: {
build: process.env.TRAVIS_JOB_ID,
concurrency: 10,
urls: ['http://127.0.0.1:3000/js/tests/index.html'],
browsers: grunt.file.readYAML('test-infra/sauce_browsers.yml')
}
}
},
exec: {
npmUpdate: {
command: 'npm update --silent'
},
npmShrinkWrap: {
command: 'npm shrinkwrap --dev'
}
}
});
// These plugins provide necessary tasks.
require('load-grunt-tasks')(grunt, {scope: 'devDependencies'});
// Docs HTML validation task
grunt.registerTask('validate-html', ['jekyll', 'validation']);
// Test task.
var testSubtasks = [];
// Skip core tests if running a different subset of the test suite
if (!process.env.TWBS_TEST || process.env.TWBS_TEST === 'core') {
testSubtasks = testSubtasks.concat(['dist-css', 'csslint', 'jshint', 'jscs', 'qunit', 'build-customizer-html']);
}
// Skip HTML validation if running a different subset of the test suite
if (!process.env.TWBS_TEST || process.env.TWBS_TEST === 'validate-html') {
testSubtasks.push('validate-html');
}
// Only run Sauce Labs tests if there's a Sauce access key
if (typeof process.env.SAUCE_ACCESS_KEY !== 'undefined' &&
// Skip Sauce if running a different subset of the test suite
(!process.env.TWBS_TEST || process.env.TWBS_TEST === 'sauce-js-unit')) {
testSubtasks.push('connect');
testSubtasks.push('saucelabs-qunit');
}
grunt.registerTask('test', testSubtasks);
// JS distribution task.
grunt.registerTask('dist-js', ['concat', 'uglify']);
// CSS distribution task.
grunt.registerTask('dist-css', ['less', 'cssmin', 'csscomb', 'usebanner']);
// Docs distribution task.
grunt.registerTask('dist-docs', 'copy:docs');
// Full distribution task.
grunt.registerTask('dist', ['clean:dist', 'dist-css', 'dist-js', 'dist-docs']);
// Default task.
grunt.registerTask('default', ['dist', 'build-customizer']);
// Documentation task.
grunt.registerTask('docs', ['jekyll', 'dist-docs']);
// Version numbering task.
// grunt change-version-number --oldver=A.B.C --newver=X.Y.Z
// This can be overzealous, so its changes should always be manually reviewed!
grunt.registerTask('change-version-number', 'replace');
// task for building customizer
grunt.registerTask('build-customizer', ['build-customizer-html', 'build-raw-files']);
grunt.registerTask('build-customizer-html', 'jade');
grunt.registerTask('build-raw-files', 'Add scripts/less files to customizer.', function () {
var banner = grunt.template.process('<%= banner %>');
generateRawFilesJs(banner);
});
// Task for updating the npm packages used by the Travis build.
grunt.registerTask('update-shrinkwrap', ['exec:npmUpdate', 'exec:npmShrinkWrap', '∆update-shrinkwrap']);
grunt.registerTask('∆update-shrinkwrap', function () { updateShrinkwrap.call(this, grunt); });
};

View File

@@ -0,0 +1,176 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS

View File

@@ -0,0 +1,156 @@
# [Jasny Bootstrap](http://jasny.github.io/bootstrap/) [![Build Status](https://secure.travis-ci.org/jasny/bootstrap.png)](http://travis-ci.org/jasny/bootstrap)[![devDependency Status](https://david-dm.org/jasny/bootstrap/dev-status.png)](https://david-dm.org/jasny/bootstrap#info=devDependencies)
Jasny Bootstrap is an extension of the famous [Twitter Bootstrap](http://getbootstrap.com/), adding the following components:
* [Button labels](http://jasny.github.io/bootstrap/css/#buttons-labels)
* [Off canvas navmenu](http://jasny.github.io/bootstrap/components/#navmenu)
* [Fixed alerts](http://jasny.github.io/bootstrap/components/#alerts-fixed)
* [Row link](http://jasny.github.io/bootstrap/javascript/#rowlink)
* [Input mask](http://jasny.github.io/bootstrap/javascript/#inputmask)
* [File input widget](http://jasny.github.io/bootstrap/javascript/#fileinput)
To get started, check out <http://jasny.github.io/bootstrap>!
## Quick start
Three quick start options are available:
* [Download the latest release](https://github.com/jasny/bootstrap/releases/download/v3.1.0/jasny-bootstrap-3.1.0-dist.zip).
* Clone the repo: `git clone git://github.com/jasny/bootstrap.git`.
* Install with [Bower](http://bower.io): `bower install bootstrap=jasny-bootstrap`.
Read the [Getting Started page](http://jasny.github.io/bootstrap/getting-started/) for information on the framework contents, templates and examples, and more.
### What's included
Within the download you'll find the following directories and files, logically grouping common assets and providing both compiled and minified variations. You'll see something like this:
```
jasny-bootstrap/
├── css/
│ ├── jasny-bootstrap.css
│ ├── jasny-bootstrap.min.css
└── js/
├── jasny-bootstrap.js
└── jasny-bootstrap.min.js
```
We provide compiled CSS and JS (`jasny-bootstrap.*`), as well as compiled and minified CSS and JS (`jasny-bootstrap.min.*`).
Jasny Bootstrap should be loaded after Twitter Bootstrap.
## Bugs and feature requests
Have a bug or a feature request? [Please open a new issue](https://github.com/jasny/bootstrap/issues). Before opening any issue, please search for existing issues and read the [Issue Guidelines](https://github.com/necolas/issue-guidelines), written by [Nicolas Gallagher](https://github.com/necolas/).
You may use [this JS Bin](http://jsbin.com/iKumuWo/1/edit) as a template for your bug reports.
## Documentation
Jasny Bootstrap's documentation, included in this repo in the root directory, is built with [Jekyll](http://jekyllrb.com) and publicly hosted on GitHub Pages at <http://jasny.github.io/bootstrap>. The docs may also be run locally.
### Running documentation locally
1. If necessary, [install Jekyll](http://jekyllrb.com/docs/installation) (requires v1.x).
2. From the root `/bootstrap` directory, run `jekyll serve` in the command line.
- **Windows users:** run `chcp 65001` first to change the command prompt's character encoding ([code page](http://en.wikipedia.org/wiki/Windows_code_page)) to UTF-8 so Jekyll runs without errors.
3. Open <http://localhost:9001> in your browser, and voilà.
Learn more about using Jekyll by reading its [documentation](http://jekyllrb.com/docs/home/).
### Documentation for previous releases
Documentation for v2.3.1 has been made available for the time being at <http://jasny.github.io/bootstrap/2.3.1/> while folks transition to Bootstrap 3.
[Previous releases](https://github.com/jasny/bootstrap/releases) and their documentation are also available for download.
## Compiling CSS and JavaScript
Bootstrap uses [Grunt](http://gruntjs.com/) with convenient methods for working with the framework. It's how we compile our code, run tests, and more. To use it, install the required dependencies as directed and then run some Grunt commands.
### Install Grunt
From the command line:
1. Install `grunt-cli` globally with `npm install -g grunt-cli`.
2. Navigate to the root `/bootstrap` directory, then run `npm install`. npm will look at [package.json](package.json) and automatically install the necessary local dependencies listed there.
When completed, you'll be able to run the various Grunt commands provided from the command line.
**Unfamiliar with `npm`? Don't have node installed?** That's a-okay. npm stands for [node packaged modules](http://npmjs.org/) and is a way to manage development dependencies through node.js. [Download and install node.js](http://nodejs.org/download/) before proceeding.
### Available Grunt commands
#### Build - `grunt`
Run `grunt` to run tests locally and compile the CSS and JavaScript into `/dist`. **Uses [recess](http://twitter.github.io/recess/) and [UglifyJS](http://lisperator.net/uglifyjs/).**
#### Only compile CSS and JavaScript - `grunt dist`
`grunt dist` creates the `/dist` directory with compiled files. **Uses [recess](http://twitter.github.io/recess/) and [UglifyJS](http://lisperator.net/uglifyjs/).**
#### Tests - `grunt test`
Runs [JSHint](http://jshint.com) and [QUnit](http://qunitjs.com/) tests headlessly in [PhantomJS](http://phantomjs.org/) (used for CI).
#### Watch - `grunt watch`
This is a convenience method for watching just Less files and automatically building them whenever you save.
### Troubleshooting dependencies
Should you encounter problems with installing dependencies or running Grunt commands, uninstall all previous dependency versions (global and local). Then, rerun `npm install`.
## Contributing
Please read through our [contributing guidelines](https://github.com/jasny/bootstrap/blob/master/CONTRIBUTING.md). Included are directions for opening issues, coding standards, and notes on development.
More over, if your pull request contains JavaScript patches or features, you must include relevant unit tests. All HTML and CSS should conform to the [Code Guide](http://github.com/mdo/code-guide), maintained by [Mark Otto](http://github.com/mdo).
Editor preferences are available in the [editor config](.editorconfig) for easy use in common text editors. Read more and download plugins at <http://editorconfig.org>.
## Community
Keep track of development and community news.
* Follow [@ArnoldDaniels on Twitter](http://twitter.com/ArnoldDaniels).
* Have a question that's not a feature request or bug report? [Ask on stackoverflow.](http://stackoverflow.com/)
## Versioning
For transparency into our release cycle and in striving to maintain backward compatibility, Jasny Bootstrap is maintained under the Semantic Versioning guidelines. Sometimes we screw up, but we'll adhere to these rules whenever possible.
Releases will be numbered with the following format:
`<major>.<minor>.<patch>`
And constructed with the following guidelines:
- Breaking backward compatibility **bumps the major** while resetting minor and patch
- New additions without breaking backward compatibility **bumps the minor** while resetting the patch
- Bug fixes and misc changes **bumps only the patch**
For more information on SemVer, please visit <http://semver.org/>.
__The major version will follow Twitter Bootstraps major version. This means backward compatibility will only be broken if Twitter Bootstrap does so.__
## Authors
**Arnold Daniels**
+ [http://twitter.com/ArnoldDaniels](http://twitter.com/ArnoldDaniels)
+ [http://github.com/jasny](http://github.com/jasny)
+ [http://jasny.net](http://jasny.net)
## Copyright and license
Copyright 2013 Jasny BV under [the Apache 2.0 license](LICENSE).

View File

@@ -0,0 +1,21 @@
{
"name": "jasny-bootstrap",
"version": "3.1.3",
"main": [
"./dist/css/jasny-bootstrap.css",
"./dist/js/jasny-bootstrap.js"
],
"ignore": [
"**/.*",
"_config.yml",
"CNAME",
"composer.json",
"CONTRIBUTING.md",
"docs",
"js/tests"
],
"dependencies": {
"jquery": ">= 1.9.0",
"bootstrap": ">= 3.1.0"
}
}

View File

@@ -0,0 +1,621 @@
/*!
* Jasny Bootstrap v3.1.3 (http://jasny.github.io/bootstrap)
* Copyright 2012-2014 Arnold Daniels
* Licensed under Apache-2.0 (https://github.com/jasny/bootstrap/blob/master/LICENSE)
*/
.container-smooth {
max-width: 1170px;
}
@media (min-width: 1px) {
.container-smooth {
width: auto;
}
}
.btn-labeled {
padding-top: 0;
padding-bottom: 0;
}
.btn-label {
position: relative;
left: -12px;
display: inline-block;
padding: 6px 12px;
background: transparent;
background: rgba(0, 0, 0, .15);
border-radius: 3px 0 0 3px;
}
.btn-label.btn-label-right {
right: -12px;
left: auto;
border-radius: 0 3px 3px 0;
}
.btn-lg .btn-label {
left: -16px;
padding: 10px 16px;
border-radius: 5px 0 0 5px;
}
.btn-lg .btn-label.btn-label-right {
right: -16px;
left: auto;
border-radius: 0 5px 5px 0;
}
.btn-sm .btn-label {
left: -10px;
padding: 5px 10px;
border-radius: 2px 0 0 2px;
}
.btn-sm .btn-label.btn-label-right {
right: -10px;
left: auto;
border-radius: 0 2px 2px 0;
}
.btn-xs .btn-label {
left: -5px;
padding: 1px 5px;
border-radius: 2px 0 0 2px;
}
.btn-xs .btn-label.btn-label-right {
right: -5px;
left: auto;
border-radius: 0 2px 2px 0;
}
.nav-tabs-bottom {
border-top: 1px solid #ddd;
border-bottom: 0;
}
.nav-tabs-bottom > li {
margin-top: -1px;
margin-bottom: 0;
}
.nav-tabs-bottom > li > a {
border-radius: 0 0 4px 4px;
}
.nav-tabs-bottom > li > a:hover,
.nav-tabs-bottom > li > a:focus,
.nav-tabs-bottom > li.active > a,
.nav-tabs-bottom > li.active > a:hover,
.nav-tabs-bottom > li.active > a:focus {
border: 1px solid #ddd;
border-top-color: transparent;
}
.nav-tabs-left {
border-right: 1px solid #ddd;
border-bottom: 0;
}
.nav-tabs-left > li {
float: none;
margin-right: -1px;
margin-bottom: 0;
}
.nav-tabs-left > li > a {
margin-right: 0;
margin-bottom: 2px;
border-radius: 4px 0 0 4px;
}
.nav-tabs-left > li > a:hover,
.nav-tabs-left > li > a:focus,
.nav-tabs-left > li.active > a,
.nav-tabs-left > li.active > a:hover,
.nav-tabs-left > li.active > a:focus {
border: 1px solid #ddd;
border-right-color: transparent;
}
.row > .nav-tabs-left {
position: relative;
z-index: 1;
padding-right: 0;
padding-left: 15px;
margin-right: -1px;
}
.row > .nav-tabs-left + .tab-content {
border-left: 1px solid #ddd;
}
.nav-tabs-right {
border-bottom: 0;
border-left: 1px solid #ddd;
}
.nav-tabs-right > li {
float: none;
margin-bottom: 0;
margin-left: -1px;
}
.nav-tabs-right > li > a {
margin-bottom: 2px;
margin-left: 0;
border-radius: 0 4px 4px 0;
}
.nav-tabs-right > li > a:hover,
.nav-tabs-right > li > a:focus,
.nav-tabs-right > li.active > a,
.nav-tabs-right > li.active > a:hover,
.nav-tabs-right > li.active > a:focus {
border: 1px solid #ddd;
border-left-color: transparent;
}
.row > .nav-tabs-right {
padding-right: 15px;
padding-left: 0;
}
.navmenu,
.navbar-offcanvas {
width: 300px;
height: auto;
border-style: solid;
border-width: 1px;
border-radius: 4px;
}
.navmenu-fixed-left,
.navmenu-fixed-right,
.navbar-offcanvas {
position: fixed;
top: 0;
bottom: 0;
z-index: 1030;
overflow-y: auto;
border-radius: 0;
}
.navmenu-fixed-left,
.navbar-offcanvas.navmenu-fixed-left {
right: auto;
left: 0;
border-width: 0 1px 0 0;
}
.navmenu-fixed-right,
.navbar-offcanvas {
right: 0;
left: auto;
border-width: 0 0 0 1px;
}
.navmenu-nav {
margin-bottom: 10px;
}
.navmenu-nav.dropdown-menu {
position: static;
float: none;
padding-top: 0;
margin: 0;
border: none;
border-radius: 0;
-webkit-box-shadow: none;
box-shadow: none;
}
.navbar-offcanvas .navbar-nav {
margin: 0;
}
@media (min-width: 768px) {
.navbar-offcanvas {
width: auto;
border-top: 0;
box-shadow: none;
}
.navbar-offcanvas.offcanvas {
position: static;
display: block !important;
height: auto !important;
padding-bottom: 0;
overflow: visible !important;
}
.navbar-offcanvas .navbar-nav.navbar-left:first-child {
margin-left: -15px;
}
.navbar-offcanvas .navbar-nav.navbar-right:last-child {
margin-right: -15px;
}
.navbar-offcanvas .navmenu-brand {
display: none;
}
}
.navmenu-brand {
display: block;
padding: 10px 15px;
margin: 10px 0;
font-size: 18px;
line-height: 20px;
}
.navmenu-brand:hover,
.navmenu-brand:focus {
text-decoration: none;
}
.navmenu-default,
.navbar-default .navbar-offcanvas {
background-color: #f8f8f8;
border-color: #e7e7e7;
}
.navmenu-default .navmenu-brand,
.navbar-default .navbar-offcanvas .navmenu-brand {
color: #777;
}
.navmenu-default .navmenu-brand:hover,
.navbar-default .navbar-offcanvas .navmenu-brand:hover,
.navmenu-default .navmenu-brand:focus,
.navbar-default .navbar-offcanvas .navmenu-brand:focus {
color: #5e5e5e;
background-color: transparent;
}
.navmenu-default .navmenu-text,
.navbar-default .navbar-offcanvas .navmenu-text {
color: #777;
}
.navmenu-default .navmenu-nav > .dropdown > a:hover .caret,
.navbar-default .navbar-offcanvas .navmenu-nav > .dropdown > a:hover .caret,
.navmenu-default .navmenu-nav > .dropdown > a:focus .caret,
.navbar-default .navbar-offcanvas .navmenu-nav > .dropdown > a:focus .caret {
border-top-color: #333;
border-bottom-color: #333;
}
.navmenu-default .navmenu-nav > .open > a,
.navbar-default .navbar-offcanvas .navmenu-nav > .open > a,
.navmenu-default .navmenu-nav > .open > a:hover,
.navbar-default .navbar-offcanvas .navmenu-nav > .open > a:hover,
.navmenu-default .navmenu-nav > .open > a:focus,
.navbar-default .navbar-offcanvas .navmenu-nav > .open > a:focus {
color: #555;
background-color: #e7e7e7;
}
.navmenu-default .navmenu-nav > .open > a .caret,
.navbar-default .navbar-offcanvas .navmenu-nav > .open > a .caret,
.navmenu-default .navmenu-nav > .open > a:hover .caret,
.navbar-default .navbar-offcanvas .navmenu-nav > .open > a:hover .caret,
.navmenu-default .navmenu-nav > .open > a:focus .caret,
.navbar-default .navbar-offcanvas .navmenu-nav > .open > a:focus .caret {
border-top-color: #555;
border-bottom-color: #555;
}
.navmenu-default .navmenu-nav > .dropdown > a .caret,
.navbar-default .navbar-offcanvas .navmenu-nav > .dropdown > a .caret {
border-top-color: #777;
border-bottom-color: #777;
}
.navmenu-default .navmenu-nav.dropdown-menu,
.navbar-default .navbar-offcanvas .navmenu-nav.dropdown-menu {
background-color: #e7e7e7;
}
.navmenu-default .navmenu-nav.dropdown-menu > .divider,
.navbar-default .navbar-offcanvas .navmenu-nav.dropdown-menu > .divider {
background-color: #f8f8f8;
}
.navmenu-default .navmenu-nav.dropdown-menu > .active > a,
.navbar-default .navbar-offcanvas .navmenu-nav.dropdown-menu > .active > a,
.navmenu-default .navmenu-nav.dropdown-menu > .active > a:hover,
.navbar-default .navbar-offcanvas .navmenu-nav.dropdown-menu > .active > a:hover,
.navmenu-default .navmenu-nav.dropdown-menu > .active > a:focus,
.navbar-default .navbar-offcanvas .navmenu-nav.dropdown-menu > .active > a:focus {
background-color: #d7d7d7;
}
.navmenu-default .navmenu-nav > li > a,
.navbar-default .navbar-offcanvas .navmenu-nav > li > a {
color: #777;
}
.navmenu-default .navmenu-nav > li > a:hover,
.navbar-default .navbar-offcanvas .navmenu-nav > li > a:hover,
.navmenu-default .navmenu-nav > li > a:focus,
.navbar-default .navbar-offcanvas .navmenu-nav > li > a:focus {
color: #333;
background-color: transparent;
}
.navmenu-default .navmenu-nav > .active > a,
.navbar-default .navbar-offcanvas .navmenu-nav > .active > a,
.navmenu-default .navmenu-nav > .active > a:hover,
.navbar-default .navbar-offcanvas .navmenu-nav > .active > a:hover,
.navmenu-default .navmenu-nav > .active > a:focus,
.navbar-default .navbar-offcanvas .navmenu-nav > .active > a:focus {
color: #555;
background-color: #e7e7e7;
}
.navmenu-default .navmenu-nav > .disabled > a,
.navbar-default .navbar-offcanvas .navmenu-nav > .disabled > a,
.navmenu-default .navmenu-nav > .disabled > a:hover,
.navbar-default .navbar-offcanvas .navmenu-nav > .disabled > a:hover,
.navmenu-default .navmenu-nav > .disabled > a:focus,
.navbar-default .navbar-offcanvas .navmenu-nav > .disabled > a:focus {
color: #ccc;
background-color: transparent;
}
.navmenu-inverse,
.navbar-inverse .navbar-offcanvas {
background-color: #222;
border-color: #080808;
}
.navmenu-inverse .navmenu-brand,
.navbar-inverse .navbar-offcanvas .navmenu-brand {
color: #999;
}
.navmenu-inverse .navmenu-brand:hover,
.navbar-inverse .navbar-offcanvas .navmenu-brand:hover,
.navmenu-inverse .navmenu-brand:focus,
.navbar-inverse .navbar-offcanvas .navmenu-brand:focus {
color: #fff;
background-color: transparent;
}
.navmenu-inverse .navmenu-text,
.navbar-inverse .navbar-offcanvas .navmenu-text {
color: #999;
}
.navmenu-inverse .navmenu-nav > .dropdown > a:hover .caret,
.navbar-inverse .navbar-offcanvas .navmenu-nav > .dropdown > a:hover .caret,
.navmenu-inverse .navmenu-nav > .dropdown > a:focus .caret,
.navbar-inverse .navbar-offcanvas .navmenu-nav > .dropdown > a:focus .caret {
border-top-color: #fff;
border-bottom-color: #fff;
}
.navmenu-inverse .navmenu-nav > .open > a,
.navbar-inverse .navbar-offcanvas .navmenu-nav > .open > a,
.navmenu-inverse .navmenu-nav > .open > a:hover,
.navbar-inverse .navbar-offcanvas .navmenu-nav > .open > a:hover,
.navmenu-inverse .navmenu-nav > .open > a:focus,
.navbar-inverse .navbar-offcanvas .navmenu-nav > .open > a:focus {
color: #fff;
background-color: #080808;
}
.navmenu-inverse .navmenu-nav > .open > a .caret,
.navbar-inverse .navbar-offcanvas .navmenu-nav > .open > a .caret,
.navmenu-inverse .navmenu-nav > .open > a:hover .caret,
.navbar-inverse .navbar-offcanvas .navmenu-nav > .open > a:hover .caret,
.navmenu-inverse .navmenu-nav > .open > a:focus .caret,
.navbar-inverse .navbar-offcanvas .navmenu-nav > .open > a:focus .caret {
border-top-color: #fff;
border-bottom-color: #fff;
}
.navmenu-inverse .navmenu-nav > .dropdown > a .caret,
.navbar-inverse .navbar-offcanvas .navmenu-nav > .dropdown > a .caret {
border-top-color: #999;
border-bottom-color: #999;
}
.navmenu-inverse .navmenu-nav.dropdown-menu,
.navbar-inverse .navbar-offcanvas .navmenu-nav.dropdown-menu {
background-color: #080808;
}
.navmenu-inverse .navmenu-nav.dropdown-menu > .divider,
.navbar-inverse .navbar-offcanvas .navmenu-nav.dropdown-menu > .divider {
background-color: #222;
}
.navmenu-inverse .navmenu-nav.dropdown-menu > .active > a,
.navbar-inverse .navbar-offcanvas .navmenu-nav.dropdown-menu > .active > a,
.navmenu-inverse .navmenu-nav.dropdown-menu > .active > a:hover,
.navbar-inverse .navbar-offcanvas .navmenu-nav.dropdown-menu > .active > a:hover,
.navmenu-inverse .navmenu-nav.dropdown-menu > .active > a:focus,
.navbar-inverse .navbar-offcanvas .navmenu-nav.dropdown-menu > .active > a:focus {
background-color: #000;
}
.navmenu-inverse .navmenu-nav > li > a,
.navbar-inverse .navbar-offcanvas .navmenu-nav > li > a {
color: #999;
}
.navmenu-inverse .navmenu-nav > li > a:hover,
.navbar-inverse .navbar-offcanvas .navmenu-nav > li > a:hover,
.navmenu-inverse .navmenu-nav > li > a:focus,
.navbar-inverse .navbar-offcanvas .navmenu-nav > li > a:focus {
color: #fff;
background-color: transparent;
}
.navmenu-inverse .navmenu-nav > .active > a,
.navbar-inverse .navbar-offcanvas .navmenu-nav > .active > a,
.navmenu-inverse .navmenu-nav > .active > a:hover,
.navbar-inverse .navbar-offcanvas .navmenu-nav > .active > a:hover,
.navmenu-inverse .navmenu-nav > .active > a:focus,
.navbar-inverse .navbar-offcanvas .navmenu-nav > .active > a:focus {
color: #fff;
background-color: #080808;
}
.navmenu-inverse .navmenu-nav > .disabled > a,
.navbar-inverse .navbar-offcanvas .navmenu-nav > .disabled > a,
.navmenu-inverse .navmenu-nav > .disabled > a:hover,
.navbar-inverse .navbar-offcanvas .navmenu-nav > .disabled > a:hover,
.navmenu-inverse .navmenu-nav > .disabled > a:focus,
.navbar-inverse .navbar-offcanvas .navmenu-nav > .disabled > a:focus {
color: #444;
background-color: transparent;
}
.alert-fixed-top,
.alert-fixed-bottom {
position: fixed;
left: 0;
z-index: 1035;
width: 100%;
margin: 0;
border-radius: 0;
}
@media (min-width: 992px) {
.alert-fixed-top,
.alert-fixed-bottom {
left: 50%;
width: 992px;
margin-left: -496px;
}
}
.alert-fixed-top {
top: 0;
border-width: 0 0 1px 0;
}
@media (min-width: 992px) {
.alert-fixed-top {
border-width: 0 1px 1px 1px;
border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px;
}
}
.alert-fixed-bottom {
bottom: 0;
border-width: 1px 0 0 0;
}
@media (min-width: 992px) {
.alert-fixed-bottom {
border-width: 1px 1px 0 1px;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
}
}
.offcanvas {
display: none;
}
.offcanvas.in {
display: block;
}
@media (max-width: 767px) {
.offcanvas-xs {
display: none;
}
.offcanvas-xs.in {
display: block;
}
}
@media (max-width: 991px) {
.offcanvas-sm {
display: none;
}
.offcanvas-sm.in {
display: block;
}
}
@media (max-width: 1199px) {
.offcanvas-md {
display: none;
}
.offcanvas-md.in {
display: block;
}
}
.offcanvas-lg {
display: none;
}
.offcanvas-lg.in {
display: block;
}
.canvas-sliding {
-webkit-transition: top .35s, left .35s, bottom .35s, right .35s;
transition: top .35s, left .35s, bottom .35s, right .35s;
}
.offcanvas-clone {
position: absolute !important;
top: auto !important;
right: 0 !important;
bottom: 0 !important;
left: auto !important;
width: 0 !important;
height: 0 !important;
padding: 0 !important;
margin: 0 !important;
overflow: hidden !important;
border: none !important;
opacity: 0 !important;
}
.table.rowlink td:not(.rowlink-skip),
.table .rowlink td:not(.rowlink-skip) {
cursor: pointer;
}
.table.rowlink td:not(.rowlink-skip) a,
.table .rowlink td:not(.rowlink-skip) a {
font: inherit;
color: inherit;
text-decoration: inherit;
}
.table-hover.rowlink tr:hover td,
.table-hover .rowlink tr:hover td {
background-color: #cfcfcf;
}
.btn-file {
position: relative;
overflow: hidden;
vertical-align: middle;
}
.btn-file > input {
position: absolute;
top: 0;
right: 0;
width: 100%;
height: 100%;
margin: 0;
font-size: 23px;
cursor: pointer;
filter: alpha(opacity=0);
opacity: 0;
direction: ltr;
}
.fileinput {
display: inline-block;
margin-bottom: 9px;
}
.fileinput .form-control {
display: inline-block;
padding-top: 7px;
padding-bottom: 5px;
margin-bottom: 0;
vertical-align: middle;
cursor: text;
}
.fileinput .thumbnail {
display: inline-block;
margin-bottom: 5px;
overflow: hidden;
text-align: center;
vertical-align: middle;
}
.fileinput .thumbnail > img {
max-height: 100%;
}
.fileinput .btn {
vertical-align: middle;
}
.fileinput-exists .fileinput-new,
.fileinput-new .fileinput-exists {
display: none;
}
.fileinput-inline .fileinput-controls {
display: inline;
}
.fileinput-filename {
display: inline-block;
overflow: hidden;
vertical-align: middle;
}
.form-control .fileinput-filename {
vertical-align: bottom;
}
.fileinput.input-group {
display: table;
}
.fileinput.input-group > * {
position: relative;
z-index: 2;
}
.fileinput.input-group > .btn-file {
z-index: 1;
}
.fileinput-new.input-group .btn-file,
.fileinput-new .input-group .btn-file {
border-radius: 0 4px 4px 0;
}
.fileinput-new.input-group .btn-file.btn-xs,
.fileinput-new .input-group .btn-file.btn-xs,
.fileinput-new.input-group .btn-file.btn-sm,
.fileinput-new .input-group .btn-file.btn-sm {
border-radius: 0 3px 3px 0;
}
.fileinput-new.input-group .btn-file.btn-lg,
.fileinput-new .input-group .btn-file.btn-lg {
border-radius: 0 6px 6px 0;
}
.form-group.has-warning .fileinput .fileinput-preview {
color: #8a6d3b;
}
.form-group.has-warning .fileinput .thumbnail {
border-color: #faebcc;
}
.form-group.has-error .fileinput .fileinput-preview {
color: #a94442;
}
.form-group.has-error .fileinput .thumbnail {
border-color: #ebccd1;
}
.form-group.has-success .fileinput .fileinput-preview {
color: #3c763d;
}
.form-group.has-success .fileinput .thumbnail {
border-color: #d6e9c6;
}
.input-group-addon:not(:first-child) {
border-left: 0;
}
/*# sourceMappingURL=jasny-bootstrap.css.map */

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,236 @@
/*!
* Bootstrap Grunt task for parsing Less docstrings
* http://getbootstrap.com
* Copyright 2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
'use strict';
var markdown = require('markdown').markdown;
function markdown2html(markdownString) {
// the slice removes the <p>...</p> wrapper output by Markdown processor
return markdown.toHTML(markdownString.trim()).slice(3, -4);
}
/*
Mini-language:
//== This is a normal heading, which starts a section. Sections group variables together.
//## Optional description for the heading
//=== This is a subheading.
//** Optional description for the following variable. You **can** use Markdown in descriptions to discuss `<html>` stuff.
@foo: #ffff;
//-- This is a heading for a section whose variables shouldn't be customizable
All other lines are ignored completely.
*/
var CUSTOMIZABLE_HEADING = /^[/]{2}={2}(.*)$/;
var UNCUSTOMIZABLE_HEADING = /^[/]{2}-{2}(.*)$/;
var SUBSECTION_HEADING = /^[/]{2}={3}(.*)$/;
var SECTION_DOCSTRING = /^[/]{2}#{2}(.*)$/;
var VAR_ASSIGNMENT = /^(@[a-zA-Z0-9_-]+):[ ]*([^ ;][^;]+);[ ]*$/;
var VAR_DOCSTRING = /^[/]{2}[*]{2}(.*)$/;
function Section(heading, customizable) {
this.heading = heading.trim();
this.id = this.heading.replace(/\s+/g, '-').toLowerCase();
this.customizable = customizable;
this.docstring = null;
this.subsections = [];
}
Section.prototype.addSubSection = function (subsection) {
this.subsections.push(subsection);
};
function SubSection(heading) {
this.heading = heading.trim();
this.id = this.heading.replace(/\s+/g, '-').toLowerCase();
this.variables = [];
}
SubSection.prototype.addVar = function (variable) {
this.variables.push(variable);
};
function VarDocstring(markdownString) {
this.html = markdown2html(markdownString);
}
function SectionDocstring(markdownString) {
this.html = markdown2html(markdownString);
}
function Variable(name, defaultValue) {
this.name = name;
this.defaultValue = defaultValue;
this.docstring = null;
}
function Tokenizer(fileContent) {
this._lines = fileContent.split('\n');
this._next = undefined;
}
Tokenizer.prototype.unshift = function (token) {
if (this._next !== undefined) {
throw new Error('Attempted to unshift twice!');
}
this._next = token;
};
Tokenizer.prototype._shift = function () {
// returning null signals EOF
// returning undefined means the line was ignored
if (this._next !== undefined) {
var result = this._next;
this._next = undefined;
return result;
}
if (this._lines.length <= 0) {
return null;
}
var line = this._lines.shift();
var match = null;
match = SUBSECTION_HEADING.exec(line);
if (match !== null) {
return new SubSection(match[1]);
}
match = CUSTOMIZABLE_HEADING.exec(line);
if (match !== null) {
return new Section(match[1], true);
}
match = UNCUSTOMIZABLE_HEADING.exec(line);
if (match !== null) {
return new Section(match[1], false);
}
match = SECTION_DOCSTRING.exec(line);
if (match !== null) {
return new SectionDocstring(match[1]);
}
match = VAR_DOCSTRING.exec(line);
if (match !== null) {
return new VarDocstring(match[1]);
}
var commentStart = line.lastIndexOf('//');
var varLine = (commentStart === -1) ? line : line.slice(0, commentStart);
match = VAR_ASSIGNMENT.exec(varLine);
if (match !== null) {
return new Variable(match[1], match[2]);
}
return undefined;
};
Tokenizer.prototype.shift = function () {
while (true) {
var result = this._shift();
if (result === undefined) {
continue;
}
return result;
}
};
function Parser(fileContent) {
this._tokenizer = new Tokenizer(fileContent);
}
Parser.prototype.parseFile = function () {
var sections = [];
while (true) {
var section = this.parseSection();
if (section === null) {
if (this._tokenizer.shift() !== null) {
throw new Error('Unexpected unparsed section of file remains!');
}
return sections;
}
sections.push(section);
}
};
Parser.prototype.parseSection = function () {
var section = this._tokenizer.shift();
if (section === null) {
return null;
}
if (!(section instanceof Section)) {
throw new Error('Expected section heading; got: ' + JSON.stringify(section));
}
var docstring = this._tokenizer.shift();
if (docstring instanceof SectionDocstring) {
section.docstring = docstring;
}
else {
this._tokenizer.unshift(docstring);
}
this.parseSubSections(section);
return section;
};
Parser.prototype.parseSubSections = function (section) {
while (true) {
var subsection = this.parseSubSection();
if (subsection === null) {
if (section.subsections.length === 0) {
// Presume an implicit initial subsection
subsection = new SubSection('');
this.parseVars(subsection);
}
else {
break;
}
}
section.addSubSection(subsection);
}
if (section.subsections.length === 1 && !(section.subsections[0].heading) && section.subsections[0].variables.length === 0) {
// Ignore lone empty implicit subsection
section.subsections = [];
}
};
Parser.prototype.parseSubSection = function () {
var subsection = this._tokenizer.shift();
if (subsection instanceof SubSection) {
this.parseVars(subsection);
return subsection;
}
this._tokenizer.unshift(subsection);
return null;
};
Parser.prototype.parseVars = function (subsection) {
while (true) {
var variable = this.parseVar();
if (variable === null) {
return;
}
subsection.addVar(variable);
}
};
Parser.prototype.parseVar = function () {
var docstring = this._tokenizer.shift();
if (!(docstring instanceof VarDocstring)) {
this._tokenizer.unshift(docstring);
docstring = null;
}
var variable = this._tokenizer.shift();
if (variable instanceof Variable) {
variable.docstring = docstring;
return variable;
}
this._tokenizer.unshift(variable);
return null;
};
module.exports = Parser;

View File

@@ -0,0 +1,36 @@
/* global btoa: true */
/*!
* Bootstrap Grunt task for generating raw-files.min.js for the Customizer
* http://getbootstrap.com
* Copyright 2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
'use strict';
var btoa = require('btoa');
var fs = require('fs');
function getFiles(type, subdirs, exclude) {
var files = {};
exclude = exclude || [];
subdirs.forEach(function(subdir) {
var sub = subdir ? subdir + '/' : '';
fs.readdirSync(type + '/' + sub)
.filter(function (path) {
return new RegExp('\\.' + type + '$').test(path) && exclude.indexOf(sub + path) === -1;
})
.forEach(function (path) {
var fullPath = type + '/' + sub + path;
files[sub + path] = fs.readFileSync(fullPath, 'utf8');
});
});
return 'var __' + type + ' = ' + JSON.stringify(files) + '\n';
}
module.exports = function generateRawFilesJs(banner) {
if (!banner) {
banner = '';
}
var files = banner + getFiles('js', ['']) + getFiles('less', ['', 'build'], ['build/jasny-bootstrap.less']);
fs.writeFileSync('docs/assets/js/raw-files.min.js', files);
};

View File

@@ -0,0 +1,28 @@
/*!
* Bootstrap Grunt task for generating npm-shrinkwrap.canonical.json
* http://getbootstrap.com
* Copyright 2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
/*
This Grunt task updates the npm-shrinkwrap.canonical.json file that's used as the key for Bootstrap's npm packages cache.
This task should be run and the updated file should be committed whenever Bootstrap's dependencies change.
*/
'use strict';
var canonicallyJsonStringify = require('canonical-json');
var NON_CANONICAL_FILE = 'npm-shrinkwrap.json';
var DEST_FILE = 'test-infra/npm-shrinkwrap.canonical.json';
function updateShrinkwrap(grunt) {
// Assumption: Non-canonical shrinkwrap already generated by prerequisite Grunt task
var shrinkwrapData = grunt.file.readJSON(NON_CANONICAL_FILE);
grunt.log.writeln('Deleting ' + NON_CANONICAL_FILE.cyan + '...');
grunt.file.delete(NON_CANONICAL_FILE);
// Output as Canonical JSON in correct location
grunt.file.write(DEST_FILE, canonicallyJsonStringify(shrinkwrapData));
grunt.log.writeln('File ' + DEST_FILE.cyan + ' updated.');
}
module.exports = updateShrinkwrap;

View File

@@ -0,0 +1,198 @@
/* ===========================================================
* Bootstrap: fileinput.js v3.1.3
* http://jasny.github.com/bootstrap/javascript/#fileinput
* ===========================================================
* Copyright 2012-2014 Arnold Daniels
*
* 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.
* ========================================================== */
+function ($) { "use strict";
var isIE = window.navigator.appName == 'Microsoft Internet Explorer'
// FILEUPLOAD PUBLIC CLASS DEFINITION
// =================================
var Fileinput = function (element, options) {
this.$element = $(element)
this.$input = this.$element.find(':file')
if (this.$input.length === 0) return
this.name = this.$input.attr('name') || options.name
this.$hidden = this.$element.find('input[type=hidden][name="' + this.name + '"]')
if (this.$hidden.length === 0) {
this.$hidden = $('<input type="hidden">').insertBefore(this.$input)
}
this.$preview = this.$element.find('.fileinput-preview')
var height = this.$preview.css('height')
if (this.$preview.css('display') !== 'inline' && height !== '0px' && height !== 'none') {
this.$preview.css('line-height', height)
}
this.original = {
exists: this.$element.hasClass('fileinput-exists'),
preview: this.$preview.html(),
hiddenVal: this.$hidden.val()
}
this.listen()
}
Fileinput.prototype.listen = function() {
this.$input.on('change.bs.fileinput', $.proxy(this.change, this))
$(this.$input[0].form).on('reset.bs.fileinput', $.proxy(this.reset, this))
this.$element.find('[data-trigger="fileinput"]').on('click.bs.fileinput', $.proxy(this.trigger, this))
this.$element.find('[data-dismiss="fileinput"]').on('click.bs.fileinput', $.proxy(this.clear, this))
},
Fileinput.prototype.change = function(e) {
var files = e.target.files === undefined ? (e.target && e.target.value ? [{ name: e.target.value.replace(/^.+\\/, '')}] : []) : e.target.files
e.stopPropagation()
if (files.length === 0) {
this.clear()
return
}
this.$hidden.val('')
this.$hidden.attr('name', '')
this.$input.attr('name', this.name)
var file = files[0]
if (this.$preview.length > 0 && (typeof file.type !== "undefined" ? file.type.match(/^image\/(gif|png|jpeg)$/) : file.name.match(/\.(gif|png|jpe?g)$/i)) && typeof FileReader !== "undefined") {
var reader = new FileReader()
var preview = this.$preview
var element = this.$element
reader.onload = function(re) {
var $img = $('<img>')
$img[0].src = re.target.result
files[0].result = re.target.result
element.find('.fileinput-filename').text(file.name)
// if parent has max-height, using `(max-)height: 100%` on child doesn't take padding and border into account
if (preview.css('max-height') != 'none') $img.css('max-height', parseInt(preview.css('max-height'), 10) - parseInt(preview.css('padding-top'), 10) - parseInt(preview.css('padding-bottom'), 10) - parseInt(preview.css('border-top'), 10) - parseInt(preview.css('border-bottom'), 10))
preview.html($img)
element.addClass('fileinput-exists').removeClass('fileinput-new')
element.trigger('change.bs.fileinput', files)
}
reader.readAsDataURL(file)
} else {
this.$element.find('.fileinput-filename').text(file.name)
this.$preview.text(file.name)
this.$element.addClass('fileinput-exists').removeClass('fileinput-new')
this.$element.trigger('change.bs.fileinput')
}
},
Fileinput.prototype.clear = function(e) {
if (e) e.preventDefault()
this.$hidden.val('')
this.$hidden.attr('name', this.name)
this.$input.attr('name', '')
//ie8+ doesn't support changing the value of input with type=file so clone instead
if (isIE) {
var inputClone = this.$input.clone(true);
this.$input.after(inputClone);
this.$input.remove();
this.$input = inputClone;
} else {
this.$input.val('')
}
this.$preview.html('')
this.$element.find('.fileinput-filename').text('')
this.$element.addClass('fileinput-new').removeClass('fileinput-exists')
if (e !== undefined) {
this.$input.trigger('change')
this.$element.trigger('clear.bs.fileinput')
}
},
Fileinput.prototype.reset = function() {
this.clear()
this.$hidden.val(this.original.hiddenVal)
this.$preview.html(this.original.preview)
this.$element.find('.fileinput-filename').text('')
if (this.original.exists) this.$element.addClass('fileinput-exists').removeClass('fileinput-new')
else this.$element.addClass('fileinput-new').removeClass('fileinput-exists')
this.$element.trigger('reset.bs.fileinput')
},
Fileinput.prototype.trigger = function(e) {
this.$input.trigger('click')
e.preventDefault()
}
// FILEUPLOAD PLUGIN DEFINITION
// ===========================
var old = $.fn.fileinput
$.fn.fileinput = function (options) {
return this.each(function () {
var $this = $(this),
data = $this.data('bs.fileinput')
if (!data) $this.data('bs.fileinput', (data = new Fileinput(this, options)))
if (typeof options == 'string') data[options]()
})
}
$.fn.fileinput.Constructor = Fileinput
// FILEINPUT NO CONFLICT
// ====================
$.fn.fileinput.noConflict = function () {
$.fn.fileinput = old
return this
}
// FILEUPLOAD DATA-API
// ==================
$(document).on('click.fileinput.data-api', '[data-provides="fileinput"]', function (e) {
var $this = $(this)
if ($this.data('bs.fileinput')) return
$this.fileinput($this.data())
var $target = $(e.target).closest('[data-dismiss="fileinput"],[data-trigger="fileinput"]');
if ($target.length > 0) {
e.preventDefault()
$target.trigger('click.bs.fileinput')
}
})
}(window.jQuery);

View File

@@ -0,0 +1,360 @@
/* ===========================================================
* Bootstrap: inputmask.js v3.1.0
* http://jasny.github.io/bootstrap/javascript/#inputmask
*
* Based on Masked Input plugin by Josh Bush (digitalbush.com)
* ===========================================================
* Copyright 2012-2014 Arnold Daniels
*
* 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.
* ========================================================== */
+function ($) { "use strict";
var isIphone = (window.orientation !== undefined)
var isAndroid = navigator.userAgent.toLowerCase().indexOf("android") > -1
var isIE = window.navigator.appName == 'Microsoft Internet Explorer'
// INPUTMASK PUBLIC CLASS DEFINITION
// =================================
var Inputmask = function (element, options) {
if (isAndroid) return // No support because caret positioning doesn't work on Android
this.$element = $(element)
this.options = $.extend({}, Inputmask.DEFAULTS, options)
this.mask = String(this.options.mask)
this.init()
this.listen()
this.checkVal() //Perform initial check for existing values
}
Inputmask.DEFAULTS = {
mask: "",
placeholder: "_",
definitions: {
'9': "[0-9]",
'a': "[A-Za-z]",
'w': "[A-Za-z0-9]",
'*': "."
}
}
Inputmask.prototype.init = function() {
var defs = this.options.definitions
var len = this.mask.length
this.tests = []
this.partialPosition = this.mask.length
this.firstNonMaskPos = null
$.each(this.mask.split(""), $.proxy(function(i, c) {
if (c == '?') {
len--
this.partialPosition = i
} else if (defs[c]) {
this.tests.push(new RegExp(defs[c]))
if (this.firstNonMaskPos === null)
this.firstNonMaskPos = this.tests.length - 1
} else {
this.tests.push(null)
}
}, this))
this.buffer = $.map(this.mask.split(""), $.proxy(function(c, i) {
if (c != '?') return defs[c] ? this.options.placeholder : c
}, this))
this.focusText = this.$element.val()
this.$element.data("rawMaskFn", $.proxy(function() {
return $.map(this.buffer, function(c, i) {
return this.tests[i] && c != this.options.placeholder ? c : null
}).join('')
}, this))
}
Inputmask.prototype.listen = function() {
if (this.$element.attr("readonly")) return
var pasteEventName = (isIE ? 'paste' : 'input') + ".mask"
this.$element
.on("unmask.bs.inputmask", $.proxy(this.unmask, this))
.on("focus.bs.inputmask", $.proxy(this.focusEvent, this))
.on("blur.bs.inputmask", $.proxy(this.blurEvent, this))
.on("keydown.bs.inputmask", $.proxy(this.keydownEvent, this))
.on("keypress.bs.inputmask", $.proxy(this.keypressEvent, this))
.on(pasteEventName, $.proxy(this.pasteEvent, this))
}
//Helper Function for Caret positioning
Inputmask.prototype.caret = function(begin, end) {
if (this.$element.length === 0) return
if (typeof begin == 'number') {
end = (typeof end == 'number') ? end : begin
return this.$element.each(function() {
if (this.setSelectionRange) {
this.setSelectionRange(begin, end)
} else if (this.createTextRange) {
var range = this.createTextRange()
range.collapse(true)
range.moveEnd('character', end)
range.moveStart('character', begin)
range.select()
}
})
} else {
if (this.$element[0].setSelectionRange) {
begin = this.$element[0].selectionStart
end = this.$element[0].selectionEnd
} else if (document.selection && document.selection.createRange) {
var range = document.selection.createRange()
begin = 0 - range.duplicate().moveStart('character', -100000)
end = begin + range.text.length
}
return {
begin: begin,
end: end
}
}
}
Inputmask.prototype.seekNext = function(pos) {
var len = this.mask.length
while (++pos <= len && !this.tests[pos]);
return pos
}
Inputmask.prototype.seekPrev = function(pos) {
while (--pos >= 0 && !this.tests[pos]);
return pos
}
Inputmask.prototype.shiftL = function(begin,end) {
var len = this.mask.length
if (begin < 0) return
for (var i = begin, j = this.seekNext(end); i < len; i++) {
if (this.tests[i]) {
if (j < len && this.tests[i].test(this.buffer[j])) {
this.buffer[i] = this.buffer[j]
this.buffer[j] = this.options.placeholder
} else
break
j = this.seekNext(j)
}
}
this.writeBuffer()
this.caret(Math.max(this.firstNonMaskPos, begin))
}
Inputmask.prototype.shiftR = function(pos) {
var len = this.mask.length
for (var i = pos, c = this.options.placeholder; i < len; i++) {
if (this.tests[i]) {
var j = this.seekNext(i)
var t = this.buffer[i]
this.buffer[i] = c
if (j < len && this.tests[j].test(t))
c = t
else
break
}
}
},
Inputmask.prototype.unmask = function() {
this.$element
.unbind(".mask")
.removeData("inputmask")
}
Inputmask.prototype.focusEvent = function() {
this.focusText = this.$element.val()
var len = this.mask.length
var pos = this.checkVal()
this.writeBuffer()
var that = this
var moveCaret = function() {
if (pos == len)
that.caret(0, pos)
else
that.caret(pos)
}
moveCaret()
setTimeout(moveCaret, 50)
}
Inputmask.prototype.blurEvent = function() {
this.checkVal()
if (this.$element.val() !== this.focusText)
this.$element.trigger('change')
}
Inputmask.prototype.keydownEvent = function(e) {
var k = e.which
//backspace, delete, and escape get special treatment
if (k == 8 || k == 46 || (isIphone && k == 127)) {
var pos = this.caret(),
begin = pos.begin,
end = pos.end
if (end - begin === 0) {
begin = k != 46 ? this.seekPrev(begin) : (end = this.seekNext(begin - 1))
end = k == 46 ? this.seekNext(end) : end
}
this.clearBuffer(begin, end)
this.shiftL(begin, end - 1)
return false
} else if (k == 27) {//escape
this.$element.val(this.focusText)
this.caret(0, this.checkVal())
return false
}
}
Inputmask.prototype.keypressEvent = function(e) {
var len = this.mask.length
var k = e.which,
pos = this.caret()
if (e.ctrlKey || e.altKey || e.metaKey || k < 32) {//Ignore
return true
} else if (k) {
if (pos.end - pos.begin !== 0) {
this.clearBuffer(pos.begin, pos.end)
this.shiftL(pos.begin, pos.end - 1)
}
var p = this.seekNext(pos.begin - 1)
if (p < len) {
var c = String.fromCharCode(k)
if (this.tests[p].test(c)) {
this.shiftR(p)
this.buffer[p] = c
this.writeBuffer()
var next = this.seekNext(p)
this.caret(next)
}
}
return false
}
}
Inputmask.prototype.pasteEvent = function() {
var that = this
setTimeout(function() {
that.caret(that.checkVal(true))
}, 0)
}
Inputmask.prototype.clearBuffer = function(start, end) {
var len = this.mask.length
for (var i = start; i < end && i < len; i++) {
if (this.tests[i])
this.buffer[i] = this.options.placeholder
}
}
Inputmask.prototype.writeBuffer = function() {
return this.$element.val(this.buffer.join('')).val()
}
Inputmask.prototype.checkVal = function(allow) {
var len = this.mask.length
//try to place characters where they belong
var test = this.$element.val()
var lastMatch = -1
for (var i = 0, pos = 0; i < len; i++) {
if (this.tests[i]) {
this.buffer[i] = this.options.placeholder
while (pos++ < test.length) {
var c = test.charAt(pos - 1)
if (this.tests[i].test(c)) {
this.buffer[i] = c
lastMatch = i
break
}
}
if (pos > test.length)
break
} else if (this.buffer[i] == test.charAt(pos) && i != this.partialPosition) {
pos++
lastMatch = i
}
}
if (!allow && lastMatch + 1 < this.partialPosition) {
this.$element.val("")
this.clearBuffer(0, len)
} else if (allow || lastMatch + 1 >= this.partialPosition) {
this.writeBuffer()
if (!allow) this.$element.val(this.$element.val().substring(0, lastMatch + 1))
}
return (this.partialPosition ? i : this.firstNonMaskPos)
}
// INPUTMASK PLUGIN DEFINITION
// ===========================
var old = $.fn.inputmask
$.fn.inputmask = function (options) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.inputmask')
if (!data) $this.data('bs.inputmask', (data = new Inputmask(this, options)))
})
}
$.fn.inputmask.Constructor = Inputmask
// INPUTMASK NO CONFLICT
// ====================
$.fn.inputmask.noConflict = function () {
$.fn.inputmask = old
return this
}
// INPUTMASK DATA-API
// ==================
$(document).on('focus.bs.inputmask.data-api', '[data-mask]', function (e) {
var $this = $(this)
if ($this.data('bs.inputmask')) return
$this.inputmask($this.data())
})
}(window.jQuery);

View File

@@ -0,0 +1,318 @@
/* ========================================================================
* Bootstrap: offcanvas.js v3.1.3
* http://jasny.github.io/bootstrap/javascript/#offcanvas
* ========================================================================
* Copyright 2013-2014 Arnold Daniels
*
* 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.
* ======================================================================== */
+function ($) { "use strict";
// OFFCANVAS PUBLIC CLASS DEFINITION
// =================================
var OffCanvas = function (element, options) {
this.$element = $(element)
this.options = $.extend({}, OffCanvas.DEFAULTS, options)
this.state = null
this.placement = null
if (this.options.recalc) {
this.calcClone()
$(window).on('resize', $.proxy(this.recalc, this))
}
if (this.options.autohide)
$(document).on('click', $.proxy(this.autohide, this))
if (this.options.toggle) this.toggle()
if (this.options.disablescrolling) {
this.options.disableScrolling = this.options.disablescrolling
delete this.options.disablescrolling
}
}
OffCanvas.DEFAULTS = {
toggle: true,
placement: 'auto',
autohide: true,
recalc: true,
disableScrolling: true
}
OffCanvas.prototype.offset = function () {
switch (this.placement) {
case 'left':
case 'right': return this.$element.outerWidth()
case 'top':
case 'bottom': return this.$element.outerHeight()
}
}
OffCanvas.prototype.calcPlacement = function () {
if (this.options.placement !== 'auto') {
this.placement = this.options.placement
return
}
if (!this.$element.hasClass('in')) {
this.$element.css('visiblity', 'hidden !important').addClass('in')
}
var horizontal = $(window).width() / this.$element.width()
var vertical = $(window).height() / this.$element.height()
var element = this.$element
function ab(a, b) {
if (element.css(b) === 'auto') return a
if (element.css(a) === 'auto') return b
var size_a = parseInt(element.css(a), 10)
var size_b = parseInt(element.css(b), 10)
return size_a > size_b ? b : a
}
this.placement = horizontal >= vertical ? ab('left', 'right') : ab('top', 'bottom')
if (this.$element.css('visibility') === 'hidden !important') {
this.$element.removeClass('in').css('visiblity', '')
}
}
OffCanvas.prototype.opposite = function (placement) {
switch (placement) {
case 'top': return 'bottom'
case 'left': return 'right'
case 'bottom': return 'top'
case 'right': return 'left'
}
}
OffCanvas.prototype.getCanvasElements = function() {
// Return a set containing the canvas plus all fixed elements
var canvas = this.options.canvas ? $(this.options.canvas) : this.$element
var fixed_elements = canvas.find('*').filter(function() {
return $(this).css('position') === 'fixed'
}).not(this.options.exclude)
return canvas.add(fixed_elements)
}
OffCanvas.prototype.slide = function (elements, offset, callback) {
// Use jQuery animation if CSS transitions aren't supported
if (!$.support.transition) {
var anim = {}
anim[this.placement] = "+=" + offset
return elements.animate(anim, 350, callback)
}
var placement = this.placement
var opposite = this.opposite(placement)
elements.each(function() {
if ($(this).css(placement) !== 'auto')
$(this).css(placement, (parseInt($(this).css(placement), 10) || 0) + offset)
if ($(this).css(opposite) !== 'auto')
$(this).css(opposite, (parseInt($(this).css(opposite), 10) || 0) - offset)
})
this.$element
.one($.support.transition.end, callback)
.emulateTransitionEnd(350)
}
OffCanvas.prototype.disableScrolling = function() {
var bodyWidth = $('body').width()
var prop = 'padding-' + this.opposite(this.placement)
if ($('body').data('offcanvas-style') === undefined) {
$('body').data('offcanvas-style', $('body').attr('style') || '')
}
$('body').css('overflow', 'hidden')
if ($('body').width() > bodyWidth) {
var padding = parseInt($('body').css(prop), 10) + $('body').width() - bodyWidth
setTimeout(function() {
$('body').css(prop, padding)
}, 1)
}
}
OffCanvas.prototype.show = function () {
if (this.state) return
var startEvent = $.Event('show.bs.offcanvas')
this.$element.trigger(startEvent)
if (startEvent.isDefaultPrevented()) return
this.state = 'slide-in'
this.calcPlacement();
var elements = this.getCanvasElements()
var placement = this.placement
var opposite = this.opposite(placement)
var offset = this.offset()
if (elements.index(this.$element) !== -1) {
$(this.$element).data('offcanvas-style', $(this.$element).attr('style') || '')
this.$element.css(placement, -1 * offset)
this.$element.css(placement); // Workaround: Need to get the CSS property for it to be applied before the next line of code
}
elements.addClass('canvas-sliding').each(function() {
if ($(this).data('offcanvas-style') === undefined) $(this).data('offcanvas-style', $(this).attr('style') || '')
if ($(this).css('position') === 'static') $(this).css('position', 'relative')
if (($(this).css(placement) === 'auto' || $(this).css(placement) === '0px') &&
($(this).css(opposite) === 'auto' || $(this).css(opposite) === '0px')) {
$(this).css(placement, 0)
}
})
if (this.options.disableScrolling) this.disableScrolling()
var complete = function () {
if (this.state != 'slide-in') return
this.state = 'slid'
elements.removeClass('canvas-sliding').addClass('canvas-slid')
this.$element.trigger('shown.bs.offcanvas')
}
setTimeout($.proxy(function() {
this.$element.addClass('in')
this.slide(elements, offset, $.proxy(complete, this))
}, this), 1)
}
OffCanvas.prototype.hide = function (fast) {
if (this.state !== 'slid') return
var startEvent = $.Event('hide.bs.offcanvas')
this.$element.trigger(startEvent)
if (startEvent.isDefaultPrevented()) return
this.state = 'slide-out'
var elements = $('.canvas-slid')
var placement = this.placement
var offset = -1 * this.offset()
var complete = function () {
if (this.state != 'slide-out') return
this.state = null
this.placement = null
this.$element.removeClass('in')
elements.removeClass('canvas-sliding')
elements.add(this.$element).add('body').each(function() {
$(this).attr('style', $(this).data('offcanvas-style')).removeData('offcanvas-style')
})
this.$element.trigger('hidden.bs.offcanvas')
}
elements.removeClass('canvas-slid').addClass('canvas-sliding')
setTimeout($.proxy(function() {
this.slide(elements, offset, $.proxy(complete, this))
}, this), 1)
}
OffCanvas.prototype.toggle = function () {
if (this.state === 'slide-in' || this.state === 'slide-out') return
this[this.state === 'slid' ? 'hide' : 'show']()
}
OffCanvas.prototype.calcClone = function() {
this.$calcClone = this.$element.clone()
.html('')
.addClass('offcanvas-clone').removeClass('in')
.appendTo($('body'))
}
OffCanvas.prototype.recalc = function () {
if (this.$calcClone.css('display') === 'none' || (this.state !== 'slid' && this.state !== 'slide-in')) return
this.state = null
this.placement = null
var elements = this.getCanvasElements()
this.$element.removeClass('in')
elements.removeClass('canvas-slid')
elements.add(this.$element).add('body').each(function() {
$(this).attr('style', $(this).data('offcanvas-style')).removeData('offcanvas-style')
})
}
OffCanvas.prototype.autohide = function (e) {
if ($(e.target).closest(this.$element).length === 0) this.hide()
}
// OFFCANVAS PLUGIN DEFINITION
// ==========================
var old = $.fn.offcanvas
$.fn.offcanvas = function (option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.offcanvas')
var options = $.extend({}, OffCanvas.DEFAULTS, $this.data(), typeof option === 'object' && option)
if (!data) $this.data('bs.offcanvas', (data = new OffCanvas(this, options)))
if (typeof option === 'string') data[option]()
})
}
$.fn.offcanvas.Constructor = OffCanvas
// OFFCANVAS NO CONFLICT
// ====================
$.fn.offcanvas.noConflict = function () {
$.fn.offcanvas = old
return this
}
// OFFCANVAS DATA-API
// =================
$(document).on('click.bs.offcanvas.data-api', '[data-toggle=offcanvas]', function (e) {
var $this = $(this), href
var target = $this.attr('data-target')
|| e.preventDefault()
|| (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
var $canvas = $(target)
var data = $canvas.data('bs.offcanvas')
var option = data ? 'toggle' : $this.data()
e.stopPropagation()
if (data) data.toggle()
else $canvas.offcanvas(option)
})
}(window.jQuery);

View File

@@ -0,0 +1,86 @@
/* ============================================================
* Bootstrap: rowlink.js v3.1.3
* http://jasny.github.io/bootstrap/javascript/#rowlink
* ============================================================
* Copyright 2012-2014 Arnold Daniels
*
* 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.
* ============================================================ */
+function ($) { "use strict";
var Rowlink = function (element, options) {
this.$element = $(element)
this.options = $.extend({}, Rowlink.DEFAULTS, options)
this.$element.on('click.bs.rowlink', 'td:not(.rowlink-skip)', $.proxy(this.click, this))
}
Rowlink.DEFAULTS = {
target: "a"
}
Rowlink.prototype.click = function(e) {
var target = $(e.currentTarget).closest('tr').find(this.options.target)[0]
if ($(e.target)[0] === target) return
e.preventDefault();
if (target.click) {
target.click()
} else if (document.createEvent) {
var evt = document.createEvent("MouseEvents");
evt.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
target.dispatchEvent(evt);
}
}
// ROWLINK PLUGIN DEFINITION
// ===========================
var old = $.fn.rowlink
$.fn.rowlink = function (options) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.rowlink')
if (!data) $this.data('bs.rowlink', (data = new Rowlink(this, options)))
})
}
$.fn.rowlink.Constructor = Rowlink
// ROWLINK NO CONFLICT
// ====================
$.fn.rowlink.noConflict = function () {
$.fn.rowlink = old
return this
}
// ROWLINK DATA-API
// ==================
$(document).on('click.bs.rowlink.data-api', '[data-link="row"]', function (e) {
if ($(e.target).closest('.rowlink-skip').length !== 0) return
var $this = $(this)
if ($this.data('bs.rowlink')) return
$this.rowlink($this.data())
$(e.target).trigger('click.bs.rowlink')
})
}(window.jQuery);

View File

@@ -0,0 +1,50 @@
/* ========================================================================
* Bootstrap: transition.js v3.1.3
* http://getbootstrap.com/javascript/#transitions
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) {
'use strict';
// CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
// ============================================================
function transitionEnd() {
var el = document.createElement('bootstrap')
var transEndEventNames = {
WebkitTransition : 'webkitTransitionEnd',
MozTransition : 'transitionend',
OTransition : 'oTransitionEnd otransitionend',
transition : 'transitionend'
}
for (var name in transEndEventNames) {
if (el.style[name] !== undefined) {
return { end: transEndEventNames[name] }
}
}
return false // explicit for ie8 ( ._.)
}
if ($.support.transition !== undefined) return // Prevent conflict with Twitter Bootstrap
// http://blog.alexmaccaw.com/css-transitions
$.fn.emulateTransitionEnd = function (duration) {
var called = false, $el = this
$(this).one($.support.transition.end, function () { called = true })
var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
setTimeout(callback, duration)
return this
}
$(function () {
$.support.transition = transitionEnd()
})
}(window.jQuery);

View File

@@ -0,0 +1,39 @@
// Fixed alerts
// Position to the top or bottom.
// ------------------------------------------------
.alert-fixed-top,
.alert-fixed-bottom {
position: fixed;
width: 100%;
z-index: @zindex-alert-fixed;
border-radius: 0;
margin: 0;
left: 0;
@media (min-width: @alert-fixed-width) {
width: @alert-fixed-width;
left: 50%;
margin-left: (-1 * (@alert-fixed-width / 2));
}
}
.alert-fixed-top {
top: 0;
border-width: 0 0 1px 0;
@media (min-width: @alert-fixed-width) {
.border-bottom-radius(@alert-border-radius);
border-width: 0 1px 1px 1px;
}
}
.alert-fixed-bottom {
bottom: 0;
border-width: 1px 0 0 0;
@media (min-width: @alert-fixed-width) {
.border-top-radius(@alert-border-radius);
border-width: 1px 1px 0 1px;
}
}

View File

@@ -0,0 +1,5 @@
// Jasny Bootstrap with default variables
@import "variables.less";
@import "mixins.less";
@import "../jasny-bootstrap.less";

View File

@@ -0,0 +1,61 @@
//
// These mixins are used when Jasny Bootstrap is
// built without importing Twitter Bootstrap.
// --------------------------------------------------
// CSS3 PROPERTIES
// --------------------------------------------------
// Single side border-radius
.border-top-radius(@radius) {
border-top-right-radius: @radius;
border-top-left-radius: @radius;
}
.border-right-radius(@radius) {
border-bottom-right-radius: @radius;
border-top-right-radius: @radius;
}
.border-bottom-radius(@radius) {
border-bottom-right-radius: @radius;
border-bottom-left-radius: @radius;
}
.border-left-radius(@radius) {
border-bottom-left-radius: @radius;
border-top-left-radius: @radius;
}
// Drop shadows
.box-shadow(@shadow) {
-webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1
box-shadow: @shadow;
}
.transition(@transition) {
-webkit-transition: @transition;
-o-transition: @transition;
transition: @transition;
}
// Transition
.transition-property(@transition-property) {
-webkit-transition-property: @transition-property;
transition-property: @transition-property;
}
.transition-delay(@transition-delay) {
-webkit-transition-delay: @transition-delay;
transition-delay: @transition-delay;
}
.transition-duration(@transition-duration) {
-webkit-transition-duration: @transition-duration;
transition-duration: @transition-duration;
}
.transition-timing-function(@timing-function) {
-webkit-transition-timing-function: @timing-function;
transition-timing-function: @timing-function;
}
.transition-transform(@transition) {
-webkit-transition: -webkit-transform @transition;
-moz-transition: -moz-transform @transition;
-o-transition: -o-transform @transition;
transition: transform @transition;
}

View File

@@ -0,0 +1,216 @@
//
// These variables are used when Jasny Bootstrap is built
// without importing Twitter Bootstrap.
// --------------------------------------------------------
//-- Colors
//
//## Gray colors for use across Bootstrap.
@gray-darker: lighten(#000, 13.5%); // #222
@gray-dark: lighten(#000, 20%); // #333
@gray: lighten(#000, 33.5%); // #555
@gray-light: lighten(#000, 60%); // #999
@gray-lighter: lighten(#000, 93.5%); // #eee
//-- Typography
//
//## Font size and line-height.
@font-size-base: 14px;
@font-size-large: ceil((@font-size-base * 1.25)); // ~18px
@font-size-small: ceil((@font-size-base * 0.85)); // ~12px
//** Unit-less `line-height` for use in components like buttons.
@line-height-base: 1.428571429; // 20/14
//** Computed "line-height" (`font-size` * `line-height`) for use with `margin`, `padding`, etc.
@line-height-computed: floor((@font-size-base * @line-height-base)); // ~20px
//== Components
//
//## Define common padding and border radius sizes and more. Values based on 14px text and 1.428 line-height (~20px to start).
@padding-base-vertical: 6px;
@padding-base-horizontal: 12px;
@padding-large-vertical: 10px;
@padding-large-horizontal: 16px;
@padding-small-vertical: 5px;
@padding-small-horizontal: 10px;
@padding-xs-vertical: 1px;
@padding-xs-horizontal: 5px;
@line-height-large: 1.33;
@line-height-small: 1.5;
@border-radius-base: 4px;
@border-radius-large: 6px;
@border-radius-small: 3px;
//== Tables
//
//## Customizes the `.table` component with basic values, each used across all table variations.
//** Background color used for `.table-hover`.
@table-bg-hover: #f5f5f5;
//-- Z-index master list
//
// Warning: Avoid customizing these values. They're used for a bird's eye view
// of components dependent on the z-axis and are designed to all work together.
//
// Note: These variables are not generated into the Customizer.
@zindex-navmenu-fixed: 1030;
@zindex-alert-fixed: 1035;
//== Media queries breakpoints
//
//## Define the breakpoints at which your layout will change, adapting to different screen sizes.
// Extra small screen / phone
@screen-xs: 480px;
// Small screen / tablet
@screen-sm: 768px;
// Medium screen / desktop
@screen-md: 992px;
// Large screen / wide desktop
@screen-lg: 1200px;
//-- So media queries don't overlap when required, provide a maximum
//
// Note: These variables are not generated into the Customizer.
@screen-xs-min: @screen-xs;
@screen-sm-min: @screen-sm;
@screen-md-min: @screen-md;
@screen-lg-min: @screen-lg;
@screen-xs-max: (@screen-sm-min - 1);
@screen-sm-max: (@screen-md-min - 1);
@screen-md-max: (@screen-lg-min - 1);
//--
@container-lg: ((1140px + @grid-gutter-width));
//== Grid system
//
//## Define your custom responsive grid.
//** Padding between columns. Gets divided in half for the left and right.
@grid-gutter-width: 30px;
//** Point at which the navbar becomes uncollapsed.
@grid-float-breakpoint: 768px;
//** Maximum with of a smooth container.
@container-smooth: @container-lg;
//== Navbar
//
//##
// Basics of a navbar
@navbar-height: 50px;
@navbar-padding-horizontal: floor((@grid-gutter-width / 2));
@navbar-padding-vertical: ((@navbar-height - @line-height-computed) / 2);
//== Navmenu
//
//##
// Basics of a navmenu
@navmenu-width: 300px;
@navmenu-margin-vertical: (0.5 * @line-height-computed);
@navmenu-default-color: #777;
@navmenu-default-bg: #f8f8f8;
@navmenu-default-border: darken(@navmenu-default-bg, 6.5%);
// Navmenu links
@navmenu-default-link-color: #777;
@navmenu-default-link-hover-color: #333;
@navmenu-default-link-hover-bg: transparent;
@navmenu-default-link-active-color: #555;
@navmenu-default-link-active-bg: darken(@navmenu-default-bg, 6.5%);
@navmenu-default-link-disabled-color: #ccc;
@navmenu-default-link-disabled-bg: transparent;
// Navmenu brand label
@navmenu-default-brand-color: @navmenu-default-link-color;
@navmenu-default-brand-hover-color: darken(@navmenu-default-link-color, 10%);
@navmenu-default-brand-hover-bg: transparent;
// Inverted navmenu
//
// Reset inverted navmenu basics
@navmenu-inverse-color: @gray-light;
@navmenu-inverse-bg: #222;
@navmenu-inverse-border: darken(@navmenu-inverse-bg, 10%);
// Inverted navmenu links
@navmenu-inverse-link-color: @gray-light;
@navmenu-inverse-link-hover-color: #fff;
@navmenu-inverse-link-hover-bg: transparent;
@navmenu-inverse-link-active-color: @navmenu-inverse-link-hover-color;
@navmenu-inverse-link-active-bg: darken(@navmenu-inverse-bg, 10%);
@navmenu-inverse-link-disabled-color: #444;
@navmenu-inverse-link-disabled-bg: transparent;
// Inverted navmenu brand label
@navmenu-inverse-brand-color: @navmenu-inverse-link-color;
@navmenu-inverse-brand-hover-color: #fff;
@navmenu-inverse-brand-hover-bg: transparent;
// Inverted navmenu search
// Normal navmenu needs no special styles or vars
@navmenu-inverse-search-bg: lighten(@navmenu-inverse-bg, 25%);
@navmenu-inverse-search-bg-focus: #fff;
@navmenu-inverse-search-border: @navmenu-inverse-bg;
@navmenu-inverse-search-placeholder-color: #ccc;
//== Navs
//
//##
@nav-link-padding: 10px 15px;
@nav-tabs-active-link-hover-border-color: #ddd;
@nav-tabs-border-color: #ddd;
//== Form states and alerts
//
//## Define colors for form feedback states and, by default, alerts.
@state-success-text: #3c763d;
@state-success-bg: #dff0d8;
@state-success-border: darken(spin(@state-success-bg, -10), 5%);
@state-info-text: #31708f;
@state-info-bg: #d9edf7;
@state-info-border: darken(spin(@state-info-bg, -10), 7%);
@state-warning-text: #8a6d3b;
@state-warning-bg: #fcf8e3;
@state-warning-border: darken(spin(@state-warning-bg, -10), 5%);
@state-danger-text: #a94442;
@state-danger-bg: #f2dede;
@state-danger-border: darken(spin(@state-danger-bg, -10), 5%);
//== Alerts
//
//## Define alert colors, border radius, and padding.
@alert-border-radius: @border-radius-base;
@alert-fixed-width: @screen-md;

View File

@@ -0,0 +1,38 @@
// Labels for buttons
// --------------------------------------------------
.button-label-size(@padding-vertical; @padding-horizontal; @border-radius) {
padding: @padding-vertical @padding-horizontal;
left: (-1 * @padding-horizontal);
border-radius: (@border-radius - 1px) 0 0 (@border-radius - 1px);
&.btn-label-right {
left: auto;
right: (-1 * @padding-horizontal);
border-radius: 0 (@border-radius - 1px) (@border-radius - 1px) 0;
}
}
.btn-labeled {
padding-top: 0;
padding-bottom: 0;
}
.btn-label {
position: relative;
background: transparent;
background: rgba(0, 0, 0, 0.15);
display: inline-block;
.button-label-size(@padding-base-vertical; @padding-base-horizontal; @border-radius-base);
}
.btn-lg .btn-label {
.button-label-size(@padding-large-vertical; @padding-large-horizontal; @border-radius-large);
}
.btn-sm .btn-label {
.button-label-size(@padding-small-vertical; @padding-small-horizontal; @border-radius-small);
}
.btn-xs .btn-label {
.button-label-size(1px; 5px; @border-radius-small);
}

View File

@@ -0,0 +1,122 @@
// Fileinput.less
// CSS for file upload button and fileinput widget
// ------------------------------------------------
.btn-file {
overflow: hidden;
position: relative;
vertical-align: middle;
> input {
position: absolute;
top: 0;
right: 0;
margin: 0;
opacity: 0;
filter: alpha(opacity=0);
font-size: 23px;
height: 100%;
width: 100%;
direction: ltr;
cursor: pointer;
}
}
.fileinput {
margin-bottom: 9px;
display: inline-block;
.form-control {
padding-top: 7px;
padding-bottom: 5px;
display: inline-block;
margin-bottom: 0px;
vertical-align: middle;
cursor: text;
}
.thumbnail {
overflow: hidden;
display: inline-block;
margin-bottom: 5px;
vertical-align: middle;
text-align: center;
> img {
max-height: 100%;
}
}
.btn {
vertical-align: middle;
}
}
.fileinput-exists .fileinput-new,
.fileinput-new .fileinput-exists {
display: none;
}
.fileinput-inline .fileinput-controls {
display: inline;
}
.fileinput-filename {
vertical-align: middle;
display: inline-block;
overflow: hidden;
}
.form-control .fileinput-filename {
vertical-align: bottom;
}
.fileinput.input-group {
display: table;
> * {
position: relative;
z-index: 2;
}
> .btn-file {
z-index: 1;
}
}
// Not 100% correct, but helps in typical use case
.fileinput-new.input-group .btn-file,
.fileinput-new .input-group .btn-file {
border-radius: 0 @border-radius-base @border-radius-base 0;
&.btn-xs,
&.btn-sm {
border-radius: 0 @border-radius-small @border-radius-small 0;
}
&.btn-lg {
border-radius: 0 @border-radius-large @border-radius-large 0;
}
}
.form-group.has-warning .fileinput {
.fileinput-preview {
color: @state-warning-text;
}
.thumbnail {
border-color: @state-warning-border;
}
}
.form-group.has-error .fileinput {
.fileinput-preview {
color: @state-danger-text;
}
.thumbnail {
border-color: @state-danger-border;
}
}
.form-group.has-success .fileinput {
.fileinput-preview {
color: @state-success-text;
}
.thumbnail {
border-color: @state-success-border;
}
}
// Input group fixes
.input-group-addon:not(:first-child) {
border-left: 0;
}

View File

@@ -0,0 +1,10 @@
// Smooth sizing container
// -------------------------
.container-smooth {
max-width: @container-lg;
@media (min-width: 1px) {
width: auto;
}
}

View File

@@ -0,0 +1,18 @@
// Twitter Bootstrap's "variables.less" should already be imported
// Core variables and mixins
@import "variables.less";
// Core CSS
@import "grid-container-smooth.less";
@import "button-labels.less";
// Components
@import "nav-tab-alignment.less";
@import "navmenu.less";
@import "alerts-fixed.less";
// Components w/ JavaScript
@import "offcanvas.less";
@import "rowlink.less";
@import "fileinput.less";

View File

@@ -0,0 +1,97 @@
// Alignment options
// -------------------------
// bottom
.nav-tabs-bottom {
border-bottom: 0;
border-top: 1px solid @nav-tabs-border-color;
> li {
margin-bottom: 0;
margin-top: -1px;
> a {
border-radius: 0 0 @border-radius-base @border-radius-base;
}
> a:hover,
> a:focus,
&.active > a,
&.active > a:hover,
&.active > a:focus {
border: 1px solid @nav-tabs-active-link-hover-border-color;
border-top-color: transparent;
}
}
}
// left
.nav-tabs-left {
border-bottom: 0;
border-right: 1px solid @nav-tabs-border-color;
> li {
margin-bottom: 0;
margin-right: -1px;
float: none;
> a {
border-radius: @border-radius-base 0 0 @border-radius-base;
margin-right: 0;
margin-bottom: 2px;
}
> a:hover,
> a:focus,
&.active > a,
&.active > a:hover,
&.active > a:focus {
border: 1px solid @nav-tabs-active-link-hover-border-color;
border-right-color: transparent;
}
}
.row > & {
padding-right: 0;
padding-left: (@grid-gutter-width / 2);
margin-right: -1px;
position: relative;
z-index: 1;
& + .tab-content {
border-left: 1px solid @nav-tabs-active-link-hover-border-color;
}
}
}
// right
.nav-tabs-right {
border-bottom: 0;
border-left: 1px solid @nav-tabs-border-color;
> li {
margin-bottom: 0;
margin-left: -1px;
float: none;
> a {
border-radius: 0 @border-radius-base @border-radius-base 0;
margin-left: 0;
margin-bottom: 2px;
}
> a:hover,
> a:focus,
&.active > a,
&.active > a:hover,
&.active > a:focus {
border: 1px solid @nav-tabs-active-link-hover-border-color;
border-left-color: transparent;
}
}
.row > & {
padding-left: 0;
padding-right: (@grid-gutter-width / 2);
}
}

View File

@@ -0,0 +1,273 @@
// Navmenu and offcanvas navbar
// --------------------------------------------------
// Wrapper and base class
//
// Provide a static navmenu from which we expand to create the fixed navmenu
// variations.
.navmenu,
.navbar-offcanvas {
width: @navmenu-width;
height: auto;
border-width: 1px;
border-style: solid;
border-radius: @border-radius-base;
}
.navmenu-fixed-left,
.navmenu-fixed-right,
.navbar-offcanvas {
position: fixed;
z-index: @zindex-navmenu-fixed;
top: 0;
bottom: 0;
overflow-y: auto;
border-radius: 0;
}
.navmenu-fixed-left,
.navbar-offcanvas.navmenu-fixed-left {
left: 0;
right: auto;
border-width: 0 1px 0 0;
}
.navmenu-fixed-right,
.navbar-offcanvas {
left: auto;
right: 0;
border-width: 0 0 0 1px;
}
.navmenu-nav {
margin-bottom: @navmenu-margin-vertical;
&.dropdown-menu {
position: static;
margin: 0;
padding-top: 0;
float: none;
border: none;
.box-shadow(none);
border-radius: 0;
}
}
.navbar-offcanvas {
.navbar-nav {
margin: 0;
}
@media (min-width: @grid-float-breakpoint) {
width: auto;
border-top: 0;
box-shadow: none;
&.offcanvas {
position: static;
display: block !important;
height: auto !important;
padding-bottom: 0; // Override default setting
overflow: visible !important;
}
// Account for first and last children spacing
.navbar-nav.navbar-left:first-child {
margin-left: -@navbar-padding-horizontal;
}
.navbar-nav.navbar-right:last-child {
margin-right: -@navbar-padding-horizontal;
}
.navmenu-brand {
display: none;
}
}
}
// Brand/project name
.navmenu-brand {
display: block;
font-size: @font-size-large;
line-height: @line-height-computed;
padding: @nav-link-padding;
&:hover,
&:focus {
text-decoration: none;
}
margin: @navmenu-margin-vertical 0;
}
// Alternate navmenus
// --------------------------------------------------
// Default navmenu
.navmenu-default,
.navbar-default .navbar-offcanvas {
background-color: @navmenu-default-bg;
border-color: @navmenu-default-border;
.navmenu-brand {
color: @navmenu-default-brand-color;
&:hover,
&:focus {
color: @navmenu-default-brand-hover-color;
background-color: @navmenu-default-brand-hover-bg;
}
}
.navmenu-text {
color: @navmenu-default-color;
}
.navmenu-nav {
// Caret should match text color on hover
> .dropdown > a:hover .caret,
> .dropdown > a:focus .caret {
border-top-color: @navmenu-default-link-hover-color;
border-bottom-color: @navmenu-default-link-hover-color;
}
// Remove background color from open dropdown
> .open > a {
&,
&:hover,
&:focus {
background-color: @navmenu-default-link-active-bg;
color: @navmenu-default-link-active-color;
.caret {
border-top-color: @navmenu-default-link-active-color;
border-bottom-color: @navmenu-default-link-active-color;
}
}
}
> .dropdown > a .caret {
border-top-color: @navmenu-default-link-color;
border-bottom-color: @navmenu-default-link-color;
}
&.dropdown-menu {
background-color: @navmenu-default-link-active-bg;
& > .divider {
background-color: @navmenu-default-bg;
}
> .active > a {
&,
&:hover,
&:focus {
background-color: darken(@navmenu-default-link-active-bg, 6.5%);
}
}
}
> li > a {
color: @navmenu-default-link-color;
&:hover,
&:focus {
color: @navmenu-default-link-hover-color;
background-color: @navmenu-default-link-hover-bg;
}
}
> .active > a {
&,
&:hover,
&:focus {
color: @navmenu-default-link-active-color;
background-color: @navmenu-default-link-active-bg;
}
}
> .disabled > a {
&,
&:hover,
&:focus {
color: @navmenu-default-link-disabled-color;
background-color: @navmenu-default-link-disabled-bg;
}
}
}
}
// Inverse navmenu
.navmenu-inverse,
.navbar-inverse .navbar-offcanvas {
background-color: @navmenu-inverse-bg;
border-color: @navmenu-inverse-border;
.navmenu-brand {
color: @navmenu-inverse-brand-color;
&:hover,
&:focus {
color: @navmenu-inverse-brand-hover-color;
background-color: @navmenu-inverse-brand-hover-bg;
}
}
.navmenu-text {
color: @navmenu-inverse-color;
}
.navmenu-nav {
// Caret should match text color on hover
> .dropdown > a:hover .caret,
> .dropdown > a:focus .caret {
border-top-color: @navmenu-inverse-link-hover-color;
border-bottom-color: @navmenu-inverse-link-hover-color;
}
// Remove background color from open dropdown
> .open > a {
&,
&:hover,
&:focus {
background-color: @navmenu-inverse-link-active-bg;
color: @navmenu-inverse-link-active-color;
.caret {
border-top-color: @navmenu-inverse-link-active-color;
border-bottom-color: @navmenu-inverse-link-active-color;
}
}
}
> .dropdown > a .caret {
border-top-color: @navmenu-inverse-link-color;
border-bottom-color: @navmenu-inverse-link-color;
}
&.dropdown-menu {
background-color: @navmenu-inverse-link-active-bg;
& > .divider {
background-color: @navmenu-inverse-bg;
}
> .active > a {
&,
&:hover,
&:focus {
background-color: darken(@navmenu-inverse-link-active-bg, 6.5%);
}
}
}
> li > a {
color: @navmenu-inverse-link-color;
&:hover,
&:focus {
color: @navmenu-inverse-link-hover-color;
background-color: @navmenu-inverse-link-hover-bg;
}
}
> .active > a {
&,
&:hover,
&:focus {
color: @navmenu-inverse-link-active-color;
background-color: @navmenu-inverse-link-active-bg;
}
}
> .disabled > a {
&,
&:hover,
&:focus {
color: @navmenu-inverse-link-disabled-color;
background-color: @navmenu-inverse-link-disabled-bg;
}
}
}
}

View File

@@ -0,0 +1,48 @@
// Off canvas navigation
// --------------------------------------------------
.offcanvas {
display: none;
&.in {
display: block;
}
}
@media (max-width: @screen-xs-max) {
.offcanvas-xs {
.offcanvas;
}
}
@media (max-width: @screen-sm-max) {
.offcanvas-sm {
.offcanvas;
}
}
@media (max-width: @screen-md-max) {
.offcanvas-md {
.offcanvas;
}
}
.offcanvas-lg {
.offcanvas;
}
.canvas-sliding {
-webkit-transition: top 0.35s, left 0.35s, bottom 0.35s, right 0.35s;
transition: top 0.35s, left 0.35s, bottom 0.35s, right 0.35s;
}
.offcanvas-clone {
height: 0px !important;
width: 0px !important;
overflow: hidden !important;
border: none !important;
margin: 0px !important;
padding: 0px !important;
position: absolute !important;
top: auto !important;
left: auto !important;
bottom: 0px !important;
right: 0px !important;
opacity: 0 !important;
}

View File

@@ -0,0 +1,22 @@
// Rowlink
// --------------------------------------------------
.table.rowlink,
.table .rowlink {
td:not(.rowlink-skip) {
cursor: pointer;
a {
color: inherit;
font: inherit;
text-decoration: inherit;
}
}
}
.table-hover.rowlink,
.table-hover .rowlink {
tr:hover td {
background-color: darken(@table-bg-hover, 15%);
}
}

View File

@@ -0,0 +1,66 @@
//
// Variables
//
// Either Twitter Bootstrap's "variables.less" or this package's
// "default-variables.less" should be loaded before this file.
// -------------------------------------------------------------
@zindex-navmenu-fixed: 1030;
@zindex-alert-fixed: 1035;
@container-smooth: @container-lg;
@alert-fixed-width: @screen-md-min;
//== Navmenu
// Basics of a navmenu
@navmenu-width: 300px;
@navmenu-margin-vertical: (0.5 * @line-height-computed);
@navmenu-default-color: #777;
@navmenu-default-bg: #f8f8f8;
@navmenu-default-border: darken(@navmenu-default-bg, 6.5%);
// Navmenu links
@navmenu-default-link-color: #777;
@navmenu-default-link-hover-color: #333;
@navmenu-default-link-hover-bg: transparent;
@navmenu-default-link-active-color: #555;
@navmenu-default-link-active-bg: darken(@navmenu-default-bg, 6.5%);
@navmenu-default-link-disabled-color: #ccc;
@navmenu-default-link-disabled-bg: transparent;
// Navmenu brand label
@navmenu-default-brand-color: @navmenu-default-link-color;
@navmenu-default-brand-hover-color: darken(@navmenu-default-link-color, 10%);
@navmenu-default-brand-hover-bg: transparent;
// Inverted navmenu
//
// Reset inverted navmenu basics
@navmenu-inverse-color: @gray-light;
@navmenu-inverse-bg: #222;
@navmenu-inverse-border: darken(@navmenu-inverse-bg, 10%);
// Inverted navmenu links
@navmenu-inverse-link-color: @gray-light;
@navmenu-inverse-link-hover-color: #fff;
@navmenu-inverse-link-hover-bg: transparent;
@navmenu-inverse-link-active-color: @navmenu-inverse-link-hover-color;
@navmenu-inverse-link-active-bg: darken(@navmenu-inverse-bg, 10%);
@navmenu-inverse-link-disabled-color: #444;
@navmenu-inverse-link-disabled-bg: transparent;
// Inverted navmenu brand label
@navmenu-inverse-brand-color: @navmenu-inverse-link-color;
@navmenu-inverse-brand-hover-color: #fff;
@navmenu-inverse-brand-hover-bg: transparent;
// Inverted navmenu search
// Normal navmenu needs no special styles or vars
@navmenu-inverse-search-bg: lighten(@navmenu-inverse-bg, 25%);
@navmenu-inverse-search-bg-focus: #fff;
@navmenu-inverse-search-border: @navmenu-inverse-bg;
@navmenu-inverse-search-placeholder-color: #ccc;

View File

@@ -0,0 +1,70 @@
{
"name": "jasny-bootstrap",
"description": "Additional features and components for Bootstrap",
"version": "3.1.3",
"keywords": [
"bootstrap",
"css"
],
"homepage": "http://jasny.github.io/bootstrap",
"author": "Arnold Daniels",
"scripts": {
"test": "grunt test"
},
"style": "./dist/css/jasny-bootstrap.css",
"less": "./less/jasny-bootstrap.less",
"repository": {
"type": "git",
"url": "https://github.com/jasny/bootstrap.git"
},
"bugs": {
"url": "https://github.com/jasny/bootstrap/issues"
},
"license": {
"type": "Apache-2.0",
"url": "https://github.com/jasny/bootstrap/blob/master/LICENSE"
},
"devDependencies": {
"btoa": "~1.1.1",
"canonical-json": "~0.0.3",
"grunt": "~0.4.2",
"grunt-banner": "~0.2.0",
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-concat": "~0.4.0",
"grunt-contrib-connect": "~0.7.0",
"grunt-contrib-copy": "~0.5.0",
"grunt-contrib-csslint": "~0.2.0",
"grunt-contrib-cssmin": "~0.9.0",
"grunt-contrib-jade": "~0.11.0",
"grunt-contrib-jshint": "~0.10.0",
"grunt-contrib-less": "~0.11.0",
"grunt-contrib-qunit": "~0.4.0",
"grunt-contrib-uglify": "~0.4.0",
"grunt-contrib-watch": "~0.6.0",
"grunt-csscomb": "~2.0.1",
"grunt-exec": "~0.4.2",
"grunt-html-validation": "~0.1.13",
"grunt-jekyll": "~0.4.1",
"grunt-jscs-checker": "~0.4.0",
"grunt-saucelabs": "~5.1.0",
"grunt-text-replace": "~0.3.0",
"load-grunt-tasks": "~0.4.0",
"markdown": "~0.5.0"
},
"jspm": {
"main": "js/jasny-bootstrap",
"directories": {
"example": "examples",
"lib": "dist"
},
"shim": {
"js/jasny-bootstrap": {
"imports": "jquery",
"exports": "$"
}
},
"buildConfig": {
"uglify": true
}
}
}

View File

@@ -0,0 +1,39 @@
// Fixed alerts
// Position to the top or bottom.
// ------------------------------------------------
.alert-fixed-top,
.alert-fixed-bottom {
position: fixed;
width: 100%;
z-index: $zindex-alert-fixed;
border-radius: 0;
margin: 0;
left: 0;
@media (min-width: $alert-fixed-width) {
width: $alert-fixed-width;
left: 50%;
margin-left: (-1 * ($alert-fixed-width / 2));
}
}
.alert-fixed-top {
top: 0;
border-width: 0 0 1px 0;
@media (min-width: $alert-fixed-width) {
@include border-bottom-radius($alert-border-radius);
border-width: 0 1px 1px 1px;
}
}
.alert-fixed-bottom {
bottom: 0;
border-width: 1px 0 0 0;
@media (min-width: $alert-fixed-width) {
@include border-top-radius($alert-border-radius);
border-width: 1px 1px 0 1px;
}
}

View File

@@ -0,0 +1,38 @@
// Labels for buttons
// --------------------------------------------------
@mixin button-label-size($padding-vertical, $padding-horizontal, $border-radius) {
padding: $padding-vertical $padding-horizontal;
left: (-1 * $padding-horizontal);
border-radius: ($border-radius - 1px) 0 0 ($border-radius - 1px);
&.btn-label-right {
left: auto;
right: (-1 * $padding-horizontal);
border-radius: 0 ($border-radius - 1px) ($border-radius - 1px) 0;
}
}
.btn-labeled {
padding-top: 0;
padding-bottom: 0;
}
.btn-label {
position: relative;
background: transparent;
background: rgba(0, 0, 0, 0.15);
display: inline-block;
@include button-label-size($padding-base-vertical, $padding-base-horizontal, $border-radius-base);
}
.btn-lg .btn-label {
@include button-label-size($padding-large-vertical, $padding-large-horizontal, $border-radius-large);
}
.btn-sm .btn-label {
@include button-label-size($padding-small-vertical, $padding-small-horizontal, $border-radius-small);
}
.btn-xs .btn-label {
@include button-label-size(1px, 5px, $border-radius-small);
}

View File

@@ -0,0 +1,114 @@
// Fileinput
// CSS for file upload button and fileinput widget
// ------------------------------------------------
.btn-file {
overflow: hidden;
position: relative;
vertical-align: middle;
> input {
position: absolute;
top: 0;
right: 0;
margin: 0;
opacity: 0;
filter: alpha(opacity=0);
font-size: 23px;
height: 100%;
width: 100%;
direction: ltr;
cursor: pointer;
}
}
.fileinput {
margin-bottom: 9px;
display: inline-block;
.form-control {
padding-top: 7px;
padding-bottom: 5px;
display: inline-block;
margin-bottom: 0px;
vertical-align: middle;
cursor: text;
}
.thumbnail {
overflow: hidden;
display: inline-block;
margin-bottom: 5px;
vertical-align: middle;
text-align: center;
> img {
max-height: 100%;
}
}
.btn {
vertical-align: middle;
}
}
.fileinput-exists .fileinput-new,
.fileinput-new .fileinput-exists {
display: none;
}
.fileinput-inline .fileinput-controls {
display: inline;
}
.fileinput-filename {
vertical-align: middle;
display: inline-block;
overflow: hidden;
}
.form-control .fileinput-filename {
vertical-align: bottom;
}
.fileinput.input-group {
display: table;
}
// Not 100% correct, but helps in typical use case
.fileinput-new.input-group .btn-file,
.fileinput-new .input-group .btn-file {
border-radius: 0 $border-radius-base $border-radius-base 0;
&.btn-xs,
&.btn-sm {
border-radius: 0 $border-radius-small $border-radius-small 0;
}
&.btn-lg {
border-radius: 0 $border-radius-large $border-radius-large 0;
}
}
.form-group.has-warning .fileinput {
.fileinput-preview {
color: $state-warning-text;
}
.thumbnail {
border-color: $state-warning-border;
}
}
.form-group.has-error .fileinput {
.fileinput-preview {
color: $state-danger-text;
}
.thumbnail {
border-color: $state-danger-border;
}
}
.form-group.has-success .fileinput {
.fileinput-preview {
color: $state-success-text;
}
.thumbnail {
border-color: $state-success-border;
}
}
// Input group fixes
.input-group-addon:not(:first-child) {
border-left: 0;
}

View File

@@ -0,0 +1,10 @@
// Smooth sizing container
// -------------------------
.container-smooth {
max-width: $container-lg;
@media (min-width: 1px) {
width: auto;
}
}

View File

@@ -0,0 +1,97 @@
// Alignment options
// -------------------------
// bottom
.nav-tabs-bottom {
border-bottom: 0;
border-top: 1px solid $nav-tabs-border-color;
> li {
margin-bottom: 0;
margin-top: -1px;
> a {
border-radius: 0 0 $border-radius-base $border-radius-base;
}
> a:hover,
> a:focus,
&.active > a,
&.active > a:hover,
&.active > a:focus {
border: 1px solid $nav-tabs-active-link-hover-border-color;
border-top-color: transparent;
}
}
}
// left
.nav-tabs-left {
border-bottom: 0;
border-right: 1px solid $nav-tabs-border-color;
> li {
margin-bottom: 0;
margin-right: -1px;
float: none;
> a {
border-radius: $border-radius-base 0 0 $border-radius-base;
margin-right: 0;
margin-bottom: 2px;
}
> a:hover,
> a:focus,
&.active > a,
&.active > a:hover,
&.active > a:focus {
border: 1px solid $nav-tabs-active-link-hover-border-color;
border-right-color: transparent;
}
}
.row > & {
padding-right: 0;
padding-left: ($grid-gutter-width / 2);
margin-right: -1px;
position: relative;
z-index: 1;
& + .tab-content {
border-left: 1px solid $nav-tabs-active-link-hover-border-color;
}
}
}
// right
.nav-tabs-right {
border-bottom: 0;
border-left: 1px solid $nav-tabs-border-color;
> li {
margin-bottom: 0;
margin-left: -1px;
float: none;
> a {
border-radius: 0 $border-radius-base $border-radius-base 0;
margin-left: 0;
margin-bottom: 2px;
}
> a:hover,
> a:focus,
&.active > a,
&.active > a:hover,
&.active > a:focus {
border: 1px solid $nav-tabs-active-link-hover-border-color;
border-left-color: transparent;
}
}
.row > & {
padding-left: 0;
padding-right: ($grid-gutter-width / 2);
}
}

View File

@@ -0,0 +1,273 @@
// Navmenu and offcanvas navbar
// --------------------------------------------------
// Wrapper and base class
//
// Provide a static navmenu from which we expand to create the fixed navmenu
// variations.
.navmenu,
.navbar-offcanvas {
width: $navmenu-width;
height: 100%;
border-width: 1px;
border-style: solid;
border-radius: $border-radius-base;
}
.navmenu-fixed-left,
.navmenu-fixed-right,
.navbar-offcanvas {
position: fixed;
z-index: $zindex-navmenu-fixed;
top: 0;
border-radius: 0;
}
.navmenu-fixed-left,
.navbar-offcanvas.navmenu-fixed-left {
left: 0;
right: auto;
border-width: 0 1px 0 0;
bottom: 0;
overflow-y: auto;
}
.navmenu-fixed-right,
.navbar-offcanvas {
left: auto;
right: 0;
border-width: 0 0 0 1px;
}
.navmenu-nav {
margin-bottom: $navmenu-margin-vertical;
&.dropdown-menu {
position: static;
margin: 0;
padding-top: 0;
float: none;
border: none;
@include box-shadow(none);
border-radius: 0;
}
}
.navbar-offcanvas {
.navbar-nav {
margin: 0;
}
@media (min-width: $grid-float-breakpoint) {
width: auto;
border-top: 0;
box-shadow: none;
&.offcanvas {
position: static;
display: block !important;
height: auto !important;
padding-bottom: 0; // Override default setting
overflow: visible !important;
}
// Account for first and last children spacing
.navbar-nav.navbar-left:first-child {
margin-left: -$navbar-padding-horizontal;
}
.navbar-nav.navbar-right:last-child {
margin-right: -$navbar-padding-horizontal;
}
.navmenu-brand {
display: none;
}
}
}
// Brand/project name
.navmenu-brand {
display: block;
font-size: $font-size-large;
line-height: $line-height-computed;
padding: $nav-link-padding;
&:hover,
&:focus {
text-decoration: none;
}
margin: $navmenu-margin-vertical 0;
}
// Alternate navmenus
// --------------------------------------------------
// Default navmenu
.navmenu-default,
.navbar-default .navbar-offcanvas {
background-color: $navmenu-default-bg;
border-color: $navmenu-default-border;
.navmenu-brand {
color: $navmenu-default-brand-color;
&:hover,
&:focus {
color: $navmenu-default-brand-hover-color;
background-color: $navmenu-default-brand-hover-bg;
}
}
.navmenu-text {
color: $navmenu-default-color;
}
.navmenu-nav {
// Caret should match text color on hover
> .dropdown > a:hover .caret,
> .dropdown > a:focus .caret {
border-top-color: $navmenu-default-link-hover-color;
border-bottom-color: $navmenu-default-link-hover-color;
}
// Remove background color from open dropdown
> .open > a {
&,
&:hover,
&:focus {
background-color: $navmenu-default-link-active-bg;
color: $navmenu-default-link-active-color;
.caret {
border-top-color: $navmenu-default-link-active-color;
border-bottom-color: $navmenu-default-link-active-color;
}
}
}
> .dropdown > a .caret {
border-top-color: $navmenu-default-link-color;
border-bottom-color: $navmenu-default-link-color;
}
&.dropdown-menu {
background-color: $navmenu-default-link-active-bg;
& > .divider {
background-color: $navmenu-default-bg;
}
> .active > a {
&,
&:hover,
&:focus {
background-color: darken($navmenu-default-link-active-bg, 6.5%);
}
}
}
> li > a {
color: $navmenu-default-link-color;
&:hover,
&:focus {
color: $navmenu-default-link-hover-color;
background-color: $navmenu-default-link-hover-bg;
}
}
> .active > a {
&,
&:hover,
&:focus {
color: $navmenu-default-link-active-color;
background-color: $navmenu-default-link-active-bg;
}
}
> .disabled > a {
&,
&:hover,
&:focus {
color: $navmenu-default-link-disabled-color;
background-color: $navmenu-default-link-disabled-bg;
}
}
}
}
// Inverse navmenu
.navmenu-inverse,
.navbar-inverse .navbar-offcanvas {
background-color: $navmenu-inverse-bg;
border-color: $navmenu-inverse-border;
.navmenu-brand {
color: $navmenu-inverse-brand-color;
&:hover,
&:focus {
color: $navmenu-inverse-brand-hover-color;
background-color: $navmenu-inverse-brand-hover-bg;
}
}
.navmenu-text {
color: $navmenu-inverse-color;
}
.navmenu-nav {
// Caret should match text color on hover
> .dropdown > a:hover .caret,
> .dropdown > a:focus .caret {
border-top-color: $navmenu-inverse-link-hover-color;
border-bottom-color: $navmenu-inverse-link-hover-color;
}
// Remove background color from open dropdown
> .open > a {
&,
&:hover,
&:focus {
background-color: $navmenu-inverse-link-active-bg;
color: $navmenu-inverse-link-active-color;
.caret {
border-top-color: $navmenu-inverse-link-active-color;
border-bottom-color: $navmenu-inverse-link-active-color;
}
}
}
> .dropdown > a .caret {
border-top-color: $navmenu-inverse-link-color;
border-bottom-color: $navmenu-inverse-link-color;
}
&.dropdown-menu {
background-color: $navmenu-inverse-link-active-bg;
& > .divider {
background-color: $navmenu-inverse-bg;
}
> .active > a {
&,
&:hover,
&:focus {
background-color: darken($navmenu-inverse-link-active-bg, 6.5%);
}
}
}
> li > a {
color: $navmenu-inverse-link-color;
&:hover,
&:focus {
color: $navmenu-inverse-link-hover-color;
background-color: $navmenu-inverse-link-hover-bg;
}
}
> .active > a {
&,
&:hover,
&:focus {
color: $navmenu-inverse-link-active-color;
background-color: $navmenu-inverse-link-active-bg;
}
}
> .disabled > a {
&,
&:hover,
&:focus {
color: $navmenu-inverse-link-disabled-color;
background-color: $navmenu-inverse-link-disabled-bg;
}
}
}
}

View File

@@ -0,0 +1,48 @@
// Off canvas navigation
// --------------------------------------------------
@mixin offcanvas {
display: none;
&.in {
display: block;
}
}
@media (max-width: $screen-xs-max) {
.offcanvas-xs {
@include offcanvas;
}
}
@media (max-width: $screen-sm-max) {
.offcanvas-sm {
@include offcanvas;
}
}
@media (max-width: $screen-md-max) {
.offcanvas-md {
@include offcanvas;
}
}
.offcanvas-lg {
@include offcanvas;
}
.canvas-sliding {
-webkit-transition: top 0.35s, left 0.35s, bottom 0.35s, right 0.35s;
transition: top 0.35s, left 0.35s, bottom 0.35s, right 0.35s;
}
.offcanvas-clone {
height: 0px !important;
width: 0px !important;
overflow: hidden !important;
border: none !important;
margin: 0px !important;
padding: 0px !important;
position: absolute !important;
top: auto !important;
left: auto !important;
bottom: 0px !important;
right: 0px !important;
opacity: 0 !important;
}

View File

@@ -0,0 +1,22 @@
// Rowlink
// --------------------------------------------------
.table.rowlink,
.table .rowlink {
td:not(.rowlink-skip) {
cursor: pointer;
a {
color: inherit;
font: inherit;
text-decoration: inherit;
}
}
}
.table-hover.rowlink,
.table-hover .rowlink {
tr:hover td {
background-color: darken($table-bg-hover, 15%);
}
}

View File

@@ -0,0 +1,66 @@
//
// Variables
//
// Either Twitter Bootstrap's "variables.less" or this package's
// "default-variables.less" should be loaded before this file.
// -------------------------------------------------------------
$zindex-navmenu-fixed: 1030 !default;
$zindex-alert-fixed: 1035 !default;
$container-smooth: $container-lg !default;
$alert-fixed-width: $screen-md-min !default;
//== Navmenu
// Basics of a navmenu
$navmenu-width: 300px !default;
$navmenu-margin-vertical: (0.5 * $line-height-computed) !default;
$navmenu-default-color: #777 !default;
$navmenu-default-bg: #f8f8f8 !default;
$navmenu-default-border: darken($navmenu-default-bg, 6.5%) !default;
// Navmenu links
$navmenu-default-link-color: #777 !default;
$navmenu-default-link-hover-color: #333 !default;
$navmenu-default-link-hover-bg: transparent !default;
$navmenu-default-link-active-color: #555 !default;
$navmenu-default-link-active-bg: darken($navmenu-default-bg, 6.5%) !default;
$navmenu-default-link-disabled-color: #ccc !default;
$navmenu-default-link-disabled-bg: transparent !default;
// Navmenu brand label
$navmenu-default-brand-color: $navmenu-default-link-color !default;
$navmenu-default-brand-hover-color: darken($navmenu-default-link-color, 10%) !default;
$navmenu-default-brand-hover-bg: transparent !default;
// Inverted navmenu
//
// Reset inverted navmenu basics
$navmenu-inverse-color: $gray-light !default;
$navmenu-inverse-bg: #222 !default;
$navmenu-inverse-border: darken($navmenu-inverse-bg, 10%) !default;
// Inverted navmenu links
$navmenu-inverse-link-color: $gray-light !default;
$navmenu-inverse-link-hover-color: #fff !default;
$navmenu-inverse-link-hover-bg: transparent !default;
$navmenu-inverse-link-active-color: $navmenu-inverse-link-hover-color !default;
$navmenu-inverse-link-active-bg: darken($navmenu-inverse-bg, 10%) !default;
$navmenu-inverse-link-disabled-color: #444 !default;
$navmenu-inverse-link-disabled-bg: transparent !default;
// Inverted navmenu brand label
$navmenu-inverse-brand-color: $navmenu-inverse-link-color !default;
$navmenu-inverse-brand-hover-color: #fff !default;
$navmenu-inverse-brand-hover-bg: transparent !default;
// Inverted navmenu search
// Normal navmenu needs no special styles or vars
$navmenu-inverse-search-bg: lighten($navmenu-inverse-bg, 25%) !default;
$navmenu-inverse-search-bg-focus: #fff !default;
$navmenu-inverse-search-border: $navmenu-inverse-bg !default;
$navmenu-inverse-search-placeholder-color: #ccc !default;

View File

@@ -0,0 +1,19 @@
// Twitter Bootstrap's "variables.scss" should already be imported
// Core variables and mixins
@import "variables";
@import "mixins";
// Core CSS
@import "grid-container-smooth";
@import "button-labels";
// Components
@import "nav-tab-alignment";
@import "navmenu";
@import "alerts-fixed";
// Components w/ JavaScript
@import "offcanvas";
@import "rowlink";
@import "fileinput";

View File

@@ -0,0 +1,100 @@
## What does `s3_cache.py` do?
### In general
`s3_cache.py` maintains a cache, stored in an Amazon S3 (Simple Storage Service) bucket, of a given directory whose contents are considered non-critical and are completely & solely determined by (and should be able to be regenerated from) a single given file.
The SHA-256 hash of the single file is used as the key for the cache. The directory is stored as a gzipped tarball.
All the tarballs are stored in S3's Reduced Redundancy Storage (RRS) storage class, since this is cheaper and the data is non-critical.
`s3_cache.py` itself never deletes cache entries; deletion should either be done manually or using automatic S3 lifecycle rules on the bucket.
Similar to git, `s3_cache.py` makes the assumption that [SHA-256 will effectively never have a collision](http://stackoverflow.com/questions/4014090/is-it-safe-to-ignore-the-possibility-of-sha-collisions-in-practice).
### For Bootstrap specifically
`s3_cache.py` is used to cache the npm packages that our Grunt tasks depend on and the RubyGems that Jekyll depends on. (Jekyll is needed to compile our docs to HTML so that we can run them thru an HTML5 validator.)
For npm, the `node_modules` directory is cached based on our `npm-shrinkwrap.canonical.json` file.
For RubyGems, the `gemdir` of the current RVM-selected Ruby is cached based on the `pseudo_Gemfile.lock` file generated by our Travis build script.
`pseudo_Gemfile.lock` contains the versions of Ruby and Jekyll that we're using (read our `.travis.yml` for details).
## Why is `s3_cache.py` necessary?
`s3_cache.py` is used to speed up Bootstrap's Travis builds. Installing npm packages and RubyGems used to take up a significant fraction of our total build times. Also, at the time that `s3_cache.py` was written, npm was occasionally unreliable.
Travis does offer built-in caching on their paid plans, but this do-it-ourselves S3 solution is significantly cheaper since we only need caching and not Travis' other paid features.
## Setup
### Overview
1. Create an Amazon Web Services (AWS) account.
2. Create an Identity & Access Management (IAM) user, and note their credentials.
3. Create an S3 bucket.
4. Set permissions on the bucket to grant the user read+write access.
5. Set the user credentials as secure Travis environment variables.
### In detail
1. Create an AWS account.
2. Login to the [AWS Management Console](https://console.aws.amazon.com).
3. Go to the IAM Management Console.
4. Create a new user (named e.g. `travis-ci`) and generate an access key for them. Note both the Access Key ID and the Secret Access Key.
5. Note the user's ARN (Amazon Resource Name), which can be found in the "Summary" tab of the user browser. This will be of the form: `arn:aws:iam::XXXXXXXXXXXXXX:user/the-username-goes-here`
6. Note the user's access key, which can be found in the "Security Credentials" tab of the user browser.
7. Go to the S3 Management Console.
8. Create a new bucket. For a non-publicly-accessible bucket (like Bootstrap uses), it's recommended that the bucket name be random to increase security. On most *nix machines, you can easily generate a random UUID to use as the bucket name using Python:
```bash
python -c "import uuid; print(uuid.uuid4())"
```
9. Determine and note what your bucket's ARN is. The ARN for an S3 bucket is of the form: `arn:aws:s3:::the-bucket-name-goes-here`
10. In the bucket's Properties pane, in the "Permissions" section, click the "Edit bucket policy" button.
11. Input and submit an IAM Policy that grants the user at least read+write rights to the bucket. AWS has a policy generator and some examples to help with crafting the policy. Here's the policy that Bootstrap uses, with the sensitive bits censored:
```json
{
"Version": "2012-10-17",
"Id": "PolicyTravisReadWriteNoAdmin",
"Statement": [
{
"Sid": "StmtXXXXXXXXXXXXXX",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::XXXXXXXXXXXXXX:user/travis-ci"
},
"Action": [
"s3:AbortMultipartUpload",
"s3:GetObjectVersion",
"s3:ListBucket",
"s3:DeleteObject",
"s3:DeleteObjectVersion",
"s3:GetObject",
"s3:PutObject"
],
"Resource": [
"arn:aws:s3:::XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
"arn:aws:s3:::XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/*"
]
}
]
}
```
12. If you want deletion from the cache to be done automatically based on age (like Bootstrap does): In the bucket's Properties pane, in the "Lifecycle" section, add a rule to expire/delete files based on creation date.
13. Install the [`travis` RubyGem](https://github.com/travis-ci/travis): `gem install travis`
14. Encrypt the environment variables:
```bash
travis encrypt --repo twbs/bootstrap "AWS_ACCESS_KEY_ID=XXX"
travis encrypt --repo twbs/bootstrap "AWS_SECRET_ACCESS_KEY=XXX"
travis encrypt --repo twbs/bootstrap "TWBS_S3_BUCKET=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
```
14. Add the resulting secure environment variables to `.travis.yml`.
## Usage
Read `s3_cache.py`'s source code and Bootstrap's `.travis.yml` for how to invoke and make use of `s3_cache.py`.

View File

@@ -0,0 +1,107 @@
#!/usr/bin/env python2.7
from __future__ import absolute_import, unicode_literals, print_function, division
from sys import argv
from os import environ, stat, remove as _delete_file
from os.path import isfile, dirname, basename, abspath
from hashlib import sha256
from subprocess import check_call as run
from boto.s3.connection import S3Connection
from boto.s3.key import Key
from boto.exception import S3ResponseError
NEED_TO_UPLOAD_MARKER = '.need-to-upload'
BYTES_PER_MB = 1024 * 1024
try:
BUCKET_NAME = environ['TWBS_S3_BUCKET']
except KeyError:
raise SystemExit("TWBS_S3_BUCKET environment variable not set!")
def _sha256_of_file(filename):
hasher = sha256()
with open(filename, 'rb') as input_file:
hasher.update(input_file.read())
file_hash = hasher.hexdigest()
print('sha256({}) = {}'.format(filename, file_hash))
return file_hash
def _delete_file_quietly(filename):
try:
_delete_file(filename)
except (OSError, IOError):
pass
def _tarball_size(directory):
kib = stat(_tarball_filename_for(directory)).st_size // BYTES_PER_MB
return "{} MiB".format(kib)
def _tarball_filename_for(directory):
return abspath('./{}.tar.gz'.format(basename(directory)))
def _create_tarball(directory):
print("Creating tarball of {}...".format(directory))
run(['tar', '-czf', _tarball_filename_for(directory), '-C', dirname(directory), basename(directory)])
def _extract_tarball(directory):
print("Extracting tarball of {}...".format(directory))
run(['tar', '-xzf', _tarball_filename_for(directory), '-C', dirname(directory)])
def download(directory):
_delete_file_quietly(NEED_TO_UPLOAD_MARKER)
try:
print("Downloading {} tarball from S3...".format(friendly_name))
key.get_contents_to_filename(_tarball_filename_for(directory))
except S3ResponseError as err:
open(NEED_TO_UPLOAD_MARKER, 'a').close()
print(err)
raise SystemExit("Cached {} download failed!".format(friendly_name))
print("Downloaded {}.".format(_tarball_size(directory)))
_extract_tarball(directory)
print("{} successfully installed from cache.".format(friendly_name))
def upload(directory):
_create_tarball(directory)
print("Uploading {} tarball to S3... ({})".format(friendly_name, _tarball_size(directory)))
key.set_contents_from_filename(_tarball_filename_for(directory))
print("{} cache successfully updated.".format(friendly_name))
_delete_file_quietly(NEED_TO_UPLOAD_MARKER)
if __name__ == '__main__':
# Uses environment variables:
# AWS_ACCESS_KEY_ID -- AWS Access Key ID
# AWS_SECRET_ACCESS_KEY -- AWS Secret Access Key
argv.pop(0)
if len(argv) != 4:
raise SystemExit("USAGE: s3_cache.py <download | upload> <friendly name> <dependencies file> <directory>")
mode, friendly_name, dependencies_file, directory = argv
conn = S3Connection()
bucket = conn.lookup(BUCKET_NAME, validate=False)
if bucket is None:
raise SystemExit("Could not access bucket!")
dependencies_file_hash = _sha256_of_file(dependencies_file)
key = Key(bucket, dependencies_file_hash)
key.storage_class = 'REDUCED_REDUNDANCY'
if mode == 'download':
download(directory)
elif mode == 'upload':
if isfile(NEED_TO_UPLOAD_MARKER): # FIXME
upload(directory)
else:
print("No need to upload anything.")
else:
raise SystemExit("Unrecognized mode {!r}".format(mode))

View File

@@ -0,0 +1,83 @@
[
# Docs: https://saucelabs.com/docs/platforms/webdriver
{
browserName: "safari",
platform: "OS X 10.9"
},
# {
# browserName: "googlechrome",
# platform: "OS X 10.9",
# version: "31"
# },
{
browserName: "firefox",
platform: "OS X 10.9"
},
# Mac Opera not currently supported by Sauce Labs
{
browserName: "internet explorer",
version: "11",
platform: "Windows 8.1"
},
{
browserName: "internet explorer",
version: "10",
platform: "Windows 8"
},
# {
# browserName: "internet explorer",
# version: "9",
# platform: "Windows 7"
# },
# {
# browserName: "internet explorer",
# version: "8",
# platform: "Windows 7"
# },
# { # Unofficial
# browserName: "internet explorer",
# version: "7",
# platform: "Windows XP"
# },
{
browserName: "googlechrome",
platform: "Windows 8.1"
},
{
browserName: "firefox",
platform: "Windows 8.1"
},
# Win Opera 15+ not currently supported by Sauce Labs
{
browserName: "iphone",
platform: "OS X 10.9",
version: "7"
},
# iOS Chrome not currently supported by Sauce Labs
# Linux (unofficial)
{
browserName: "googlechrome",
platform: "Linux"
},
{
browserName: "firefox",
platform: "Linux"
}
# Android Chrome not currently supported by Sauce Labs
# { # Android Browser (super-unofficial)
# browserName: "android",
# version: "4.0",
# platform: "Linux"
# }
]

View File

@@ -0,0 +1,4 @@
#!/bin/bash
cp test-infra/npm-shrinkwrap.canonical.json npm-shrinkwrap.json
npm install
rm npm-shrinkwrap.json