├── .gitignore ├── .npmignore ├── .travis.yml ├── LICENSE.md ├── Makefile ├── README.md ├── component.json ├── docs ├── assets │ ├── bootstrap-lightbox.zip │ ├── css │ │ ├── bootstrap-lightbox.css │ │ ├── bootstrap-lightbox.min.css │ │ ├── bootstrap.min.css │ │ ├── pygment_trac.css │ │ ├── qunit.css │ │ └── styles.css │ ├── img │ │ ├── Thumbs.db │ │ ├── glyphicons-halflings-white.png │ │ ├── glyphicons-halflings.png │ │ ├── large.png │ │ └── small.png │ ├── js │ │ ├── bootstrap-lightbox.js │ │ ├── bootstrap-lightbox.min.js │ │ ├── bootstrap.js │ │ ├── bootstrap.min.js │ │ ├── jquery.js │ │ ├── jquery.min.js │ │ ├── less.min.js │ │ ├── qunit.js │ │ └── scale.fix.js │ └── prettify │ │ ├── lang-apollo.js │ │ ├── lang-clj.js │ │ ├── lang-css.js │ │ ├── lang-go.js │ │ ├── lang-hs.js │ │ ├── lang-lisp.js │ │ ├── lang-lua.js │ │ ├── lang-ml.js │ │ ├── lang-n.js │ │ ├── lang-proto.js │ │ ├── lang-scala.js │ │ ├── lang-sql.js │ │ ├── lang-tex.js │ │ ├── lang-vb.js │ │ ├── lang-vhdl.js │ │ ├── lang-wiki.js │ │ ├── lang-xq.js │ │ ├── lang-yaml.js │ │ ├── prettify.css │ │ └── prettify.js ├── build │ ├── .gitignore │ ├── README.md │ ├── index.js │ └── package.json ├── index.html └── templates │ ├── bonus.mustache │ ├── demo.mustache │ ├── home.mustache │ ├── layout.mustache │ └── usage.mustache ├── js ├── .jshintrc ├── bootstrap-lightbox.js └── tests │ ├── .jshintrc │ ├── index.html │ ├── pixel.png │ ├── run-qunit.js │ ├── test-manual.html │ ├── unit │ ├── bootstrap-lightbox.js │ └── qunit-setup.js │ └── vendor │ ├── bootstrap.js │ ├── bootstrap.min.css │ ├── jquery.js │ ├── less.min.js │ ├── qunit.css │ └── qunit.js ├── less └── bootstrap-lightbox.less └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | node_modules 3 | *~ 4 | .DS_STORE 5 | .htaccess 6 | npm-debug.log -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | test 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | before_script: 2 | - cd ./js/tests 3 | - echo "new Date().toString();" | phantomjs 4 | script: phantomjs run-qunit.js index.html -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 Jason Butz (http://jasonbutz.info) 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. -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | DATE=$(shell date +%I:%M%p) 2 | CHECK=\033[32m✔\033[39m 3 | HR=\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\# 4 | 5 | 6 | # 7 | # BUILD DOCS 8 | # 9 | 10 | build: 11 | @echo "\n${HR}" 12 | @echo "Building Bootstrap Lightbox..." 13 | @echo "${HR}\n" 14 | @./node_modules/.bin/jshint js/*.js --config js/.jshintrc 15 | @./node_modules/.bin/jshint js/tests/unit/*.js --config js/.jshintrc 16 | @echo "Running JSHint on javascript... ${CHECK} Done" 17 | @./node_modules/.bin/recess --compile less/bootstrap-lightbox.less > docs/assets/css/bootstrap-lightbox.css.tmp 18 | @./node_modules/.bin/recess --compress less/bootstrap-lightbox.less > docs/assets/css/bootstrap-lightbox.min.css.tmp 19 | @echo "Compiling LESS with Recess... ${CHECK} Done" 20 | @node docs/build 21 | @cp js/*.js docs/assets/js/ 22 | @cp js/tests/vendor/jquery.js docs/assets/js/ 23 | @cp js/tests/vendor/bootstrap.js docs/assets/js/ 24 | @cp js/tests/vendor/*.css docs/assets/css/ 25 | 26 | @./node_modules/.bin/uglifyjs -nc docs/assets/js/jquery.js > docs/assets/js/jquery.min.js 27 | @./node_modules/.bin/uglifyjs -nc docs/assets/js/bootstrap.js > docs/assets/js/bootstrap.min.js 28 | 29 | @echo "Compiling documentation... ${CHECK} Done" 30 | @./node_modules/.bin/uglifyjs -nc docs/assets/js/bootstrap-lightbox.js > docs/assets/js/bootstrap-lightbox.min.tmp.js 31 | 32 | @echo "/*!\n* bootstrap-lightbox.js v0.7.0 \n* Copyright 2014 Jason Butz\n* http://www.apache.org/licenses/LICENSE-2.0.txt\n*/" > docs/assets/js/copyright.js 33 | @cat docs/assets/js/copyright.js js/bootstrap-lightbox.js > docs/assets/js/bootstrap-lightbox.js 34 | @cat docs/assets/js/copyright.js docs/assets/js/bootstrap-lightbox.min.tmp.js > docs/assets/js/bootstrap-lightbox.min.js 35 | @rm docs/assets/js/copyright.js docs/assets/js/bootstrap-lightbox.min.tmp.js 36 | 37 | @echo "/*!\n* bootstrap-lightbox.css v0.7.0 \n* Copyright 2014 Jason Butz\n* http://www.apache.org/licenses/LICENSE-2.0.txt\n*/" > docs/assets/css/copyright.css 38 | @cat docs/assets/css/copyright.css docs/assets/css/bootstrap-lightbox.css.tmp > docs/assets/css/bootstrap-lightbox.css 39 | @cat docs/assets/css/copyright.css docs/assets/css/bootstrap-lightbox.min.css.tmp > docs/assets/css/bootstrap-lightbox.min.css 40 | @rm docs/assets/css/copyright.css docs/assets/css/bootstrap-lightbox.css.tmp docs/assets/css/bootstrap-lightbox.min.css.tmp 41 | 42 | @echo "Compiling and minifying javascript... ${CHECK} Done" 43 | @echo "\n${HR}" 44 | @echo "Bootstrap Lightbox successfully built at ${DATE}." 45 | @echo "${HR}\n" 46 | 47 | # 48 | # RUN JSHINT & QUNIT TESTS IN PHANTOMJS 49 | # 50 | 51 | test: 52 | @echo "\n${HR}" 53 | @echo "Running Bootstrap Lightbox Tests..." 54 | @echo "${HR}\n" 55 | @./node_modules/.bin/jshint js/*.js --config js/.jshintrc 56 | @echo "Running JSHint on javascript... ${CHECK} Done" 57 | @./node_modules/.bin/jshint js/tests/unit/*.js --config js/.jshintrc 58 | @echo "Running JSHint on javascript tests... ${CHECK} Done" 59 | @cd js/tests/; phantomjs run-qunit.js index.html 60 | @echo "Running QUnit... ${CHECK} Done" 61 | 62 | # 63 | # MAKE FOR GH-PAGES 64 | # 65 | 66 | gh-pages: 67 | rm -f docs/assets/bootstrap-lightbox.zip 68 | zip -j docs/assets/bootstrap-lightbox.zip docs/assets/js/bootstrap-lightbox.js docs/assets/bootstrap-lightbox.zip docs/assets/js/bootstrap-lightbox.min.js docs/assets/bootstrap-lightbox.zip docs/assets/css/bootstrap-lightbox.css docs/assets/css/bootstrap-lightbox.min.css 69 | rm -rf ../bootstrap-lightbox-gh-pages/ 70 | node docs/build 71 | mkdir ../bootstrap-lightbox-gh-pages 72 | cp -r docs/* ../bootstrap-lightbox-gh-pages -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | **THIS PLUGIN IS NO LONGER BEING MAINTAINED. IF SOMEONE ELSE WANTS TO MAINTAIN IT FEEL FREE TO FORK THE REPO.** 2 | 3 | [Bootstrap - Lightbox](http://jbutz.github.com/bootstrap-lightbox/) [![Build Status](https://secure.travis-ci.org/jbutz/bootstrap-lightbox.png)](http://travis-ci.org/jbutz/bootstrap-lightbox) 4 | ================= 5 | 6 | This is a plugin for Twitter Bootstrap that adds a lightbox that is based off the modal dialog 7 | 8 | 9 | Quick start 10 | ----------- 11 | 12 | You have several options. You can clone the repository `git clone git://github.com/jbutz/bootstrap-lightbox.git`, grab an [archive](https://github.com/jbutz/bootstrap-lightbox/tags), or use [cdnjs](http://cdnjs.com/#bootstrap-lightbox). 13 | 14 | Once you have the files include the CSS and JavaScript files in your page and then give the example code below a shot. 15 | 16 | Example 17 | ----------- 18 | 19 | ```html 20 | Open Lightbox 21 | 31 | ``` 32 | 33 | Usage 34 | ----------- 35 | 36 | ### Via data attributes ### 37 | 38 | All you need to do is add `data-toggle="lightbox"` and `href="#lightbox"` or `data-target="#lightbox"` to a link, and set the `href` so it references the lightbox you want to display. 39 | ```html 40 | Open Lightbox 41 | ``` 42 | 43 | ### Via JavaScript ### 44 | 45 | Open the lightbox with the id `myLightbox`. 46 | ```javascript 47 | $('#myLightbox').lightbox(options) 48 | ``` 49 | 50 | ### Options ### 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 |
NameTypeDefaultDescription
backdropbooleantrueThis adds a modal-backdrop element.
keyboardbooleantruePressing escape closes the lightbox.
showbooleantrueShows the lightbox when initialized.
Note: This only applies when using JavaScript to setup the lightbox.
resizeToFitbooleantrueThis resizes the image to fit the window if the image is too large.
88 | -------------------------------------------------------------------------------- /component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bootstrap-lightbox", 3 | "version": "0.7.0", 4 | "main": ["docs/assets/js/bootstrap-lightbox.js","docs/assets/css/bootstrap-lightbox.css"], 5 | "dependencies": { 6 | "jquery" : ">=1.7.1", 7 | "bootstrap" : ">=3" 8 | } 9 | } -------------------------------------------------------------------------------- /docs/assets/bootstrap-lightbox.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbutz/bootstrap-lightbox/a71994db0d709bfc4e30763aa55859749279bd29/docs/assets/bootstrap-lightbox.zip -------------------------------------------------------------------------------- /docs/assets/css/bootstrap-lightbox.css: -------------------------------------------------------------------------------- 1 | .lightbox-open { 2 | overflow: hidden; 3 | } 4 | body.lightbox-open, 5 | .lightbox-open .navbar-fixed-top, 6 | .lightbox-open .navbar-fixed-bottom { 7 | margin-right: 15px; 8 | } 9 | /* Fix for z-index for compatibility with Bootstrap 3.1+ */ 10 | /* added by @mattlibera */ 11 | .lightbox { 12 | position: fixed; 13 | top: 0; 14 | right: 0; 15 | bottom: 0; 16 | left: 0; 17 | z-index: 1041; 18 | display: none; 19 | overflow: auto; 20 | overflow-y: scroll; 21 | } 22 | .lightbox .fade .lightbox-dialog { 23 | -webkit-transform: translate(0, -25%); 24 | -ms-transform: translate(0, -25%); 25 | transform: translate(0, -25%); 26 | -webkit-transition: -webkit-transform 0.3s ease-out; 27 | -moz-transition: -moz-transform 0.3s ease-out; 28 | -o-transition: -o-transform 0.3s ease-out; 29 | transition: transform 0.3s ease-out; 30 | } 31 | .lightbox .in .lightbox-dialog { 32 | -webkit-transform: translate(0, 0); 33 | -ms-transform: translate(0, 0); 34 | transform: translate(0, 0); 35 | } 36 | .lightbox .lightbox-dialog { 37 | z-index: 1050; 38 | width: auto; 39 | /*padding: 10px;*/ 40 | margin-right: auto; 41 | margin-left: auto; 42 | } 43 | .lightbox .lightbox-dialog .lightbox-header { 44 | float: right; 45 | } 46 | .lightbox .lightbox-dialog .lightbox-header .close { 47 | margin-top: -2px; 48 | } 49 | .lightbox .lightbox-dialog .lightbox-content { 50 | position: relative; 51 | background-color: #ffffff; 52 | border: 1px solid #999999; 53 | border: 1px solid rgba(0, 0, 0, 0.2); 54 | border-radius: 6px; 55 | outline: none; 56 | -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5); 57 | box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5); 58 | background-clip: padding-box; 59 | /**/ 60 | padding: 10px; 61 | display: inline-block; 62 | } 63 | .lightbox .lightbox-dialog .lightbox-content .lightbox-caption { 64 | position: absolute; 65 | right: 8px; 66 | bottom: 8px; 67 | left: 10px; 68 | padding: 2%; 69 | font-size: 14px; 70 | line-height: 18px; 71 | color: white; 72 | text-align: center; 73 | text-shadow: 0 -1px 0 #000000; 74 | text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3); 75 | background: #000; 76 | background: rgba(0, 0, 0, 0.6); 77 | } 78 | -------------------------------------------------------------------------------- /docs/assets/css/bootstrap-lightbox.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * bootstrap-lightbox.css v0.7.0 3 | * Copyright 2014 Jason Butz 4 | * http://www.apache.org/licenses/LICENSE-2.0.txt 5 | */ 6 | .lightbox-open{overflow:hidden}.lightbox-open .navbar-fixed-bottom,.lightbox-open .navbar-fixed-top,body.lightbox-open{margin-right:15px}.lightbox{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1041;display:none;overflow:auto;overflow-y:scroll}.lightbox .fade .lightbox-dialog{-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);transform:translate(0,-25%);-webkit-transition:-webkit-transform .3s ease-out;-moz-transition:-moz-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out}.lightbox .in .lightbox-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0)}.lightbox .lightbox-dialog{z-index:1050;width:auto;margin-right:auto;margin-left:auto}.lightbox .lightbox-dialog .lightbox-header{float:right}.lightbox .lightbox-dialog .lightbox-header .close{margin-top:-2px}.lightbox .lightbox-dialog .lightbox-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5);background-clip:padding-box;padding:10px;display:inline-block}.lightbox .lightbox-dialog .lightbox-content .lightbox-caption{position:absolute;right:8px;bottom:8px;left:10px;padding:2%;font-size:14px;line-height:18px;color:#fff;text-align:center;text-shadow:0 -1px 0 #000;text-shadow:0 -1px 0 rgba(0,0,0,.3);background:#000;background:rgba(0,0,0,.6)} 7 | -------------------------------------------------------------------------------- /docs/assets/css/pygment_trac.css: -------------------------------------------------------------------------------- 1 | .highlight { background: #ffffff; } 2 | .highlight .c { color: #999988; font-style: italic } /* Comment */ 3 | .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ 4 | .highlight .k { font-weight: bold } /* Keyword */ 5 | .highlight .o { font-weight: bold } /* Operator */ 6 | .highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */ 7 | .highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */ 8 | .highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */ 9 | .highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */ 10 | .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ 11 | .highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */ 12 | .highlight .ge { font-style: italic } /* Generic.Emph */ 13 | .highlight .gr { color: #aa0000 } /* Generic.Error */ 14 | .highlight .gh { color: #999999 } /* Generic.Heading */ 15 | .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ 16 | .highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */ 17 | .highlight .go { color: #888888 } /* Generic.Output */ 18 | .highlight .gp { color: #555555 } /* Generic.Prompt */ 19 | .highlight .gs { font-weight: bold } /* Generic.Strong */ 20 | .highlight .gu { color: #800080; font-weight: bold; } /* Generic.Subheading */ 21 | .highlight .gt { color: #aa0000 } /* Generic.Traceback */ 22 | .highlight .kc { font-weight: bold } /* Keyword.Constant */ 23 | .highlight .kd { font-weight: bold } /* Keyword.Declaration */ 24 | .highlight .kn { font-weight: bold } /* Keyword.Namespace */ 25 | .highlight .kp { font-weight: bold } /* Keyword.Pseudo */ 26 | .highlight .kr { font-weight: bold } /* Keyword.Reserved */ 27 | .highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */ 28 | .highlight .m { color: #009999 } /* Literal.Number */ 29 | .highlight .s { color: #d14 } /* Literal.String */ 30 | .highlight .na { color: #008080 } /* Name.Attribute */ 31 | .highlight .nb { color: #0086B3 } /* Name.Builtin */ 32 | .highlight .nc { color: #445588; font-weight: bold } /* Name.Class */ 33 | .highlight .no { color: #008080 } /* Name.Constant */ 34 | .highlight .ni { color: #800080 } /* Name.Entity */ 35 | .highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */ 36 | .highlight .nf { color: #990000; font-weight: bold } /* Name.Function */ 37 | .highlight .nn { color: #555555 } /* Name.Namespace */ 38 | .highlight .nt { color: #000080 } /* Name.Tag */ 39 | .highlight .nv { color: #008080 } /* Name.Variable */ 40 | .highlight .ow { font-weight: bold } /* Operator.Word */ 41 | .highlight .w { color: #bbbbbb } /* Text.Whitespace */ 42 | .highlight .mf { color: #009999 } /* Literal.Number.Float */ 43 | .highlight .mh { color: #009999 } /* Literal.Number.Hex */ 44 | .highlight .mi { color: #009999 } /* Literal.Number.Integer */ 45 | .highlight .mo { color: #009999 } /* Literal.Number.Oct */ 46 | .highlight .sb { color: #d14 } /* Literal.String.Backtick */ 47 | .highlight .sc { color: #d14 } /* Literal.String.Char */ 48 | .highlight .sd { color: #d14 } /* Literal.String.Doc */ 49 | .highlight .s2 { color: #d14 } /* Literal.String.Double */ 50 | .highlight .se { color: #d14 } /* Literal.String.Escape */ 51 | .highlight .sh { color: #d14 } /* Literal.String.Heredoc */ 52 | .highlight .si { color: #d14 } /* Literal.String.Interpol */ 53 | .highlight .sx { color: #d14 } /* Literal.String.Other */ 54 | .highlight .sr { color: #009926 } /* Literal.String.Regex */ 55 | .highlight .s1 { color: #d14 } /* Literal.String.Single */ 56 | .highlight .ss { color: #990073 } /* Literal.String.Symbol */ 57 | .highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */ 58 | .highlight .vc { color: #008080 } /* Name.Variable.Class */ 59 | .highlight .vg { color: #008080 } /* Name.Variable.Global */ 60 | .highlight .vi { color: #008080 } /* Name.Variable.Instance */ 61 | .highlight .il { color: #009999 } /* Literal.Number.Integer.Long */ 62 | 63 | .type-csharp .highlight .k { color: #0000FF } 64 | .type-csharp .highlight .kt { color: #0000FF } 65 | .type-csharp .highlight .nf { color: #000000; font-weight: normal } 66 | .type-csharp .highlight .nc { color: #2B91AF } 67 | .type-csharp .highlight .nn { color: #000000 } 68 | .type-csharp .highlight .s { color: #A31515 } 69 | .type-csharp .highlight .sc { color: #A31515 } 70 | -------------------------------------------------------------------------------- /docs/assets/css/qunit.css: -------------------------------------------------------------------------------- 1 | /** 2 | * QUnit - A JavaScript Unit Testing Framework 3 | * 4 | * http://docs.jquery.com/QUnit 5 | * 6 | * Copyright (c) 2012 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-fixture { 231 | display:none; 232 | } -------------------------------------------------------------------------------- /docs/assets/css/styles.css: -------------------------------------------------------------------------------- 1 | /* Jumbotrons 2 | -------------------------------------------------- */ 3 | 4 | /* Base class 5 | ------------------------- */ 6 | .jumbotron { 7 | position: relative; 8 | padding: 40px 0; 9 | color: #fff; 10 | text-align: center; 11 | text-shadow: 0 1px 3px rgba(0,0,0,.4), 0 0 30px rgba(0,0,0,.075); 12 | background: #020031; /* Old browsers */ 13 | background: -moz-linear-gradient(45deg, #020031 0%, #68ac59 100%); /* FF3.6+ */ 14 | background: -webkit-gradient(linear, left bottom, right top, color-stop(0%,#020031), color-stop(100%,#68ac59)); /* Chrome,Safari4+ */ 15 | background: -webkit-linear-gradient(45deg, #020031 0%,#68ac59 100%); /* Chrome10+,Safari5.1+ */ 16 | background: -o-linear-gradient(45deg, #020031 0%,#68ac59 100%); /* Opera 11.10+ */ 17 | background: -ms-linear-gradient(45deg, #020031 0%,#68ac59 100%); /* IE10+ */ 18 | background: linear-gradient(45deg, #020031 0%,#68ac59 100%); /* W3C */ 19 | filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#020031', endColorstr='#68ac59',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */ 20 | -webkit-box-shadow: inset 0 3px 7px rgba(0,0,0,.2), inset 0 -3px 7px rgba(0,0,0,.2); 21 | -moz-box-shadow: inset 0 3px 7px rgba(0,0,0,.2), inset 0 -3px 7px rgba(0,0,0,.2); 22 | box-shadow: inset 0 3px 7px rgba(0,0,0,.2), inset 0 -3px 7px rgba(0,0,0,.2); 23 | } 24 | .jumbotron h1 { 25 | font-size: 50px; 26 | font-weight: bold; 27 | letter-spacing: -1px; 28 | line-height: 1; 29 | } 30 | .jumbotron p { 31 | font-size: 24px; 32 | font-weight: 300; 33 | line-height: 30px; 34 | margin-bottom: 30px; 35 | } 36 | 37 | /* Link styles (used on .masthead-links as well) */ 38 | .jumbotron a { 39 | color: #fff; 40 | color: rgba(255,255,255,.5); 41 | -webkit-transition: all .2s ease-in-out; 42 | -moz-transition: all .2s ease-in-out; 43 | transition: all .2s ease-in-out; 44 | } 45 | .jumbotron a:hover { 46 | color: #fff; 47 | text-shadow: 0 0 10px rgba(255,255,255,.25); 48 | } 49 | 50 | /* Download button */ 51 | .masthead .btn { 52 | padding: 14px 24px; 53 | font-size: 24px; 54 | font-weight: 200; 55 | color: #fff; /* redeclare to override the `.jumbotron a` */ 56 | border: 0; 57 | -webkit-border-radius: 6px; 58 | -moz-border-radius: 6px; 59 | border-radius: 6px; 60 | -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 5px rgba(0,0,0,.25); 61 | -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 5px rgba(0,0,0,.25); 62 | box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 5px rgba(0,0,0,.25); 63 | -webkit-transition: none; 64 | -moz-transition: none; 65 | transition: none; 66 | } 67 | .masthead .btn:hover { 68 | -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 5px rgba(0,0,0,.25); 69 | -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 5px rgba(0,0,0,.25); 70 | box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 5px rgba(0,0,0,.25); 71 | } 72 | .masthead .btn:active { 73 | -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.1); 74 | -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.1); 75 | box-shadow: inset 0 2px 4px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.1); 76 | } 77 | 78 | 79 | /* Pattern overlay 80 | ------------------------- */ 81 | .jumbotron .container { 82 | position: relative; 83 | z-index: 2; 84 | } 85 | .jumbotron:after { 86 | content: ''; 87 | display: block; 88 | position: absolute; 89 | top: 0; 90 | right: 0; 91 | bottom: 0; 92 | left: 0; 93 | opacity: .4; 94 | } 95 | 96 | /* Masthead (docs home) 97 | ------------------------- */ 98 | .masthead { 99 | padding: 70px 0 80px; 100 | margin-bottom: 0; 101 | color: #fff; 102 | } 103 | .masthead h1 { 104 | font-size: 80px; 105 | line-height: 1; 106 | letter-spacing: -2px; 107 | } 108 | .masthead p { 109 | font-size: 30px; 110 | font-weight: 200; 111 | line-height: 1.25; 112 | } 113 | 114 | /* Textual links in masthead */ 115 | .masthead-links { 116 | margin: 0; 117 | list-style: none; 118 | } 119 | .masthead-links li { 120 | display: inline; 121 | padding: 0 10px; 122 | color: rgba(255,255,255,.25); 123 | } 124 | 125 | .social-btns { 126 | padding: 15px 0; 127 | text-align: center; 128 | background-color: whiteSmoke; 129 | border-top: 1px solid white; 130 | border-bottom: 1px solid #DDD; 131 | } 132 | /* Textual links in social */ 133 | .social-links { 134 | margin: 0; 135 | list-style: none; 136 | } 137 | .social-links li { 138 | display: inline; 139 | padding: 0 10px; 140 | color: rgba(255,255,255,.25); 141 | } 142 | .example { 143 | position: relative; 144 | margin: 15px 0; 145 | padding: 39px 19px 14px; 146 | background-color: white; 147 | border: 1px solid #DDD; 148 | -webkit-border-radius: 4px; 149 | -moz-border-radius: 4px; 150 | border-radius: 4px; 151 | } 152 | .example::after { 153 | content: "Example"; 154 | position: absolute; 155 | top: -1px; 156 | left: -1px; 157 | padding: 3px 7px; 158 | font-size: 12px; 159 | font-weight: bold; 160 | background-color: whiteSmoke; 161 | border: 1px solid #DDD; 162 | color: #9DA0A4; 163 | -webkit-border-radius: 4px 0 4px 0; 164 | -moz-border-radius: 4px 0 4px 0; 165 | border-radius: 4px 0 4px 0; 166 | } 167 | .example + .prettyprint { 168 | margin-top: -20px; 169 | padding-top: 15px; 170 | } -------------------------------------------------------------------------------- /docs/assets/img/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbutz/bootstrap-lightbox/a71994db0d709bfc4e30763aa55859749279bd29/docs/assets/img/Thumbs.db -------------------------------------------------------------------------------- /docs/assets/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbutz/bootstrap-lightbox/a71994db0d709bfc4e30763aa55859749279bd29/docs/assets/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /docs/assets/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbutz/bootstrap-lightbox/a71994db0d709bfc4e30763aa55859749279bd29/docs/assets/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /docs/assets/img/large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbutz/bootstrap-lightbox/a71994db0d709bfc4e30763aa55859749279bd29/docs/assets/img/large.png -------------------------------------------------------------------------------- /docs/assets/img/small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbutz/bootstrap-lightbox/a71994db0d709bfc4e30763aa55859749279bd29/docs/assets/img/small.png -------------------------------------------------------------------------------- /docs/assets/js/bootstrap-lightbox.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * bootstrap-lightbox.js v0.7.0 3 | * Copyright 2014 Jason Butz 4 | * http://www.apache.org/licenses/LICENSE-2.0.txt 5 | */ 6 | 7 | +function ($) { "use strict"; 8 | 9 | // LIGHTBOX CLASS DEFINITION 10 | // ====================== 11 | 12 | var Lightbox = function (element, options) 13 | { 14 | this.options = options 15 | this.$element = $(element) 16 | this.$backdrop = null 17 | this.isShown = null 18 | 19 | if (this.options.remote) this.$element.load(this.options.remote) 20 | } 21 | 22 | // We depend upon Twitter Bootstrap's Modal library to simplify things here 23 | Lightbox.prototype = $.extend({},$.fn.modal.Constructor.prototype); 24 | 25 | Lightbox.prototype.constructor = Lightbox; 26 | 27 | Lightbox.DEFAULTS = { 28 | backdrop: true, 29 | keyboard: true, 30 | show: true 31 | } 32 | 33 | Lightbox.prototype.show = function (_relatedTarget) 34 | { 35 | var that = this; 36 | var e = $.Event('show.bs.lightbox', { relatedTarget: _relatedTarget }); 37 | 38 | this.$element.trigger(e); 39 | 40 | if (this.isShown || e.isDefaultPrevented()) return; 41 | 42 | this.isShown = true; 43 | 44 | this.escape(); 45 | 46 | this.$element.on('click.dismiss.lightbox', '[data-dismiss="lightbox"]', $.proxy(this.hide, this)); 47 | 48 | // This bit is added since we don't display until we have the size 49 | // which prevents image jumping 50 | this.preloadSize(function() 51 | { 52 | that.backdrop(function () 53 | { 54 | var transition = $.support.transition && that.$element.hasClass('fade'); 55 | 56 | if (!that.$element.parent().length) 57 | { 58 | that.$element.appendTo(document.body); // don't move modals dom position 59 | } 60 | 61 | that.$element.show(); 62 | 63 | if (transition) 64 | { 65 | that.$element[0].offsetWidth; // force reflow 66 | } 67 | 68 | that.$element 69 | .addClass('in') 70 | .attr('aria-hidden', false); 71 | 72 | that.enforceFocus(); 73 | 74 | var e = $.Event('shown.bs.lightbox', { relatedTarget: _relatedTarget }); 75 | 76 | transition ? 77 | that.$element.find('.lightbox-dialog') // wait for modal to slide in 78 | .one($.support.transition.end, function () 79 | { 80 | that.$element.focus().trigger(e); 81 | }) 82 | .emulateTransitionEnd(300) : 83 | that.$element.focus().trigger(e); 84 | }); 85 | }); 86 | }; 87 | 88 | Lightbox.prototype.hide = function (e, slide) 89 | { 90 | if (e) e.preventDefault(); 91 | 92 | e = $.Event('hide.bs.lightbox'); 93 | 94 | this.$element.trigger(e); 95 | 96 | if (!this.isShown || e.isDefaultPrevented()) return; 97 | 98 | this.isShown = false; 99 | 100 | this.escape(); 101 | 102 | $(document).off('focusin.bs.lightbox'); 103 | 104 | this.$element 105 | .removeClass('in') 106 | .attr('aria-hidden', true) 107 | .off('click.dismiss.lightbox'); 108 | 109 | $.support.transition && this.$element.hasClass('fade') ? 110 | this.$element 111 | .one($.support.transition.end, $.proxy(this.hideModal(slide), this)) 112 | .emulateTransitionEnd(300) : 113 | this.hideModal(slide); 114 | }; 115 | 116 | Lightbox.prototype.enforceFocus = function () { 117 | $(document) 118 | .off('focusin.bs.lightbox') // guard against infinite focus loop 119 | .on('focusin.bs.lightbox', $.proxy(function (e) 120 | { 121 | if (this.$element[0] !== e.target && !this.$element.has(e.target).length) 122 | { 123 | this.$element.focus(); 124 | } 125 | }, this)); 126 | }; 127 | 128 | Lightbox.prototype.escape = function () 129 | { 130 | if (this.isShown && this.options.keyboard) 131 | { 132 | this.$element.on('keyup.dismiss.bs.lightbox', $.proxy(function (e) 133 | { 134 | e.which == 27 && this.hide(); 135 | }, this)); 136 | } 137 | else if (!this.isShown) 138 | { 139 | this.$element.off('keyup.dismiss.bs.lightbox'); 140 | } 141 | } 142 | 143 | Lightbox.prototype.hideModal = function (slide) 144 | { 145 | var that = this; 146 | this.$element.hide(); 147 | this.backdrop(function () 148 | { 149 | that.removeBackdrop(); 150 | 151 | // Don't trigger hidden event if sliding between lightboxes 152 | if(!slide) that.$element.trigger('hidden.bs.lightbox'); 153 | }); 154 | }; 155 | 156 | Lightbox.prototype.backdrop = function (callback) 157 | { 158 | var that = this 159 | var animate = this.$element.hasClass('fade') ? 'fade' : '' 160 | if (this.isShown && this.options.backdrop) 161 | { 162 | var doAnimate = $.support.transition && animate; 163 | 164 | this.$backdrop = $('