├── .gitignore
├── LICENSE
├── README.md
├── bower.json
├── demo
└── index.html
├── dist
└── jquery.projectblocker.min.js
├── gruntfile.js
├── html
└── jquery.projectblocker.html
├── less
└── jquery.projectblocker.less
├── package.json
└── src
└── jquery.projectblocker.js
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | *.sublime-project
3 | *.sublime-workspace
4 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 Mike Zarandona
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ProjectBlocker
2 |
3 | [](http://badge.fury.io/bo/project-blocker)
4 | [](http://gruntjs.com/)
5 |
6 | A handy jQuery solution for blocking responsive, IE, or incomplete bits from being seen while in development.
7 |
8 | [GitHub](https://github.com/mike-zarandona/ProjectBlocker) | [Demo](http://codepen.io/mike-zarandona/full/bNYvmw/)
9 |
10 | _Features_:
11 | - **Block responsive web design** - gives you the ability to demo coded previews without worrying about how the project might look on mobile devices.
12 | - **Block the homepage** - show a polite message that a page isn't yet ready to be viewed to keep visitors out of broken or unfinished areas of preview sites.
13 | - **Block Internet Explorer** - _duh_.
14 | - **Customizable and friendly blocking messages** - because good UX is the right thing to do.
15 | - **Bypass for developers** - for sanity.
16 |
17 | 
18 |
19 |
20 |
21 |
22 |
23 | ## Getting Started
24 | 1. Include jQuery.
25 | 1. Include `dist/jquery.projectblocker.min.js`.
26 | 1. When the `document` is `ready()`, initialize **`ProjectBlocker`**:
27 |
28 | ```javascript
29 | $(document).on('ready', function() {
30 | $.projectBlocker();
31 | });
32 | ```
33 |
34 | ### Full Example
35 | ```javascript
36 | $(document).on('ready', function() {
37 | $.projectBlocker({
38 | responsive: 'hide',
39 | minWidth: 1200,
40 |
41 | homepage: 'hide',
42 | homepageSelector: '#wrapper.homepage',
43 |
44 | ie: 'hide'
45 | });
46 | });
47 | ```
48 |
49 | When all else fails, check out the `demo/`.
50 |
51 |
52 |
53 |
54 |
55 | ## A Note on Functionality
56 | **`ProjectBlocker`** blocks responsive web design by throwing up the friendly blocking message plus overlay, but _also_ adds a CSS `max-width` property to the `