diff --git a/demo/index.html b/demo/index.html deleted file mode 100644 index 55d099a..0000000 --- a/demo/index.html +++ /dev/null @@ -1,155 +0,0 @@ - - - -
-
-
-

The check browser version plugin

-

Latest version is 1.0.0

-

You can use default view of this plugin look like so (See under) or create himself warning block

-
-
- -
-
-
-
-

Warning!

-

You use oldest version of a browser. It may be a reason of incorrect work and view of a website.

-

For comfortable work, please download latest version of a browser convenient for you from official website.

-

Please read ourdocumentation.

-
- -
- - - - -
- - -
-
-
- -
-
-

For begin you need check - you use jquery or not use? If you not add jquery plugin - you need do it

-

And inicialize plugin

-
-                
-$(document).ready(function () {
-    $('body').checkBrowser();
-});
-                
-            
- -

All supported params:

- -
-                
-$(document).ready(function () {
-    $('body').checkBrowser({
-        once: 'No',
-        warningBoxName: '.old-browser-warning',
-        closeBtnName: '#close-old-browser-warning',
-        duration: 1200,
-        easing: 'swing',
-
-        browsers: {
-            Firefox: 27,
-            Chrome: 30,
-            Opera: 15,
-            IE: 10
-        }
-    });
-});
-                
-            
- - -

In this option you can change amount of show

- -
-                
-$('body').checkBrowser({
-    once: 'No'
-});
-                
-            
- -
-                
-$('body').checkBrowser({
-    warningBoxName: '.old-browser-warning'
-});
-                
-            
- -
-                
-$('body').checkBrowser({
-    closeBtnName: '#close-old-browser-warning'
-});
-                
-            
- -
-                
-$('body').checkBrowser({
-    duration: 1200
-});
-                
-            
- -
-                
-$('body').checkBrowser({
-    easing: 'swing'
-});
-                
-            
- -
-                
-$('body').checkBrowser({
-    browsers: {
-        Firefox: 27,
-        Chrome: 30,
-        Opera: 15,
-        IE: 10
-    }
-});
-                
-            
-
-
-
- - - diff --git a/demo/index.pug b/demo/index.pug index ba8d3ef..8ca0435 100644 --- a/demo/index.pug +++ b/demo/index.pug @@ -4,21 +4,21 @@ html(lang='en') meta(charset='utf-8') title Check browser plugin demonstration //- Latest compiled and minified Bootstrap CSS - link(rel='stylesheet', href='//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css') + link(rel='stylesheet', href='http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css') //- Styles for design of warning block link(rel='stylesheet', href='old-browser.css') //- SyntaxHighlighter style - link(rel='stylesheet', href='css/prism.css') + link(rel='stylesheet', href='prism.css') //- Add jquery - script(src='//code.jquery.com/jquery-1.11.0.min.js') + script(src='https://code.jquery.com/jquery-1.11.0.min.js') //- Latest compiled and minified Bootstrap JavaScript - script(src='//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js') + script(src='https://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js') //- Add plugin Check browser - script(src='js/check-browser-plugin.js') + script(src='check-browser.js') //- Syntax highlighter Prism js - script(src='js/prism.js') + script(src='prism.js') //- Own main javascript file - script(src='js/main.js') + script(src='main.js') body(data-spy='scroll', data-target='#bs-example-navbar-collapse-1', data-offset='170') header.header nav.navbar.navbar-default.navbar-fixed-top(role='navigation') @@ -40,24 +40,20 @@ html(lang='en') //- Provides extra visual weight and identifies the primary action in a set of buttons li button.navbar-btn.btn.btn-primary(type='button') Download - //- .navbar-collapse - //- .container-fluid + main.container .row .col-md-12 h1#home The check browser version plugin p Latest version is 1.0.0 - p - | You can use default view of this plugin look like so (See under) or create himself warning block + p You can use default view of this plugin look like so (See under) or create himself warning block .row .col-md-12 .old-browser-warning .old-browser-warning__left-side h3.text-primary.h3 Warning! - p.old-browser-warning__text - | You use the oldest version of a browser. It may be a reason of incorrect work and view of a website. - p.old-browser-warning__text - | For comfortable work, please download latest version of a browser convenient for you from official website. + p.old-browser-warning__text You use the oldest version of a browser. It may be a reason of incorrect work and view of a website. + p.old-browser-warning__text For comfortable work, please download latest version of a browser convenient for you from official website. p.old-browser-warning__text | Please read our a.old-browser-warning__link(href='#') documentation @@ -70,24 +66,66 @@ html(lang='en') i#close-old-browser-warning.icon-remove(title='Close') .row .col-md-12 - p - | For begin you need check - you use jquery or not use? If you not add jquery plugin - you need do it + p For begin you need check - you use jquery or not use? If you not add jquery plugin - you need do it p And inicialize plugin - pre. - \n + pre + code.language-javascript. + $(document).ready(function () { + $('body').checkBrowser(); + }); + p All supported params: - pre. - \n + pre + code.language-javascript. + $(document).ready(function () { + $('body').checkBrowser({ + once: 'No', + warningBoxName: '.old-browser-warning', + closeBtnName: '#close-old-browser-warning', + duration: 1200, + easing: 'swing', + + browsers: { + Firefox: 27, + Chrome: 30, + Opera: 15, + IE: 10 + } + }); + }); p In this option you can change amount of show - pre. - \n - pre. - \n - pre. - \n - pre. - \n - pre. - \n - pre. - \n + pre + code.language-javascript. + $('body').checkBrowser({ + once: 'No' + }); + pre + code.language-javascript. + $('body').checkBrowser({ + warningBoxName: '.old-browser-warning' + }); + pre + code.language-javascript. + $('body').checkBrowser({ + closeBtnName: '#close-old-browser-warning' + }); + pre + code.language-javascript. + $('body').checkBrowser({ + duration: 1200 + }); + pre + code.language-javascript. + $('body').checkBrowser({ + easing: 'swing' + }); + pre + code.language-javascript. + $('body').checkBrowser({ + browsers: { + Firefox: 27, + Chrome: 30, + Opera: 15, + IE: 10 + } + }); diff --git a/demo/js/main.js b/demo/js/main.js index a4ba32a..600e78b 100644 --- a/demo/js/main.js +++ b/demo/js/main.js @@ -3,7 +3,7 @@ $(document).ready(function () { once: 'Yes', duration: 1000, browsers: { - Chrome: 39 + Chrome: 52 } }); }); diff --git a/package.json b/package.json index 45227d6..d7f7617 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,11 @@ "test": "echo \"Error: no test specified\" && exit 1", "pug": "pug demo --out build", "stylus": "stylus stylesheets/old-browser.styl -o build", - "build": "npm run pug && npm run stylus" + "copy1": "cp bower_components/prism/prism.js build", + "copy2": "cp bower_components/prism/themes/prism.css build", + "copy3": "cp src/check-browser.js build", + "copy4": "cp demo/js/main.js build", + "build": "npm run pug && npm run stylus && npm run copy1 && npm run copy2 && npm run copy3 && npm run copy4" }, "repository": { "type": "git", diff --git a/stylesheets/old-browser__variables.styl b/stylesheets/config.styl similarity index 85% rename from stylesheets/old-browser__variables.styl rename to stylesheets/config.styl index b7cfbd1..72397e2 100644 --- a/stylesheets/old-browser__variables.styl +++ b/stylesheets/config.styl @@ -1,5 +1,3 @@ -/*== Variables ==*/ - $very-light-gray-mostly-white = #f9f9f9 $very-light-gray = #f0f0f0 $light-gray = #c2c2c2 diff --git a/stylesheets/old-browser.styl b/stylesheets/old-browser.styl index cb22d82..84a1414 100644 --- a/stylesheets/old-browser.styl +++ b/stylesheets/old-browser.styl @@ -1,5 +1,5 @@ // Import variables -@require 'old-browser__variables' +@require 'config' .old-browser-warning background: $very-light-gray-mostly-white @@ -78,7 +78,7 @@ /*-- Personal styles --*/ body - padding-top: 70px; /* For fixed top nav bar*/ + padding-top: 70px /* For fixed top nav bar*/ .browser-sprite background: url('../img/old-browser/browser-sprite.png') no-repeat