├── bootstrap ├── .gitignore ├── docs │ └── assets │ │ ├── img │ │ ├── bird.png │ │ ├── browsers.png │ │ ├── grid-18px.png │ │ ├── example-diagram-01.png │ │ ├── example-diagram-02.png │ │ ├── example-diagram-03.png │ │ └── twitter-logo-no-bird.png │ │ ├── ico │ │ ├── favicon.ico │ │ ├── bootstrap-apple-57x57.png │ │ ├── bootstrap-apple-72x72.png │ │ └── bootstrap-apple-114x114.png │ │ ├── js │ │ ├── google-code-prettify │ │ │ ├── prettify.css │ │ │ └── prettify.js │ │ └── application.js │ │ └── css │ │ └── docs.css ├── site.js ├── LICENSE ├── lib │ ├── bootstrap.less │ ├── variables.less │ ├── scaffolding.less │ ├── type.less │ ├── reset.less │ ├── tables.less │ ├── mixins.less │ ├── forms.less │ └── patterns.less ├── js │ ├── tests │ │ ├── unit │ │ │ ├── bootstrap-scrollspy.js │ │ │ ├── bootstrap-alerts.js │ │ │ ├── bootstrap-tabs.js │ │ │ ├── bootstrap-dropdown.js │ │ │ ├── bootstrap-popover.js │ │ │ ├── bootstrap-twipsy.js │ │ │ └── bootstrap-modal.js │ │ ├── index.html │ │ └── vendor │ │ │ └── qunit.css │ ├── bootstrap-dropdown.js │ ├── bootstrap-tabs.js │ ├── bootstrap-popover.js │ ├── bootstrap-alerts.js │ ├── bootstrap-scrollspy.js │ ├── bootstrap-modal.js │ └── bootstrap-twipsy.js ├── Makefile ├── examples │ ├── hero.html │ ├── container-app.html │ └── fluid.html ├── README.md └── site.css ├── README.md ├── BootstrapExtension.php ├── LICENSE.txt └── Bootstrap.php /bootstrap/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store -------------------------------------------------------------------------------- /bootstrap/docs/assets/img/bird.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Bootstrap-Skin/master/bootstrap/docs/assets/img/bird.png -------------------------------------------------------------------------------- /bootstrap/site.js: -------------------------------------------------------------------------------- 1 | $(function(){ 2 | $(".editButtons input").each(function(){ 3 | $(this).addClass("btn"); 4 | }); 5 | }); -------------------------------------------------------------------------------- /bootstrap/docs/assets/ico/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Bootstrap-Skin/master/bootstrap/docs/assets/ico/favicon.ico -------------------------------------------------------------------------------- /bootstrap/docs/assets/img/browsers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Bootstrap-Skin/master/bootstrap/docs/assets/img/browsers.png -------------------------------------------------------------------------------- /bootstrap/docs/assets/img/grid-18px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Bootstrap-Skin/master/bootstrap/docs/assets/img/grid-18px.png -------------------------------------------------------------------------------- /bootstrap/docs/assets/img/example-diagram-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Bootstrap-Skin/master/bootstrap/docs/assets/img/example-diagram-01.png -------------------------------------------------------------------------------- /bootstrap/docs/assets/img/example-diagram-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Bootstrap-Skin/master/bootstrap/docs/assets/img/example-diagram-02.png -------------------------------------------------------------------------------- /bootstrap/docs/assets/img/example-diagram-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Bootstrap-Skin/master/bootstrap/docs/assets/img/example-diagram-03.png -------------------------------------------------------------------------------- /bootstrap/docs/assets/ico/bootstrap-apple-57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Bootstrap-Skin/master/bootstrap/docs/assets/ico/bootstrap-apple-57x57.png -------------------------------------------------------------------------------- /bootstrap/docs/assets/ico/bootstrap-apple-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Bootstrap-Skin/master/bootstrap/docs/assets/ico/bootstrap-apple-72x72.png -------------------------------------------------------------------------------- /bootstrap/docs/assets/img/twitter-logo-no-bird.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Bootstrap-Skin/master/bootstrap/docs/assets/img/twitter-logo-no-bird.png -------------------------------------------------------------------------------- /bootstrap/docs/assets/ico/bootstrap-apple-114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Bootstrap-Skin/master/bootstrap/docs/assets/ico/bootstrap-apple-114x114.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | A work in progress. 2 | 3 | ![MediaWiki Bootstrap Skin](http://aaronpk.github.com/mediawiki-bootstrap-screenshot.png "MediaWiki Bootstrap Skin") 4 | 5 | ![MediaWiki Bootstrap Skin Grid System](http://aaronpk.github.com/mediawiki-bootstrap-grid-system.png "MediaWiki Bootstrap Skin Grid System") -------------------------------------------------------------------------------- /bootstrap/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2011 Twitter, Inc. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. -------------------------------------------------------------------------------- /bootstrap/lib/bootstrap.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap @VERSION 3 | * 4 | * Copyright 2011 Twitter, Inc 5 | * Licensed under the Apache License v2.0 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Designed and built with all the love in the world @twitter by @mdo and @fat. 9 | * Date: @DATE 10 | */ 11 | 12 | // CSS Reset 13 | @import "reset.less"; 14 | 15 | // Core variables and mixins 16 | @import "variables.less"; // Modify this for custom colors, font-sizes, etc 17 | @import "mixins.less"; 18 | 19 | // Grid system and page structure 20 | @import "scaffolding.less"; 21 | 22 | // Styled patterns and elements 23 | @import "type.less"; 24 | @import "forms.less"; 25 | @import "tables.less"; 26 | @import "patterns.less"; -------------------------------------------------------------------------------- /bootstrap/js/tests/unit/bootstrap-scrollspy.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | 3 | module("bootstrap-scrollspy") 4 | 5 | test("should be defined on jquery object", function () { 6 | ok($(document.body).scrollspy, 'scrollspy method is defined') 7 | }) 8 | 9 | test("should return element", function () { 10 | ok($(document.body).scrollspy()[0] == document.body, 'document.body returned') 11 | }) 12 | 13 | test("should switch active class on scroll", function () { 14 | var sectionHTML = '
' 15 | , $section = $(sectionHTML).append('#qunit-runoff') 16 | , topbarHTML ='
' 17 | + '
' 18 | + '
' 19 | + '

Bootstrap

' 20 | + '' 23 | + '
' 24 | + '
' 25 | + '
' 26 | , $topbar = $(topbarHTML).topbar() 27 | 28 | ok(topbar.find('.active', true) 29 | }) 30 | 31 | }) -------------------------------------------------------------------------------- /bootstrap/Makefile: -------------------------------------------------------------------------------- 1 | VERSION=1.2.0 2 | DATE=$(shell DATE) 3 | BOOTSTRAP = ./bootstrap.css 4 | BOOTSTRAP_MIN = ./bootstrap.min.css 5 | BOOTSTRAP_LESS = ./lib/bootstrap.less 6 | LESS_COMPESSOR ?= `which lessc` 7 | WATCHR ?= `which watchr` 8 | 9 | build: 10 | @@if test ! -z ${LESS_COMPESSOR}; then \ 11 | sed -e 's/@VERSION/'"v${VERSION}"'/' -e 's/@DATE/'"${DATE}"'/' <${BOOTSTRAP_LESS} >${BOOTSTRAP_LESS}.tmp; \ 12 | lessc ${BOOTSTRAP_LESS}.tmp > ${BOOTSTRAP}; \ 13 | lessc ${BOOTSTRAP_LESS}.tmp > ${BOOTSTRAP_MIN} --compress; \ 14 | rm -f ${BOOTSTRAP_LESS}.tmp; \ 15 | echo "Bootstrap successfully built! - `date`"; \ 16 | else \ 17 | echo "You must have the LESS compiler installed in order to build Bootstrap."; \ 18 | echo "You can install it by running: npm install less -g"; \ 19 | fi 20 | 21 | watch: 22 | @@if test ! -z ${WATCHR}; then \ 23 | echo "Watching less files..."; \ 24 | watchr -e "watch('lib/.*\.less') { system 'make' }"; \ 25 | else \ 26 | echo "You must have the watchr installed in order to watch Bootstrap less files."; \ 27 | echo "You can install it by running: gem install watchr"; \ 28 | fi 29 | 30 | .PHONY: build watch -------------------------------------------------------------------------------- /bootstrap/docs/assets/js/google-code-prettify/prettify.css: -------------------------------------------------------------------------------- 1 | .com { color: #93a1a1; } 2 | .lit { color: #195f91; } 3 | .pun, .opn, .clo { color: #93a1a1; } 4 | .fun { color: #dc322f; } 5 | .str, .atv { color: #268bd2; } 6 | .kwd, .tag { color: #195f91; } 7 | .typ, .atn, .dec, .var { color: #CB4B16; } 8 | .pln { color: #93a1a1; } 9 | pre.prettyprint { 10 | background: #fefbf3; 11 | padding: 9px; 12 | border: 1px solid rgba(0,0,0,.2); 13 | -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.1); 14 | -moz-box-shadow: 0 1px 2px rgba(0,0,0,.1); 15 | box-shadow: 0 1px 2px rgba(0,0,0,.1); 16 | } 17 | 18 | /* Specify class=linenums on a pre to get line numbering */ 19 | ol.linenums { margin: 0 0 0 40px; } /* IE indents via margin-left */ 20 | ol.linenums li { color: rgba(0,0,0,.15); line-height: 20px; } 21 | /* Alternate shading for lines */ 22 | li.L1, li.L3, li.L5, li.L7, li.L9 { } 23 | 24 | /* 25 | $base03: #002b36; 26 | $base02: #073642; 27 | $base01: #586e75; 28 | $base00: #657b83; 29 | $base0: #839496; 30 | $base1: #93a1a1; 31 | $base2: #eee8d5; 32 | $base3: #fdf6e3; 33 | $yellow: #b58900; 34 | $orange: #cb4b16; 35 | $red: #dc322f; 36 | $magenta: #d33682; 37 | $violet: #6c71c4; 38 | $blue: #268bd2; 39 | $cyan: #2aa198; 40 | $green: #859900; 41 | */ -------------------------------------------------------------------------------- /bootstrap/js/tests/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Bootstrap Plugin Test Suite 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |

Bootstrap Plugin Test Suite

32 |

33 |

34 |
    35 |
    36 |
    37 | 38 | -------------------------------------------------------------------------------- /BootstrapExtension.php: -------------------------------------------------------------------------------- 1 | 'Bootstrap', 6 | 'author' => 'Aaron Parecki', 7 | 'description' => 'Adds tags to support Bootstrap layouts', 8 | 'url' => 'https://github.com/aaronpk/Bootstrap-Skin' 9 | ); 10 | 11 | function BootstrapSetup() { 12 | global $wgParser; 13 | 14 | for($i=1; $i<=16; $i++) 15 | $wgParser->setHook('span'.$i, array('BootstrapExtension','span'.$i)); 16 | $wgParser->setHook('span-one-third', array('BootstrapExtension','span-one-third')); 17 | $wgParser->setHook('span-two-thirds', array('BootstrapExtension','span-two-thirds')); 18 | $wgParser->setHook('row', array('BootstrapExtension','row')); 19 | $wgParser->setHook('mediagrid', array('BootstrapExtension','mediagrid')); 20 | } 21 | 22 | class BootstrapExtension { 23 | 24 | public static function mediagrid() 25 | { 26 | 27 | } 28 | 29 | public static function __callStatic($name, $fargs) 30 | { 31 | global $wgParser; 32 | 33 | $input = $fargs[0]; 34 | 35 | $class = FALSE; 36 | if(is_array($fargs[1])) { 37 | if(array_key_exists('class', $fargs[1])) { 38 | $class = $fargs[1]['class']; 39 | } 40 | } 41 | 42 | return '
    ' . $wgParser->recursiveTagParse($input) . '
    '; 43 | } 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /bootstrap/docs/assets/js/application.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | 3 | // table sort example 4 | // ================== 5 | 6 | $("#sortTableExample").tablesorter( { sortList: [[ 1, 0 ]] } ) 7 | 8 | 9 | // add on logic 10 | // ============ 11 | 12 | $('.add-on :checkbox').click(function () { 13 | if ($(this).attr('checked')) { 14 | $(this).parents('.add-on').addClass('active') 15 | } else { 16 | $(this).parents('.add-on').removeClass('active') 17 | } 18 | }) 19 | 20 | 21 | // Disable certain links in docs 22 | // ============================= 23 | // Please do not carry these styles over to your projects, it's merely here to prevent button clicks form taking you away from your spot on page 24 | 25 | $('ul.tabs a, ul.pills a, .pagination a, .well .btn, .actions .btn, .alert-message .btn, a.close').click(function (e) { 26 | e.preventDefault() 27 | }) 28 | 29 | // Copy code blocks in docs 30 | $(".copy-code").focus(function () { 31 | var el = this; 32 | // push select to event loop for chrome :{o 33 | setTimeout(function () { $(el).select(); }, 0); 34 | }); 35 | 36 | 37 | // POSITION STATIC TWIPSIES 38 | // ======================== 39 | 40 | $(window).bind( 'load resize', function () { 41 | $(".twipsies a").each(function () { 42 | $(this) 43 | .twipsy({ 44 | live: false 45 | , placement: $(this).attr('title') 46 | , trigger: 'manual' 47 | , offset: 2 48 | }) 49 | .twipsy('show') 50 | }) 51 | }) 52 | }); 53 | -------------------------------------------------------------------------------- /bootstrap/js/tests/unit/bootstrap-alerts.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | 3 | module("bootstrap-alerts") 4 | 5 | test("should be defined on jquery object", function () { 6 | ok($(document.body).alert, 'alert method is defined') 7 | }) 8 | 9 | test("should return element", function () { 10 | ok($(document.body).alert()[0] == document.body, 'document.body returned') 11 | }) 12 | 13 | test("should fade element out on clicking .close", function () { 14 | var alertHTML = '
    ' 15 | + '×' 16 | + '

    Holy guacamole! Best check yo self, you’re not looking too good.

    ' 17 | + '
    ' 18 | , alert = $(alertHTML).alert() 19 | 20 | alert.find('.close').click() 21 | 22 | ok(!alert.hasClass('in'), 'remove .in class on .close click') 23 | }) 24 | 25 | test("should remove element when clicking .close", function () { 26 | $.support.transition = false 27 | 28 | var alertHTML = '
    ' 29 | + '×' 30 | + '

    Holy guacamole! Best check yo self, you’re not looking too good.

    ' 31 | + '
    ' 32 | , alert = $(alertHTML).appendTo('#qunit-runoff').alert() 33 | 34 | ok($('#qunit-runoff').find('.alert-message').length, 'element added to dom') 35 | 36 | alert.find('.close').click() 37 | 38 | ok(!$('#qunit-runoff').find('.alert-message').length, 'element removed from dom') 39 | }) 40 | 41 | }) -------------------------------------------------------------------------------- /bootstrap/js/bootstrap-dropdown.js: -------------------------------------------------------------------------------- 1 | /* ============================================================ 2 | * bootstrap-dropdown.js v1.3.0 3 | * http://twitter.github.com/bootstrap/javascript.html#dropdown 4 | * ============================================================ 5 | * Copyright 2011 Twitter, Inc. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * ============================================================ */ 19 | 20 | 21 | (function( $ ){ 22 | 23 | var d = 'a.menu, .dropdown-toggle' 24 | 25 | function clearMenus() { 26 | $(d).parent('li').removeClass('open') 27 | } 28 | 29 | $(function () { 30 | $('html').bind("click", clearMenus) 31 | $('body').dropdown( '[data-dropdown] a.menu, [data-dropdown] .dropdown-toggle' ) 32 | }) 33 | 34 | /* DROPDOWN PLUGIN DEFINITION 35 | * ========================== */ 36 | 37 | $.fn.dropdown = function ( selector ) { 38 | return this.each(function () { 39 | $(this).delegate(selector || d, 'click', function (e) { 40 | var li = $(this).parent('li') 41 | , isActive = li.hasClass('open') 42 | 43 | clearMenus() 44 | !isActive && li.toggleClass('open') 45 | return false 46 | }) 47 | }) 48 | } 49 | 50 | })( window.jQuery || window.ender ) -------------------------------------------------------------------------------- /bootstrap/js/tests/unit/bootstrap-tabs.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | 3 | module("bootstrap-tabs") 4 | 5 | test("should be defined on jquery object", function () { 6 | ok($(document.body).tabs, 'tabs method is defined') 7 | }) 8 | 9 | test("should return element", function () { 10 | ok($(document.body).tabs()[0] == document.body, 'document.body returned') 11 | }) 12 | 13 | test("should activate element by tab id", function () { 14 | var tabsHTML = '' 18 | 19 | 20 | $('').appendTo("#qunit-runoff") 21 | 22 | $(tabsHTML).tabs().find('a').last().click() 23 | equals($("#qunit-runoff").find('.active').attr('id'), "profile") 24 | 25 | $(tabsHTML).tabs().find('a').first().click() 26 | equals($("#qunit-runoff").find('.active').attr('id'), "home") 27 | 28 | $("#qunit-runoff").empty() 29 | }) 30 | 31 | test("should activate element by pill id", function () { 32 | var pillsHTML = '' 36 | 37 | 38 | $('').appendTo("#qunit-runoff") 39 | 40 | $(pillsHTML).pills().find('a').last().click() 41 | equals($("#qunit-runoff").find('.active').attr('id'), "profile") 42 | 43 | $(pillsHTML).pills().find('a').first().click() 44 | equals($("#qunit-runoff").find('.active').attr('id'), "home") 45 | 46 | $("#qunit-runoff").empty() 47 | }) 48 | 49 | }) -------------------------------------------------------------------------------- /bootstrap/js/bootstrap-tabs.js: -------------------------------------------------------------------------------- 1 | /* ======================================================== 2 | * bootstrap-tabs.js v1.3.0 3 | * http://twitter.github.com/bootstrap/javascript.html#tabs 4 | * ======================================================== 5 | * Copyright 2011 Twitter, Inc. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * ======================================================== */ 19 | 20 | 21 | (function( $ ){ 22 | 23 | function activate ( element, container ) { 24 | container.find('.active').removeClass('active') 25 | element.addClass('active') 26 | } 27 | 28 | function tab( e ) { 29 | var $this = $(this) 30 | , href = $this.attr('href') 31 | , $ul = $(e.liveFired) 32 | , $controlled 33 | 34 | if (/^#\w+/.test(href)) { 35 | e.preventDefault() 36 | 37 | if ($this.hasClass('active')) { 38 | return 39 | } 40 | 41 | $href = $(href) 42 | 43 | activate($this.parent('li'), $ul) 44 | activate($href, $href.parent()) 45 | } 46 | } 47 | 48 | 49 | /* TABS/PILLS PLUGIN DEFINITION 50 | * ============================ */ 51 | 52 | $.fn.tabs = $.fn.pills = function ( selector ) { 53 | return this.each(function () { 54 | $(this).delegate(selector || '.tabs li > a, .pills > li > a', 'click', tab) 55 | }) 56 | } 57 | 58 | $(document).ready(function () { 59 | $('body').tabs('ul[data-tabs] li > a, ul[data-pills] > li > a') 60 | }) 61 | 62 | })( window.jQuery || window.ender ) -------------------------------------------------------------------------------- /bootstrap/js/tests/unit/bootstrap-dropdown.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | 3 | module("bootstrap-dropdowns") 4 | 5 | test("should be defined on jquery object", function () { 6 | ok($(document.body).dropdown, 'dropdown method is defined') 7 | }) 8 | 9 | test("should return element", function () { 10 | ok($(document.body).dropdown()[0] == document.body, 'document.body returned') 11 | }) 12 | 13 | test("should add class open to menu if clicked", function () { 14 | var dropdownHTML = '' 25 | , dropdown = $(dropdownHTML).dropdown() 26 | 27 | dropdown.find('.dropdown-toggle').click() 28 | ok(dropdown.find('.dropdown').hasClass('open'), 'open class added on click') 29 | }) 30 | 31 | test("should remove open class if body clicked", function () { 32 | var dropdownHTML = '' 43 | , dropdown = $(dropdownHTML).dropdown().appendTo('#qunit-runoff') 44 | 45 | dropdown.find('.dropdown-toggle').click() 46 | ok(dropdown.find('.dropdown').hasClass('open'), 'open class added on click') 47 | $('body').click() 48 | ok(!dropdown.find('.dropdown').hasClass('open'), 'open class removed') 49 | dropdown.remove() 50 | }) 51 | 52 | }) -------------------------------------------------------------------------------- /bootstrap/lib/variables.less: -------------------------------------------------------------------------------- 1 | /* Variables.less 2 | * Variables to customize the look and feel of Bootstrap 3 | * ----------------------------------------------------- */ 4 | 5 | 6 | // Links 7 | @linkColor: #0069d6; 8 | @linkColorHover: darken(@linkColor, 15); 9 | 10 | // Grays 11 | @black: #000; 12 | @grayDark: lighten(@black, 25%); 13 | @gray: lighten(@black, 50%); 14 | @grayLight: lighten(@black, 75%); 15 | @grayLighter: lighten(@black, 90%); 16 | @white: #fff; 17 | 18 | // Accent Colors 19 | @blue: #049CDB; 20 | @blueDark: #0064CD; 21 | @green: #46a546; 22 | @red: #9d261d; 23 | @yellow: #ffc40d; 24 | @orange: #f89406; 25 | @pink: #c3325f; 26 | @purple: #7a43b6; 27 | 28 | // Baseline grid 29 | @basefont: 13px; 30 | @baseline: 18px; 31 | 32 | // Griditude 33 | // Modify the grid styles in mixins.less 34 | @gridColumns: 16; 35 | @gridColumnWidth: 40px; 36 | @gridGutterWidth: 20px; 37 | @extraSpace: (@gridGutterWidth * 2); // For our grid calculations 38 | @siteWidth: (@gridColumns * @gridColumnWidth) + (@gridGutterWidth * (@gridColumns - 1)); 39 | 40 | // Color Scheme 41 | // Use this to roll your own color schemes if you like (unused by Bootstrap by default) 42 | @baseColor: @blue; // Set a base color 43 | @complement: spin(@baseColor, 180); // Determine a complementary color 44 | @split1: spin(@baseColor, 158); // Split complements 45 | @split2: spin(@baseColor, -158); 46 | @triad1: spin(@baseColor, 135); // Triads colors 47 | @triad2: spin(@baseColor, -135); 48 | @tetra1: spin(@baseColor, 90); // Tetra colors 49 | @tetra2: spin(@baseColor, -90); 50 | @analog1: spin(@baseColor, 22); // Analogs colors 51 | @analog2: spin(@baseColor, -22); 52 | 53 | 54 | 55 | // More variables coming soon: 56 | // - @basefont to @baseFontSize 57 | // - @baseline to @baseLineHeight 58 | // - @baseFontFamily 59 | // - @primaryButtonColor 60 | // - anything else? File an issue on GitHub -------------------------------------------------------------------------------- /bootstrap/js/bootstrap-popover.js: -------------------------------------------------------------------------------- 1 | /* =========================================================== 2 | * bootstrap-popover.js v1.3.0 3 | * http://twitter.github.com/bootstrap/javascript.html#popover 4 | * =========================================================== 5 | * Copyright 2011 Twitter, Inc. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================================================== */ 19 | 20 | 21 | (function( $ ) { 22 | 23 | var Popover = function ( element, options ) { 24 | this.$element = $(element) 25 | this.options = options 26 | this.enabled = true 27 | this.fixTitle() 28 | } 29 | 30 | /* NOTE: POPOVER EXTENDS BOOTSTRAP-TWIPSY.js 31 | ========================================= */ 32 | 33 | Popover.prototype = $.extend({}, $.fn.twipsy.Twipsy.prototype, { 34 | 35 | setContent: function () { 36 | var $tip = this.tip() 37 | $tip.find('.title')[this.options.html ? 'html' : 'text'](this.getTitle()) 38 | $tip.find('.content p')[this.options.html ? 'html' : 'text'](this.getContent()) 39 | $tip[0].className = 'popover' 40 | } 41 | 42 | , getContent: function () { 43 | var contentvar 44 | , $e = this.$element 45 | , o = this.options 46 | 47 | if (typeof this.options.content == 'string') { 48 | content = $e.attr(o.content) 49 | } else if (typeof this.options.content == 'function') { 50 | content = this.options.content.call(this.$element[0]) 51 | } 52 | return content 53 | } 54 | 55 | , tip: function() { 56 | if (!this.$tip) { 57 | this.$tip = $('
    ') 58 | .html('

    ') 59 | } 60 | return this.$tip 61 | } 62 | 63 | }) 64 | 65 | 66 | /* POPOVER PLUGIN DEFINITION 67 | * ======================= */ 68 | 69 | $.fn.popover = function (options) { 70 | if (typeof options == 'object') options = $.extend({}, $.fn.popover.defaults, options) 71 | $.fn.twipsy.initWith.call(this, options, Popover, 'popover') 72 | return this 73 | } 74 | 75 | $.fn.popover.defaults = $.extend({} , $.fn.twipsy.defaults, { content: 'data-content', placement: 'right'}) 76 | 77 | })( window.jQuery || window.ender ) -------------------------------------------------------------------------------- /bootstrap/js/tests/unit/bootstrap-popover.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | 3 | module("bootstrap-popover") 4 | 5 | test("should be defined on jquery object", function () { 6 | var div = $('
    ') 7 | ok(div.popover, 'popover method is defined') 8 | }) 9 | 10 | test("should return element", function () { 11 | var div = $('
    ') 12 | ok(div.popover() == div, 'document.body returned') 13 | }) 14 | 15 | test("should render popover element", function () { 16 | $.support.transition = false 17 | var popover = $('@mdo') 18 | .appendTo('#qunit-runoff') 19 | .popover() 20 | .popover('show') 21 | 22 | ok($('.popover').length, 'popover was inserted') 23 | popover.popover('hide') 24 | ok(!$(".popover").length, 'popover removed') 25 | $('#qunit-runoff').empty() 26 | }) 27 | 28 | test("should store popover instance in popover data object", function () { 29 | $.support.transition = false 30 | var popover = $('@mdo') 31 | .popover() 32 | 33 | ok(!!popover.data('popover'), 'popover instance exists') 34 | }) 35 | 36 | test("should get title and content from options", function () { 37 | $.support.transition = false 38 | var popover = $('@fat') 39 | .appendTo('#qunit-runoff') 40 | .popover({ 41 | title: function () { 42 | return '@fat' 43 | } 44 | , content: function () { 45 | return 'loves writing tests (╯°□°)╯︵ ┻━┻' 46 | } 47 | }) 48 | 49 | popover.popover('show') 50 | 51 | ok($('.popover').length, 'popover was inserted') 52 | equals($('.popover .title').text(), '@fat', 'title correctly inserted') 53 | equals($('.popover .content').text(), 'loves writing tests (╯°□°)╯︵ ┻━┻', 'content correctly inserted') 54 | 55 | popover.popover('hide') 56 | ok(!$('.popover').length, 'popover was removed') 57 | $('#qunit-runoff').empty() 58 | }) 59 | 60 | test("should get title and content from attributes", function () { 61 | $.support.transition = false 62 | var popover = $('@mdo') 63 | .appendTo('#qunit-runoff') 64 | .popover() 65 | .popover('show') 66 | 67 | ok($('.popover').length, 'popover was inserted') 68 | equals($('.popover .title').text(), '@mdo', 'title correctly inserted') 69 | equals($('.popover .content').text(), "loves data attributes (づ。◕‿‿◕。)づ ︵ ┻━┻", 'content correctly inserted') 70 | 71 | popover.popover('hide') 72 | ok(!$('.popover').length, 'popover was removed') 73 | $('#qunit-runoff').empty() 74 | }) 75 | 76 | }) -------------------------------------------------------------------------------- /bootstrap/js/tests/unit/bootstrap-twipsy.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | 3 | module("bootstrap-twipsy") 4 | 5 | test("should be defined on jquery object", function () { 6 | var div = $("
    ") 7 | ok(div.twipsy, 'popover method is defined') 8 | }) 9 | 10 | test("should return element", function () { 11 | var div = $("
    ") 12 | ok(div.twipsy() == div, 'document.body returned') 13 | }) 14 | 15 | test("should expose default settings", function () { 16 | ok(!!$.fn.twipsy.defaults, 'defaults is defined') 17 | }) 18 | 19 | test("should remove title attribute", function () { 20 | var twipsy = $('').twipsy() 21 | ok(!twipsy.attr('title'), 'title tag was removed') 22 | }) 23 | 24 | test("should add data attribute for referencing original title", function () { 25 | var twipsy = $('').twipsy() 26 | equals(twipsy.attr('data-original-title'), 'Another twipsy', 'original title preserved in data attribute') 27 | }) 28 | 29 | test("should place tooltips relative to placement option", function () { 30 | $.support.transition = false 31 | var twipsy = $('') 32 | .appendTo('#qunit-runoff') 33 | .twipsy({placement: 'below'}) 34 | .twipsy('show') 35 | 36 | ok($(".twipsy").hasClass('fade below in'), 'has correct classes applied') 37 | twipsy.twipsy('hide') 38 | ok(!$(".twipsy").length, 'twipsy removed') 39 | $('#qunit-runoff').empty() 40 | }) 41 | 42 | test("should add a fallback in cases where elements have no title tag", function () { 43 | $.support.transition = false 44 | var twipsy = $('') 45 | .appendTo('#qunit-runoff') 46 | .twipsy({fallback: '@fat'}) 47 | .twipsy('show') 48 | 49 | equals($(".twipsy").text(), "@fat", 'has correct default text') 50 | twipsy.twipsy('hide') 51 | ok(!$(".twipsy").length, 'twipsy removed') 52 | $('#qunit-runoff').empty() 53 | }) 54 | 55 | test("should not allow html entities", function () { 56 | $.support.transition = false 57 | var twipsy = $('') 58 | .appendTo('#qunit-runoff') 59 | .twipsy() 60 | .twipsy('show') 61 | 62 | ok(!$('.twipsy b').length, 'b tag was not inserted') 63 | twipsy.twipsy('hide') 64 | ok(!$(".twipsy").length, 'twipsy removed') 65 | $('#qunit-runoff').empty() 66 | }) 67 | 68 | test("should allow html entities if html option set to true", function () { 69 | $.support.transition = false 70 | var twipsy = $('') 71 | .appendTo('#qunit-runoff') 72 | .twipsy({html: true}) 73 | .twipsy('show') 74 | 75 | ok($('.twipsy b').length, 'b tag was inserted') 76 | twipsy.twipsy('hide') 77 | ok(!$(".twipsy").length, 'twipsy removed') 78 | $('#qunit-runoff').empty() 79 | }) 80 | 81 | }) -------------------------------------------------------------------------------- /bootstrap/examples/hero.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Bootstrap, from Twitter 6 | 7 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
    32 |
    33 |
    34 | Project name 35 | 40 |
    41 |
    42 |
    43 | 44 |
    45 | 46 | 47 |
    48 |

    Hello, world!

    49 |

    Vestibulum id ligula porta felis euismod semper. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.

    50 |

    Learn more »

    51 |
    52 | 53 | 54 |
    55 |
    56 |

    Heading

    57 |

    Etiam porta sem malesuada magna mollis euismod. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.

    58 |

    View details »

    59 |
    60 |
    61 |

    Heading

    62 |

    Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.

    63 |

    View details »

    64 |
    65 |
    66 |

    Heading

    67 |

    Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.

    68 |

    View details »

    69 |
    70 |
    71 | 72 |
    73 |

    © Company 2011

    74 |
    75 | 76 |
    77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /bootstrap/js/bootstrap-alerts.js: -------------------------------------------------------------------------------- 1 | /* ========================================================== 2 | * bootstrap-alerts.js v1.3.0 3 | * http://twitter.github.com/bootstrap/javascript.html#alerts 4 | * ========================================================== 5 | * Copyright 2011 Twitter, Inc. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * ========================================================== */ 19 | 20 | 21 | (function( $ ){ 22 | 23 | /* CSS TRANSITION SUPPORT (https://gist.github.com/373874) 24 | * ======================================================= */ 25 | 26 | var transitionEnd 27 | 28 | $(document).ready(function () { 29 | 30 | $.support.transition = (function () { 31 | var thisBody = document.body || document.documentElement 32 | , thisStyle = thisBody.style 33 | , support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined 34 | return support 35 | })() 36 | 37 | // set CSS transition event type 38 | if ( $.support.transition ) { 39 | transitionEnd = "TransitionEnd" 40 | if ( $.browser.webkit ) { 41 | transitionEnd = "webkitTransitionEnd" 42 | } else if ( $.browser.mozilla ) { 43 | transitionEnd = "transitionend" 44 | } else if ( $.browser.opera ) { 45 | transitionEnd = "oTransitionEnd" 46 | } 47 | } 48 | 49 | }) 50 | 51 | /* ALERT CLASS DEFINITION 52 | * ====================== */ 53 | 54 | var Alert = function ( content, selector ) { 55 | this.$element = $(content) 56 | .delegate(selector || '.close', 'click', this.close) 57 | } 58 | 59 | Alert.prototype = { 60 | 61 | close: function (e) { 62 | var $element = $(this).parent('.alert-message') 63 | 64 | e && e.preventDefault() 65 | $element.removeClass('in') 66 | 67 | function removeElement () { 68 | $element.remove() 69 | } 70 | 71 | $.support.transition && $element.hasClass('fade') ? 72 | $element.bind(transitionEnd, removeElement) : 73 | removeElement() 74 | } 75 | 76 | } 77 | 78 | 79 | /* ALERT PLUGIN DEFINITION 80 | * ======================= */ 81 | 82 | $.fn.alert = function ( options ) { 83 | 84 | if ( options === true ) { 85 | return this.data('alert') 86 | } 87 | 88 | return this.each(function () { 89 | var $this = $(this) 90 | 91 | if ( typeof options == 'string' ) { 92 | return $this.data('alert')[options]() 93 | } 94 | 95 | $(this).data('alert', new Alert( this )) 96 | 97 | }) 98 | } 99 | 100 | $(document).ready(function () { 101 | new Alert($('body'), '.alert-message[data-alert] .close') 102 | }) 103 | 104 | })( window.jQuery || window.ender ) -------------------------------------------------------------------------------- /bootstrap/js/bootstrap-scrollspy.js: -------------------------------------------------------------------------------- 1 | /* ============================================================= 2 | * bootstrap-scrollspy.js v1.3.0 3 | * http://twitter.github.com/bootstrap/javascript.html#scrollspy 4 | * ============================================================= 5 | * Copyright 2011 Twitter, Inc. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * ============================================================== */ 19 | 20 | 21 | !function ( $ ) { 22 | 23 | var $window = $(window) 24 | 25 | function ScrollSpy( topbar, selector ) { 26 | var processScroll = $.proxy(this.processScroll, this) 27 | this.$topbar = $(topbar) 28 | this.selector = selector || 'li > a' 29 | this.refresh() 30 | this.$topbar.delegate(this.selector, 'click', processScroll) 31 | $window.scroll(processScroll) 32 | this.processScroll() 33 | } 34 | 35 | ScrollSpy.prototype = { 36 | 37 | refresh: function () { 38 | this.targets = this.$topbar.find(this.selector).map(function () { 39 | var href = $(this).attr('href') 40 | return /^#\w/.test(href) && $(href).length ? href : null 41 | }) 42 | 43 | this.offsets = $.map(this.targets, function (id) { 44 | return $(id).offset().top 45 | }) 46 | } 47 | 48 | , processScroll: function () { 49 | var scrollTop = $window.scrollTop() + 10 50 | , offsets = this.offsets 51 | , targets = this.targets 52 | , activeTarget = this.activeTarget 53 | , i 54 | 55 | for (i = offsets.length; i--;) { 56 | activeTarget != targets[i] 57 | && scrollTop >= offsets[i] 58 | && (!offsets[i + 1] || scrollTop <= offsets[i + 1]) 59 | && this.activateButton( targets[i] ) 60 | } 61 | } 62 | 63 | , activateButton: function (target) { 64 | this.activeTarget = target 65 | 66 | this.$topbar 67 | .find(this.selector).parent('.active') 68 | .removeClass('active') 69 | 70 | this.$topbar 71 | .find(this.selector + '[href="' + target + '"]') 72 | .parent('li') 73 | .addClass('active') 74 | } 75 | 76 | } 77 | 78 | /* SCROLLSPY PLUGIN DEFINITION 79 | * =========================== */ 80 | 81 | $.fn.scrollSpy = function( options ) { 82 | var scrollspy = this.data('scrollspy') 83 | 84 | if (!scrollspy) { 85 | return this.each(function () { 86 | $(this).data('scrollspy', new ScrollSpy( this, options )) 87 | }) 88 | } 89 | 90 | if ( options === true ) { 91 | return scrollspy 92 | } 93 | 94 | if ( typeof options == 'string' ) { 95 | scrollspy[options]() 96 | } 97 | 98 | return this 99 | } 100 | 101 | $(document).ready(function () { 102 | $('body').scrollSpy('[data-scrollspy] li > a') 103 | }) 104 | 105 | }( window.jQuery || window.ender ) -------------------------------------------------------------------------------- /bootstrap/lib/scaffolding.less: -------------------------------------------------------------------------------- 1 | /* 2 | * Scaffolding 3 | * Basic and global styles for generating a grid system, structural layout, and page templates 4 | * ------------------------------------------------------------------------------------------- */ 5 | 6 | 7 | // STRUCTURAL LAYOUT 8 | // ----------------- 9 | 10 | html, body { 11 | background-color: @white; 12 | } 13 | body { 14 | margin: 0; 15 | #font > .sans-serif(normal,@basefont,@baseline); 16 | color: @grayDark; 17 | } 18 | 19 | // Container (centered, fixed-width layouts) 20 | .container { 21 | .fixed-container(); 22 | } 23 | 24 | // Fluid layouts (left aligned, with sidebar, min- & max-width content) 25 | .container-fluid { 26 | position: relative; 27 | min-width: 940px; 28 | padding-left: 20px; 29 | padding-right: 20px; 30 | .clearfix(); 31 | > .sidebar { 32 | float: left; 33 | width: 220px; 34 | } 35 | // TODO in v2: rename this and .popover .content to be more specific 36 | > .content { 37 | margin-left: 240px; 38 | } 39 | } 40 | 41 | 42 | // BASE STYLES 43 | // ----------- 44 | 45 | // Links 46 | a { 47 | color: @linkColor; 48 | text-decoration: none; 49 | line-height: inherit; 50 | font-weight: inherit; 51 | &:hover { 52 | color: @linkColorHover; 53 | text-decoration: underline; 54 | } 55 | } 56 | 57 | // Quick floats 58 | .pull-right { 59 | float: right; 60 | } 61 | .pull-left { 62 | float: left; 63 | } 64 | 65 | // Toggling content 66 | .hide { 67 | display: none; 68 | } 69 | .show { 70 | display: block; 71 | } 72 | 73 | 74 | // GRID SYSTEM 75 | // ----------- 76 | // To customize the grid system, bring up the variables.less file and change the column count, size, and gutter there 77 | 78 | .row { 79 | .clearfix(); 80 | margin-left: -1 * @gridGutterWidth; 81 | } 82 | 83 | // Find all .span# classes within .row and give them the necessary properties for grid columns (supported by all browsers back to IE7) 84 | // Credit to @dhg for the idea 85 | [class*="span"] { 86 | .gridColumn(); 87 | } 88 | 89 | // Default columns 90 | .span1 { .columns(1); } 91 | .span2 { .columns(2); } 92 | .span3 { .columns(3); } 93 | .span4 { .columns(4); } 94 | .span5 { .columns(5); } 95 | .span6 { .columns(6); } 96 | .span7 { .columns(7); } 97 | .span8 { .columns(8); } 98 | .span9 { .columns(9); } 99 | .span10 { .columns(10); } 100 | .span11 { .columns(11); } 101 | .span12 { .columns(12); } 102 | .span13 { .columns(13); } 103 | .span14 { .columns(14); } 104 | .span15 { .columns(15); } 105 | .span16 { .columns(16); } 106 | 107 | // For optional 24-column grid 108 | .span17 { .columns(17); } 109 | .span18 { .columns(18); } 110 | .span19 { .columns(19); } 111 | .span20 { .columns(20); } 112 | .span21 { .columns(21); } 113 | .span22 { .columns(22); } 114 | .span23 { .columns(23); } 115 | .span24 { .columns(24); } 116 | 117 | // Offset column options 118 | .offset1 { .offset(1); } 119 | .offset2 { .offset(2); } 120 | .offset3 { .offset(3); } 121 | .offset4 { .offset(4); } 122 | .offset5 { .offset(5); } 123 | .offset6 { .offset(6); } 124 | .offset7 { .offset(7); } 125 | .offset8 { .offset(8); } 126 | .offset9 { .offset(9); } 127 | .offset10 { .offset(10); } 128 | .offset11 { .offset(11); } 129 | .offset12 { .offset(12); } 130 | 131 | // Unique column sizes for 16-column grid 132 | .span-one-third { width: 300px; } 133 | .span-two-thirds { width: 620px; } 134 | .offset-one-third { margin-left: 340px; } 135 | .offset-two-thirds { margin-left: 660px; } 136 | -------------------------------------------------------------------------------- /bootstrap/README.md: -------------------------------------------------------------------------------- 1 | TWITTER BOOTSTRAP 2 | ================= 3 | 4 | Bootstrap is Twitter's toolkit for kickstarting CSS for websites, apps, and more. It includes base CSS styles for typography, forms, buttons, tables, grids, navigation, alerts, and more. 5 | 6 | To get started -- checkout http://twitter.github.com/bootstrap! 7 | 8 | 9 | Usage 10 | ----- 11 | 12 | You can use Twitter Bootstrap in one of two ways: just drop the compiled CSS into any new project and start cranking, or run LESS on your site and compile on the fly like a boss. 13 | 14 | Here's what the LESS version looks like: 15 | 16 | ``` html 17 | 18 | 19 | ``` 20 | 21 | Or if you prefer, the standard css way: 22 | 23 | ``` html 24 | 25 | ``` 26 | 27 | For more info, refer to the docs! 28 | 29 | 30 | Versioning 31 | ---------- 32 | 33 | For transparency and insight into our release cycle, and for striving to maintain backwards compatibility, Bootstrap will be maintained under the Semantic Versioning guidelines as much as possible. 34 | 35 | Releases will be numbered with the follow format: 36 | 37 | `..` 38 | 39 | And constructed with the following guidelines: 40 | 41 | * Breaking backwards compatibility bumps the major 42 | * New additions without breaking backwards compatibility bumps the minor 43 | * Bug fixes and misc changes bump the patch 44 | 45 | For more information on SemVer, please visit http://semver.org/. 46 | 47 | 48 | Bug tracker 49 | ----------- 50 | 51 | Have a bug? Please create an issue here on GitHub! 52 | 53 | https://github.com/twitter/bootstrap/issues 54 | 55 | 56 | Twitter account 57 | --------------- 58 | 59 | Keep up to date on announcements and more by following Bootstrap on Twitter, @TwBootstrap. 60 | 61 | 62 | Mailing list 63 | ------------ 64 | 65 | Have a question? Ask on our mailing list! 66 | 67 | twitter-bootstrap@googlegroups.com 68 | 69 | http://groups.google.com/group/twitter-bootstrap 70 | 71 | 72 | Developers 73 | ---------- 74 | 75 | We have included a makefile with convenience methods for working with the bootstrap library. 76 | 77 | + **build** - `make build` 78 | This will run the less compiler on the bootstrap lib and generate a bootstrap.css and bootstrap.min.css file. 79 | The lessc compiler is required for this command to run. 80 | 81 | + **watch** - `make watch` 82 | This is a convenience method for watching your less files and automatically building them whenever you save. 83 | Watchr is required for this command to run. 84 | 85 | 86 | Authors 87 | ------- 88 | 89 | **Mark Otto** 90 | 91 | + http://twitter.com/mdo 92 | + http://github.com/markdotto 93 | 94 | **Jacob Thornton** 95 | 96 | + http://twitter.com/fat 97 | + http://github.com/fat 98 | 99 | 100 | Copyright and license 101 | --------------------- 102 | 103 | Copyright 2011 Twitter, Inc. 104 | 105 | Licensed under the Apache License, Version 2.0 (the "License"); 106 | you may not use this work except in compliance with the License. 107 | You may obtain a copy of the License in the LICENSE file, or at: 108 | 109 | http://www.apache.org/licenses/LICENSE-2.0 110 | 111 | Unless required by applicable law or agreed to in writing, software 112 | distributed under the License is distributed on an "AS IS" BASIS, 113 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 114 | See the License for the specific language governing permissions and 115 | limitations under the License. 116 | -------------------------------------------------------------------------------- /bootstrap/lib/type.less: -------------------------------------------------------------------------------- 1 | /* Typography.less 2 | * Headings, body text, lists, code, and more for a versatile and durable typography system 3 | * ---------------------------------------------------------------------------------------- */ 4 | 5 | 6 | // BODY TEXT 7 | // --------- 8 | 9 | p { 10 | #font > .shorthand(normal,@basefont,@baseline); 11 | margin-bottom: @baseline / 2; 12 | small { 13 | font-size: @basefont - 2; 14 | color: @grayLight; 15 | } 16 | } 17 | 18 | 19 | // HEADINGS 20 | // -------- 21 | 22 | h1, h2, h3, h4, h5, h6 { 23 | font-weight: bold; 24 | color: @grayDark; 25 | small { 26 | color: @grayLight; 27 | } 28 | } 29 | h1 { 30 | margin-bottom: @baseline; 31 | font-size: 30px; 32 | line-height: @baseline * 2; 33 | small { 34 | font-size: 18px; 35 | } 36 | } 37 | h2 { 38 | font-size: 24px; 39 | line-height: @baseline * 2; 40 | small { 41 | font-size: 14px; 42 | } 43 | } 44 | h3, h4, h5, h6 { 45 | line-height: @baseline * 2; 46 | } 47 | h3 { 48 | font-size: 18px; 49 | small { 50 | font-size: 14px; 51 | } 52 | } 53 | h4 { 54 | font-size: 16px; 55 | small { 56 | font-size: 12px; 57 | } 58 | } 59 | h5 { 60 | font-size: 14px; 61 | } 62 | h6 { 63 | font-size: 13px; 64 | color: @grayLight; 65 | text-transform: uppercase; 66 | } 67 | 68 | 69 | // COLORS 70 | // ------ 71 | 72 | // Unordered and Ordered lists 73 | ul, ol { 74 | margin: 0 0 @baseline 25px; 75 | } 76 | ul ul, 77 | ul ol, 78 | ol ol, 79 | ol ul { 80 | margin-bottom: 0; 81 | } 82 | ul { 83 | list-style: disc; 84 | } 85 | ol { 86 | list-style: decimal; 87 | } 88 | li { 89 | line-height: @baseline; 90 | color: @gray; 91 | } 92 | ul.unstyled { 93 | list-style: none; 94 | margin-left: 0; 95 | } 96 | 97 | // Description Lists 98 | dl { 99 | margin-bottom: @baseline; 100 | dt, dd { 101 | line-height: @baseline; 102 | } 103 | dt { 104 | font-weight: bold; 105 | } 106 | dd { 107 | margin-left: @baseline / 2; 108 | } 109 | } 110 | 111 | // MISC 112 | // ---- 113 | 114 | // Horizontal rules 115 | hr { 116 | margin: 20px 0 19px; 117 | border: 0; 118 | border-bottom: 1px solid #eee; 119 | } 120 | 121 | // Emphasis 122 | strong { 123 | font-style: inherit; 124 | font-weight: bold; 125 | } 126 | em { 127 | font-style: italic; 128 | font-weight: inherit; 129 | line-height: inherit; 130 | } 131 | .muted { 132 | color: @grayLight; 133 | } 134 | 135 | // Blockquotes 136 | blockquote { 137 | margin-bottom: @baseline; 138 | border-left: 5px solid #eee; 139 | padding-left: 15px; 140 | p { 141 | #font > .shorthand(300,14px,@baseline); 142 | margin-bottom: 0; 143 | } 144 | small { 145 | display: block; 146 | #font > .shorthand(300,12px,@baseline); 147 | color: @grayLight; 148 | &:before { 149 | content: '\2014 \00A0'; 150 | } 151 | } 152 | } 153 | 154 | // Addresses 155 | address { 156 | display: block; 157 | line-height: @baseline; 158 | margin-bottom: @baseline; 159 | } 160 | 161 | // Inline and block code styles 162 | code, pre { 163 | padding: 0 3px 2px; 164 | font-family: Monaco, Andale Mono, Courier New, monospace; 165 | font-size: 12px; 166 | .border-radius(3px); 167 | } 168 | code { 169 | background-color: lighten(@orange, 40%); 170 | color: rgba(0,0,0,.75); 171 | padding: 1px 3px; 172 | } 173 | pre { 174 | background-color: #f5f5f5; 175 | display: block; 176 | padding: (@baseline - 1) / 2; 177 | margin: 0 0 @baseline; 178 | line-height: @baseline; 179 | font-size: 12px; 180 | border: 1px solid #ccc; 181 | border: 1px solid rgba(0,0,0,.15); 182 | .border-radius(3px); 183 | white-space: pre; 184 | white-space: pre-wrap; 185 | word-wrap: break-word; 186 | 187 | } -------------------------------------------------------------------------------- /bootstrap/examples/container-app.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Bootstrap, from Twitter 6 | 7 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 |
    79 |
    80 |
    81 | Project name 82 | 87 |
    88 | 89 | 90 | 91 |
    92 |
    93 |
    94 |
    95 | 96 |
    97 | 98 |
    99 | 102 |
    103 |
    104 |

    Main content

    105 |
    106 |
    107 |

    Secondary content

    108 |
    109 |
    110 |
    111 | 112 |
    113 |

    © Company 2011

    114 |
    115 | 116 |
    117 | 118 | 119 | 120 | -------------------------------------------------------------------------------- /bootstrap/lib/reset.less: -------------------------------------------------------------------------------- 1 | /* Reset.less 2 | * Props to Eric Meyer (meyerweb.com) for his CSS reset file. We're using an adapted version here that cuts out some of the reset HTML elements we will never need here (i.e., dfn, samp, etc). 3 | * ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- */ 4 | 5 | 6 | // ERIC MEYER RESET 7 | // -------------------------------------------------- 8 | 9 | html, body { margin: 0; padding: 0; } 10 | h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, cite, code, del, dfn, em, img, q, s, samp, small, strike, strong, sub, sup, tt, var, dd, dl, dt, li, ol, ul, fieldset, form, label, legend, button, table, caption, tbody, tfoot, thead, tr, th, td { margin: 0; padding: 0; border: 0; font-weight: normal; font-style: normal; font-size: 100%; line-height: 1; font-family: inherit; } 11 | table { border-collapse: collapse; border-spacing: 0; } 12 | ol, ul { list-style: none; } 13 | q:before, q:after, blockquote:before, blockquote:after { content: ""; } 14 | 15 | 16 | // Normalize.css 17 | // Pulling in select resets form the normalize.css project 18 | // -------------------------------------------------- 19 | 20 | // Display in IE6-9 and FF3 21 | // ------------------------- 22 | // Source: http://github.com/necolas/normalize.css 23 | html { 24 | overflow-y: scroll; 25 | font-size: 100%; 26 | -webkit-text-size-adjust: 100%; 27 | -ms-text-size-adjust: 100%; 28 | } 29 | // Focus states 30 | a:focus { 31 | outline: thin dotted; 32 | } 33 | // Hover & Active 34 | a:hover, 35 | a:active { 36 | outline: 0; 37 | } 38 | 39 | // Display in IE6-9 and FF3 40 | // ------------------------- 41 | // Source: http://github.com/necolas/normalize.css 42 | article, 43 | aside, 44 | details, 45 | figcaption, 46 | figure, 47 | footer, 48 | header, 49 | hgroup, 50 | nav, 51 | section { 52 | display: block; 53 | } 54 | 55 | // Display block in IE6-9 and FF3 56 | // ------------------------- 57 | // Source: http://github.com/necolas/normalize.css 58 | audio, 59 | canvas, 60 | video { 61 | display: inline-block; 62 | *display: inline; 63 | *zoom: 1; 64 | } 65 | 66 | // Prevents modern browsers from displaying 'audio' without controls 67 | // ------------------------- 68 | // Source: http://github.com/necolas/normalize.css 69 | audio:not([controls]) { 70 | display: none; 71 | } 72 | 73 | // Prevents sub and sup affecting line-height in all browsers 74 | // ------------------------- 75 | // Source: http://github.com/necolas/normalize.css 76 | sub, 77 | sup { 78 | font-size: 75%; 79 | line-height: 0; 80 | position: relative; 81 | vertical-align: baseline; 82 | } 83 | sup { 84 | top: -0.5em; 85 | } 86 | sub { 87 | bottom: -0.25em; 88 | } 89 | 90 | // Img border in a's and image quality 91 | // ------------------------- 92 | // Source: http://github.com/necolas/normalize.css 93 | img { 94 | border: 0; 95 | -ms-interpolation-mode: bicubic; 96 | } 97 | 98 | // Forms 99 | // ------------------------- 100 | // Source: http://github.com/necolas/normalize.css 101 | 102 | // Font size in all browsers, margin changes, misc consistency 103 | button, 104 | input, 105 | select, 106 | textarea { 107 | font-size: 100%; 108 | margin: 0; 109 | vertical-align: baseline; 110 | *vertical-align: middle; 111 | } 112 | button, 113 | input { 114 | line-height: normal; // FF3/4 have !important on line-height in UA stylesheet 115 | *overflow: visible; // Inner spacing ie IE6/7 116 | } 117 | button::-moz-focus-inner, 118 | input::-moz-focus-inner { // Inner padding and border oddities in FF3/4 119 | border: 0; 120 | padding: 0; 121 | } 122 | button, 123 | input[type="button"], 124 | input[type="reset"], 125 | input[type="submit"] { 126 | cursor: pointer; // Cursors on all buttons applied consistently 127 | -webkit-appearance: button; // Style clicable inputs in iOS 128 | } 129 | input[type="search"] { // Appearance in Safari/Chrome 130 | -webkit-appearance: textfield; 131 | -webkit-box-sizing: content-box; 132 | -moz-box-sizing: content-box; 133 | box-sizing: content-box; 134 | } 135 | input[type="search"]::-webkit-search-decoration { 136 | -webkit-appearance: none; // Inner-padding issues in Chrome OSX, Safari 5 137 | } 138 | textarea { 139 | overflow: auto; // Remove vertical scrollbar in IE6-9 140 | vertical-align: top; // Readability and alignment cross-browser 141 | } -------------------------------------------------------------------------------- /bootstrap/lib/tables.less: -------------------------------------------------------------------------------- 1 | /* 2 | * Tables.less 3 | * Tables for, you guessed it, tabular data 4 | * ---------------------------------------- */ 5 | 6 | 7 | // BASELINE STYLES 8 | // --------------- 9 | 10 | table { 11 | width: 100%; 12 | margin-bottom: @baseline; 13 | padding: 0; 14 | border-collapse: separate; // Done so we can round those corners! 15 | *border-collapse: collapse; /* IE7, collapse table to remove spacing */ 16 | font-size: @basefont; 17 | border: 1px solid #ddd; 18 | .border-radius(4px); 19 | th, td { 20 | padding: 10px 10px 9px; 21 | line-height: @baseline; 22 | text-align: left; 23 | } 24 | th { 25 | padding-top: 9px; 26 | font-weight: bold; 27 | vertical-align: middle; 28 | border-bottom: 1px solid #ddd; 29 | } 30 | td { 31 | vertical-align: top; 32 | } 33 | th + th, 34 | td + td { 35 | border-left: 1px solid #ddd; 36 | } 37 | tr + tr td { 38 | border-top: 1px solid #ddd; 39 | } 40 | tbody tr:first-child td:first-child { 41 | .border-radius(4px 0 0 0); 42 | } 43 | tbody tr:first-child td:last-child { 44 | .border-radius(0 4px 0 0); 45 | } 46 | tbody tr:last-child td:first-child { 47 | .border-radius(0 0 0 4px); 48 | } 49 | tbody tr:last-child td:last-child { 50 | .border-radius(0 0 4px 0); 51 | } 52 | } 53 | 54 | 55 | // ZEBRA-STRIPING 56 | // -------------- 57 | 58 | // Default zebra-stripe styles (alternating gray and transparent backgrounds) 59 | .zebra-striped { 60 | tbody { 61 | tr:nth-child(odd) td { 62 | background-color: #f9f9f9; 63 | } 64 | tr:hover td { 65 | background-color: #f5f5f5; 66 | } 67 | } 68 | 69 | // Tablesorting styles w/ jQuery plugin 70 | .header { 71 | cursor: pointer; 72 | &:after { 73 | content: ""; 74 | float: right; 75 | margin-top: 7px; 76 | border-width: 0 4px 4px; 77 | border-style: solid; 78 | border-color: #000 transparent; 79 | visibility: hidden; 80 | } 81 | } 82 | // Style the sorted column headers (THs) 83 | .headerSortUp, 84 | .headerSortDown { 85 | background-color: rgba(141,192,219,.25); 86 | text-shadow: 0 1px 1px rgba(255,255,255,.75); 87 | } 88 | // Style the ascending (reverse alphabetical) column header 89 | .header:hover { 90 | &:after { 91 | visibility:visible; 92 | } 93 | } 94 | // Style the descending (alphabetical) column header 95 | .headerSortDown, 96 | .headerSortDown:hover { 97 | &:after { 98 | visibility:visible; 99 | .opacity(60); 100 | } 101 | } 102 | // Style the ascending (reverse alphabetical) column header 103 | .headerSortUp { 104 | &:after { 105 | border-bottom: none; 106 | border-left: 4px solid transparent; 107 | border-right: 4px solid transparent; 108 | border-top: 4px solid #000; 109 | visibility:visible; 110 | .box-shadow(none); //can't add boxshadow to downward facing arrow :( 111 | .opacity(60); 112 | } 113 | } 114 | } 115 | 116 | table { 117 | // Blue Table Headings 118 | .blue { 119 | color: @blue; 120 | border-bottom-color: @blue; 121 | } 122 | .headerSortUp.blue, 123 | .headerSortDown.blue { 124 | background-color: lighten(@blue, 40%); 125 | } 126 | // Green Table Headings 127 | .green { 128 | color: @green; 129 | border-bottom-color: @green; 130 | } 131 | .headerSortUp.green, 132 | .headerSortDown.green { 133 | background-color: lighten(@green, 40%); 134 | } 135 | // Red Table Headings 136 | .red { 137 | color: @red; 138 | border-bottom-color: @red; 139 | } 140 | .headerSortUp.red, 141 | .headerSortDown.red { 142 | background-color: lighten(@red, 50%); 143 | } 144 | // Yellow Table Headings 145 | .yellow { 146 | color: @yellow; 147 | border-bottom-color: @yellow; 148 | } 149 | .headerSortUp.yellow, 150 | .headerSortDown.yellow { 151 | background-color: lighten(@yellow, 40%); 152 | } 153 | // Orange Table Headings 154 | .orange { 155 | color: @orange; 156 | border-bottom-color: @orange; 157 | } 158 | .headerSortUp.orange, 159 | .headerSortDown.orange { 160 | background-color: lighten(@orange, 40%); 161 | } 162 | // Purple Table Headings 163 | .purple { 164 | color: @purple; 165 | border-bottom-color: @purple; 166 | } 167 | .headerSortUp.purple, 168 | .headerSortDown.purple { 169 | background-color: lighten(@purple, 40%); 170 | } 171 | } -------------------------------------------------------------------------------- /bootstrap/site.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 40px; 3 | } 4 | 5 | body.page-Home .page-header { 6 | display: none; 7 | } 8 | 9 | .printfooter { 10 | display: none; 11 | } 12 | 13 | #wpTextbox1 { 14 | width: 90%; 15 | } 16 | 17 | .editsection { 18 | font-size: 60%; 19 | } 20 | 21 | .fill { 22 | border-radius: 3px 3px 3px 3px; 23 | background-color: #eee; 24 | } 25 | .fill p { 26 | margin: 3px; 27 | text-align: center; 28 | } 29 | .row.demo { 30 | margin-bottom: 10px; 31 | } 32 | 33 | b { 34 | font-weight: bold; 35 | } 36 | 37 | .topbar { 38 | font-size: 13px; 39 | } 40 | 41 | .home h2 { 42 | border-bottom: 3px #bbb solid; 43 | margin-bottom: 6px; 44 | } 45 | 46 | 47 | .bottom { 48 | padding-top: 30px; 49 | background-color: #202020; 50 | } 51 | .bottom, .bottom h1, .bottom h2, .bottom h3, .bottom h4, .bottom h5, .bottom h6, .bottom a { 52 | color: #f6ebeb; 53 | } 54 | 55 | h1 { 56 | font-size: 42px; 57 | } 58 | h2 { 59 | margin-top: 12px; 60 | line-height: 1.3em; 61 | } 62 | h3 { 63 | margin-bottom: 6px; 64 | } 65 | h3, h4, h5, h6 { 66 | margin-top: 18px; 67 | line-height: 1.3em; 68 | } 69 | 70 | 71 | body, p { 72 | font-size: 16px; 73 | } 74 | 75 | body, p, li { 76 | line-height: 24px; 77 | } 78 | 79 | #search .mw-search-formheader, .searchresults .mw-search-createlink { 80 | display: none; 81 | } 82 | 83 | 84 | 85 | footer { 86 | border-top: 1px solid #aaa; 87 | } 88 | footer p { 89 | font-size: 12px; 90 | } 91 | 92 | .tocnumber { 93 | display: none; 94 | } 95 | 96 | @media print { 97 | .sidebar, footer, .topbar { 98 | display: none; 99 | } 100 | .container-fluid > .content { 101 | margin-left: 0; 102 | } 103 | } 104 | 105 | 106 | /** 107 | Styles for image alignment 108 | **/ 109 | .center { 110 | text-align: center; 111 | } 112 | .floatright { 113 | float: right; 114 | margin: 0 .5em .5em 0; 115 | } 116 | .floatleft { 117 | float: left; 118 | margin: 0 .5em .5em 0; 119 | } 120 | .thumbcaption { 121 | font-size: 0.9em; 122 | } 123 | 124 | 125 | 126 | /** 127 | Styles for editing page form 128 | **/ 129 | .editOptions label { 130 | float: none; 131 | } 132 | 133 | 134 | /** 135 | Hide discussion page link 136 | **/ 137 | #ca-talk { 138 | display: none; 139 | } 140 | 141 | 142 | /** 143 | Custom top bar color 144 | **/ 145 | 146 | .topbar div > ul .menu-dropdown, .nav .menu-dropdown, .topbar div > ul .dropdown-menu, .nav .dropdown-menu { 147 | background-color: #720707; 148 | } 149 | .topbar div > ul .menu-dropdown li a, .nav .menu-dropdown li a, .topbar div > ul .dropdown-menu li a, .nav .dropdown-menu li a { 150 | color: #feeded; 151 | } 152 | .topbar div > ul .menu-dropdown li a:hover, .nav .menu-dropdown li a:hover, .topbar div > ul .dropdown-menu li a:hover, .nav .dropdown-menu li a:hover { 153 | background-color: #520707; 154 | } 155 | .topbar a, .topbar input:-moz-placeholder { 156 | color: #feeded; 157 | } 158 | .topbar-inner, .topbar .fill { 159 | background-image: -khtml-gradient(linear, left top, left bottom, from(#610707), to(#4b0606)); 160 | background-image: -moz-linear-gradient(top, #610707, #4b0606); 161 | background-image: -ms-linear-gradient(top, #610707, #4b0606); 162 | background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #610707), color-stop(100%, #4b0606)); 163 | background-image: -webkit-linear-gradient(top, #610707, #4b0606); 164 | background-image: -o-linear-gradient(top, #610707, #4b0606); 165 | background-image: linear-gradient(top, #610707, #4b0606); 166 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#610707', endColorstr='#4b0606', GradientType=0); 167 | } 168 | 169 | 170 | /** 171 | MediaWiki table of contents 172 | **/ 173 | table#toc { 174 | width: auto; 175 | } 176 | 177 | #toc, .toc, .mw-warning { 178 | font-size: 100%; 179 | border: 1px solid #AAAAAA; 180 | background-color: #F5F5F5; 181 | padding: .5em; 182 | margin-bottom: 1.2em; 183 | } 184 | 185 | .toc { 186 | float: right; 187 | margin-left: 20px; 188 | } 189 | 190 | #toc h2, .toc h2 { 191 | font-size: 110%; 192 | border: none; 193 | margin: 0; /* fix toc top margin */ 194 | padding-right: .2em; /* margin between title and hide/show link */ 195 | display: inline; /* display the hide/show link after Contents */ 196 | } 197 | 198 | #toc #toctitle, 199 | .toc #toctitle, 200 | #toc .toctitle, 201 | .toc .toctitle { 202 | text-align: left; /* left adjust of title */ 203 | } 204 | 205 | #toc ul, .toc ul { 206 | list-style-type: none; 207 | list-style-image: none; 208 | margin: 0; 209 | padding: .3em 0 0 .7em; /* margin of the item list */ 210 | text-align: left; 211 | } 212 | #toc ul ul, .toc ul ul, 213 | #toc ul ul ul, .toc ul ul ul { 214 | margin: 0 0 0 .7em; /* toclevel-2 margin */ 215 | } 216 | 217 | #toc .tocindent { margin-left: 1em; } 218 | #toc .tocline { margin-bottom: 0; } 219 | #toc p { margin: 0 } 220 | #toc .toctoggle { font-size: 90%; } 221 | 222 | #toc .editsection { 223 | margin-top: .3em; 224 | font-size: 90%; 225 | } 226 | 227 | 228 | 229 | 230 | -------------------------------------------------------------------------------- /bootstrap/js/tests/unit/bootstrap-modal.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | 3 | module("bootstrap-modal") 4 | 5 | test("should be defined on jquery object", function () { 6 | var div = $("") 7 | ok(div.modal, 'modal method is defined') 8 | }) 9 | 10 | test("should return element", function () { 11 | var div = $("") 12 | ok(div.modal() == div, 'document.body returned') 13 | }) 14 | 15 | test("should expose defaults var for settings", function () { 16 | ok($.fn.modal.defaults, 'default object exposed') 17 | }) 18 | 19 | test("should insert into dom when show method is called", function () { 20 | stop() 21 | $.support.transition = false 22 | var div = $("") 23 | div 24 | .modal() 25 | .modal("show") 26 | .bind("shown", function () { 27 | ok($('#modal-test').length, 'modal insterted into dom') 28 | start() 29 | div.remove() 30 | }) 31 | }) 32 | 33 | test("should hide modal when hide is called", function () { 34 | stop() 35 | $.support.transition = false 36 | var div = $("") 37 | div 38 | .modal() 39 | .bind("shown", function () { 40 | ok($('#modal-test').is(":visible"), 'modal visible') 41 | ok($('#modal-test').length, 'modal insterted into dom') 42 | div.modal("hide") 43 | }) 44 | .bind("hidden", function() { 45 | ok(!$('#modal-test').is(":visible"), 'modal hidden') 46 | start() 47 | div.remove() 48 | }) 49 | .modal("show") 50 | }) 51 | 52 | test("should toggle when toggle is called", function () { 53 | stop() 54 | $.support.transition = false 55 | var div = $("") 56 | div 57 | .modal() 58 | .bind("shown", function () { 59 | ok($('#modal-test').is(":visible"), 'modal visible') 60 | ok($('#modal-test').length, 'modal insterted into dom') 61 | div.modal("toggle") 62 | }) 63 | .bind("hidden", function() { 64 | ok(!$('#modal-test').is(":visible"), 'modal hidden') 65 | start() 66 | div.remove() 67 | }) 68 | .modal("toggle") 69 | }) 70 | 71 | test("should remove from dom when click .close", function () { 72 | stop() 73 | $.support.transition = false 74 | var div = $("") 75 | div 76 | .modal() 77 | .bind("shown", function () { 78 | ok($('#modal-test').is(":visible"), 'modal visible') 79 | ok($('#modal-test').length, 'modal insterted into dom') 80 | div.find('.close').click() 81 | }) 82 | .bind("hidden", function() { 83 | ok(!$('#modal-test').is(":visible"), 'modal hidden') 84 | start() 85 | div.remove() 86 | }) 87 | .modal("toggle") 88 | }) 89 | 90 | test("should add backdrop when desired", function () { 91 | stop() 92 | $.support.transition = false 93 | var div = $("") 94 | div 95 | .modal({backdrop:true}) 96 | .modal("show") 97 | .bind("shown", function () { 98 | equal($('.modal-backdrop').length, 1, 'modal backdrop inserted into dom') 99 | start() 100 | div.remove() 101 | $('.modal-backdrop').remove() 102 | }) 103 | }) 104 | 105 | test("should not add backdrop when not desired", function () { 106 | stop() 107 | $.support.transition = false 108 | var div = $("") 109 | div 110 | .modal({backdrop:false}) 111 | .modal("show") 112 | .bind("shown", function () { 113 | equal($('.modal-backdrop').length, 0, 'modal backdrop not inserted into dom') 114 | start() 115 | div.remove() 116 | }) 117 | }) 118 | 119 | test("should close backdrop when clicked", function () { 120 | stop() 121 | $.support.transition = false 122 | var div = $("") 123 | div 124 | .modal({backdrop:true}) 125 | .modal("show") 126 | .bind("shown", function () { 127 | equal($('.modal-backdrop').length, 1, 'modal backdrop inserted into dom') 128 | $('.modal-backdrop').click() 129 | equal($('.modal-backdrop').length, 0, 'modal backdrop removed from dom') 130 | start() 131 | div.remove() 132 | }) 133 | }) 134 | 135 | test("should not close backdrop when click disabled", function () { 136 | stop() 137 | $.support.transition = false 138 | var div = $("") 139 | div 140 | .modal({backdrop: 'static'}) 141 | .modal("show") 142 | .bind("shown", function () { 143 | equal($('.modal-backdrop').length, 1, 'modal backdrop inserted into dom') 144 | $('.modal-backdrop').click() 145 | equal($('.modal-backdrop').length, 1, 'modal backdrop still in dom') 146 | start() 147 | div.remove() 148 | $('.modal-backdrop').remove() 149 | }) 150 | }) 151 | }) 152 | -------------------------------------------------------------------------------- /bootstrap/js/tests/vendor/qunit.css: -------------------------------------------------------------------------------- 1 | /** 2 | * QUnit - A JavaScript Unit Testing Framework 3 | * 4 | * http://docs.jquery.com/QUnit 5 | * 6 | * Copyright (c) 2011 John Resig, Jörn Zaefferer 7 | * Dual licensed under the MIT (MIT-LICENSE.txt) 8 | * or GPL (GPL-LICENSE.txt) licenses. 9 | */ 10 | 11 | /** Font Family and Sizes */ 12 | 13 | #qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult { 14 | font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif; 15 | } 16 | 17 | #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; } 18 | #qunit-tests { font-size: smaller; } 19 | 20 | 21 | /** Resets */ 22 | 23 | #qunit-tests, #qunit-tests ol, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult { 24 | margin: 0; 25 | padding: 0; 26 | } 27 | 28 | 29 | /** Header */ 30 | 31 | #qunit-header { 32 | padding: 0.5em 0 0.5em 1em; 33 | 34 | color: #8699a4; 35 | background-color: #0d3349; 36 | 37 | font-size: 1.5em; 38 | line-height: 1em; 39 | font-weight: normal; 40 | 41 | border-radius: 15px 15px 0 0; 42 | -moz-border-radius: 15px 15px 0 0; 43 | -webkit-border-top-right-radius: 15px; 44 | -webkit-border-top-left-radius: 15px; 45 | } 46 | 47 | #qunit-header a { 48 | text-decoration: none; 49 | color: #c2ccd1; 50 | } 51 | 52 | #qunit-header a:hover, 53 | #qunit-header a:focus { 54 | color: #fff; 55 | } 56 | 57 | #qunit-banner { 58 | height: 5px; 59 | } 60 | 61 | #qunit-testrunner-toolbar { 62 | padding: 0.5em 0 0.5em 2em; 63 | color: #5E740B; 64 | background-color: #eee; 65 | } 66 | 67 | #qunit-userAgent { 68 | padding: 0.5em 0 0.5em 2.5em; 69 | background-color: #2b81af; 70 | color: #fff; 71 | text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px; 72 | } 73 | 74 | 75 | /** Tests: Pass/Fail */ 76 | 77 | #qunit-tests { 78 | list-style-position: inside; 79 | } 80 | 81 | #qunit-tests li { 82 | padding: 0.4em 0.5em 0.4em 2.5em; 83 | border-bottom: 1px solid #fff; 84 | list-style-position: inside; 85 | } 86 | 87 | #qunit-tests.hidepass li.pass, #qunit-tests.hidepass li.running { 88 | display: none; 89 | } 90 | 91 | #qunit-tests li strong { 92 | cursor: pointer; 93 | } 94 | 95 | #qunit-tests li a { 96 | padding: 0.5em; 97 | color: #c2ccd1; 98 | text-decoration: none; 99 | } 100 | #qunit-tests li a:hover, 101 | #qunit-tests li a:focus { 102 | color: #000; 103 | } 104 | 105 | #qunit-tests ol { 106 | margin-top: 0.5em; 107 | padding: 0.5em; 108 | 109 | background-color: #fff; 110 | 111 | border-radius: 15px; 112 | -moz-border-radius: 15px; 113 | -webkit-border-radius: 15px; 114 | 115 | box-shadow: inset 0px 2px 13px #999; 116 | -moz-box-shadow: inset 0px 2px 13px #999; 117 | -webkit-box-shadow: inset 0px 2px 13px #999; 118 | } 119 | 120 | #qunit-tests table { 121 | border-collapse: collapse; 122 | margin-top: .2em; 123 | } 124 | 125 | #qunit-tests th { 126 | text-align: right; 127 | vertical-align: top; 128 | padding: 0 .5em 0 0; 129 | } 130 | 131 | #qunit-tests td { 132 | vertical-align: top; 133 | } 134 | 135 | #qunit-tests pre { 136 | margin: 0; 137 | white-space: pre-wrap; 138 | word-wrap: break-word; 139 | } 140 | 141 | #qunit-tests del { 142 | background-color: #e0f2be; 143 | color: #374e0c; 144 | text-decoration: none; 145 | } 146 | 147 | #qunit-tests ins { 148 | background-color: #ffcaca; 149 | color: #500; 150 | text-decoration: none; 151 | } 152 | 153 | /*** Test Counts */ 154 | 155 | #qunit-tests b.counts { color: black; } 156 | #qunit-tests b.passed { color: #5E740B; } 157 | #qunit-tests b.failed { color: #710909; } 158 | 159 | #qunit-tests li li { 160 | margin: 0.5em; 161 | padding: 0.4em 0.5em 0.4em 0.5em; 162 | background-color: #fff; 163 | border-bottom: none; 164 | list-style-position: inside; 165 | } 166 | 167 | /*** Passing Styles */ 168 | 169 | #qunit-tests li li.pass { 170 | color: #5E740B; 171 | background-color: #fff; 172 | border-left: 26px solid #C6E746; 173 | } 174 | 175 | #qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; } 176 | #qunit-tests .pass .test-name { color: #366097; } 177 | 178 | #qunit-tests .pass .test-actual, 179 | #qunit-tests .pass .test-expected { color: #999999; } 180 | 181 | #qunit-banner.qunit-pass { background-color: #C6E746; } 182 | 183 | /*** Failing Styles */ 184 | 185 | #qunit-tests li li.fail { 186 | color: #710909; 187 | background-color: #fff; 188 | border-left: 26px solid #EE5757; 189 | white-space: pre; 190 | } 191 | 192 | #qunit-tests > li:last-child { 193 | border-radius: 0 0 15px 15px; 194 | -moz-border-radius: 0 0 15px 15px; 195 | -webkit-border-bottom-right-radius: 15px; 196 | -webkit-border-bottom-left-radius: 15px; 197 | } 198 | 199 | #qunit-tests .fail { color: #000000; background-color: #EE5757; } 200 | #qunit-tests .fail .test-name, 201 | #qunit-tests .fail .module-name { color: #000000; } 202 | 203 | #qunit-tests .fail .test-actual { color: #EE5757; } 204 | #qunit-tests .fail .test-expected { color: green; } 205 | 206 | #qunit-banner.qunit-fail { background-color: #EE5757; } 207 | 208 | 209 | /** Result */ 210 | 211 | #qunit-testresult { 212 | padding: 0.5em 0.5em 0.5em 2.5em; 213 | 214 | color: #2b81af; 215 | background-color: #D2E0E6; 216 | 217 | border-bottom: 1px solid white; 218 | } 219 | 220 | /** Fixture */ 221 | 222 | #qunit-fixture { 223 | position: absolute; 224 | top: -10000px; 225 | left: -10000px; 226 | } 227 | 228 | /** Runoff */ 229 | 230 | #qunit-runoff { 231 | display:none; 232 | } -------------------------------------------------------------------------------- /bootstrap/examples/fluid.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Bootstrap, from Twitter 6 | 7 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
    32 |
    33 |
    34 | Project name 35 | 40 |

    Logged in as username

    41 |
    42 |
    43 |
    44 | 45 |
    46 | 71 |
    72 | 73 |
    74 |

    Hello, world!

    75 |

    Vestibulum id ligula porta felis euismod semper. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.

    76 |

    Learn more »

    77 |
    78 | 79 | 80 |
    81 |
    82 |

    Heading

    83 |

    Etiam porta sem malesuada magna mollis euismod. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.

    84 |

    View details »

    85 |
    86 |
    87 |

    Heading

    88 |

    Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.

    89 |

    View details »

    90 |
    91 |
    92 |

    Heading

    93 |

    Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.

    94 |

    View details »

    95 |
    96 |
    97 | 98 |
    99 | 100 | 101 |
    102 |
    103 |

    Heading

    104 |

    Etiam porta sem malesuada magna mollis euismod. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.

    105 |

    View details »

    106 |
    107 |
    108 |

    Heading

    109 |

    Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.

    110 |

    View details »

    111 |
    112 |
    113 |

    Heading

    114 |

    Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.

    115 |

    View details »

    116 |
    117 |
    118 | 119 |
    120 |

    © Company 2011

    121 |
    122 |
    123 |
    124 | 125 | 126 | -------------------------------------------------------------------------------- /bootstrap/js/bootstrap-modal.js: -------------------------------------------------------------------------------- 1 | /* ========================================================= 2 | * bootstrap-modal.js v1.3.0 3 | * http://twitter.github.com/bootstrap/javascript.html#modal 4 | * ========================================================= 5 | * Copyright 2011 Twitter, Inc. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * ========================================================= */ 19 | 20 | 21 | (function( $ ){ 22 | 23 | /* CSS TRANSITION SUPPORT (https://gist.github.com/373874) 24 | * ======================================================= */ 25 | 26 | var transitionEnd 27 | 28 | $(document).ready(function () { 29 | 30 | $.support.transition = (function () { 31 | var thisBody = document.body || document.documentElement 32 | , thisStyle = thisBody.style 33 | , support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined 34 | return support 35 | })() 36 | 37 | // set CSS transition event type 38 | if ( $.support.transition ) { 39 | transitionEnd = "TransitionEnd" 40 | if ( $.browser.webkit ) { 41 | transitionEnd = "webkitTransitionEnd" 42 | } else if ( $.browser.mozilla ) { 43 | transitionEnd = "transitionend" 44 | } else if ( $.browser.opera ) { 45 | transitionEnd = "oTransitionEnd" 46 | } 47 | } 48 | 49 | }) 50 | 51 | 52 | /* MODAL PUBLIC CLASS DEFINITION 53 | * ============================= */ 54 | 55 | var Modal = function ( content, options ) { 56 | this.settings = $.extend({}, $.fn.modal.defaults) 57 | this.$element = $(content) 58 | .delegate('.close', 'click.modal', $.proxy(this.hide, this)) 59 | 60 | if ( options ) { 61 | $.extend( this.settings, options ) 62 | 63 | if ( options.show ) { 64 | this.show() 65 | } 66 | } 67 | 68 | return this 69 | } 70 | 71 | Modal.prototype = { 72 | 73 | toggle: function () { 74 | return this[!this.isShown ? 'show' : 'hide']() 75 | } 76 | 77 | , show: function () { 78 | var that = this 79 | this.isShown = true 80 | this.$element.trigger('show') 81 | 82 | escape.call(this) 83 | backdrop.call(this, function () { 84 | that.$element 85 | .appendTo(document.body) 86 | .show() 87 | 88 | setTimeout(function () { 89 | that.$element 90 | .addClass('in') 91 | .trigger('shown') 92 | }, 0) 93 | }) 94 | 95 | return this 96 | } 97 | 98 | , hide: function (e) { 99 | e && e.preventDefault() 100 | 101 | var that = this 102 | this.isShown = false 103 | 104 | escape.call(this) 105 | 106 | this.$element 107 | .trigger('hide') 108 | .removeClass('in') 109 | 110 | function removeElement () { 111 | that.$element 112 | .hide() 113 | .trigger('hidden') 114 | 115 | backdrop.call(that) 116 | } 117 | 118 | $.support.transition && this.$element.hasClass('fade') ? 119 | this.$element.one(transitionEnd, removeElement) : 120 | removeElement() 121 | 122 | return this 123 | } 124 | 125 | } 126 | 127 | 128 | /* MODAL PRIVATE METHODS 129 | * ===================== */ 130 | 131 | function backdrop ( callback ) { 132 | var that = this 133 | , animate = this.$element.hasClass('fade') ? 'fade' : '' 134 | if ( this.isShown && this.settings.backdrop ) { 135 | this.$backdrop = $('