Skip to content

Commit

Permalink
restore working state
Browse files Browse the repository at this point in the history
  • Loading branch information
IamEmpty committed Jun 8, 2016
1 parent 788b1da commit 2d1679b
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 194 deletions.
155 changes: 0 additions & 155 deletions demo/index.html

This file was deleted.

104 changes: 71 additions & 33 deletions demo/index.pug
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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
Expand All @@ -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
}
});
2 changes: 1 addition & 1 deletion demo/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ $(document).ready(function () {
once: 'Yes',
duration: 1000,
browsers: {
Chrome: 39
Chrome: 52
}
});
});
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/*== Variables ==*/

$very-light-gray-mostly-white = #f9f9f9
$very-light-gray = #f0f0f0
$light-gray = #c2c2c2
Expand Down
4 changes: 2 additions & 2 deletions stylesheets/old-browser.styl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Import variables
@require 'old-browser__variables'
@require 'config'

.old-browser-warning
background: $very-light-gray-mostly-white
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2d1679b

Please sign in to comment.