Skip to content

Commit 2d1679b

Browse files
author
IamEmpty
committed
restore working state
1 parent 788b1da commit 2d1679b

File tree

6 files changed

+79
-194
lines changed

6 files changed

+79
-194
lines changed

demo/index.html

Lines changed: 0 additions & 155 deletions
This file was deleted.

demo/index.pug

Lines changed: 71 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@ html(lang='en')
44
meta(charset='utf-8')
55
title Check browser plugin demonstration
66
//- Latest compiled and minified Bootstrap CSS
7-
link(rel='stylesheet', href='//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css')
7+
link(rel='stylesheet', href='http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css')
88
//- Styles for design of warning block
99
link(rel='stylesheet', href='old-browser.css')
1010
//- SyntaxHighlighter style
11-
link(rel='stylesheet', href='css/prism.css')
11+
link(rel='stylesheet', href='prism.css')
1212
//- Add jquery
13-
script(src='//code.jquery.com/jquery-1.11.0.min.js')
13+
script(src='https://code.jquery.com/jquery-1.11.0.min.js')
1414
//- Latest compiled and minified Bootstrap JavaScript
15-
script(src='//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js')
15+
script(src='https://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js')
1616
//- Add plugin Check browser
17-
script(src='js/check-browser-plugin.js')
17+
script(src='check-browser.js')
1818
//- Syntax highlighter Prism js
19-
script(src='js/prism.js')
19+
script(src='prism.js')
2020
//- Own main javascript file
21-
script(src='js/main.js')
21+
script(src='main.js')
2222
body(data-spy='scroll', data-target='#bs-example-navbar-collapse-1', data-offset='170')
2323
header.header
2424
nav.navbar.navbar-default.navbar-fixed-top(role='navigation')
@@ -40,24 +40,20 @@ html(lang='en')
4040
//- Provides extra visual weight and identifies the primary action in a set of buttons
4141
li
4242
button.navbar-btn.btn.btn-primary(type='button') Download
43-
//- .navbar-collapse
44-
//- .container-fluid
43+
4544
main.container
4645
.row
4746
.col-md-12
4847
h1#home The check browser version plugin
4948
p Latest version is 1.0.0
50-
p
51-
| You can use default view of this plugin look like so (See under) or create himself warning block
49+
p You can use default view of this plugin look like so (See under) or create himself warning block
5250
.row
5351
.col-md-12
5452
.old-browser-warning
5553
.old-browser-warning__left-side
5654
h3.text-primary.h3 Warning!
57-
p.old-browser-warning__text
58-
| You use the oldest version of a browser. It may be a reason of incorrect work and view of a website.
59-
p.old-browser-warning__text
60-
| For comfortable work, please download latest version of a browser convenient for you from official website.
55+
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.
56+
p.old-browser-warning__text For comfortable work, please download latest version of a browser convenient for you from official website.
6157
p.old-browser-warning__text
6258
| Please read our
6359
a.old-browser-warning__link(href='#') documentation
@@ -70,24 +66,66 @@ html(lang='en')
7066
i#close-old-browser-warning.icon-remove(title='Close')
7167
.row
7268
.col-md-12
73-
p
74-
| For begin you need check - you use jquery or not use? If you not add jquery plugin - you need do it
69+
p For begin you need check - you use jquery or not use? If you not add jquery plugin - you need do it
7570
p And inicialize plugin
76-
pre.
77-
\n
71+
pre
72+
code.language-javascript.
73+
$(document).ready(function () {
74+
$('body').checkBrowser();
75+
});
76+
7877
p All supported params:
79-
pre.
80-
\n
78+
pre
79+
code.language-javascript.
80+
$(document).ready(function () {
81+
$('body').checkBrowser({
82+
once: 'No',
83+
warningBoxName: '.old-browser-warning',
84+
closeBtnName: '#close-old-browser-warning',
85+
duration: 1200,
86+
easing: 'swing',
87+
88+
browsers: {
89+
Firefox: 27,
90+
Chrome: 30,
91+
Opera: 15,
92+
IE: 10
93+
}
94+
});
95+
});
8196
p In this option you can change amount of show
82-
pre.
83-
\n
84-
pre.
85-
\n
86-
pre.
87-
\n
88-
pre.
89-
\n
90-
pre.
91-
\n
92-
pre.
93-
\n
97+
pre
98+
code.language-javascript.
99+
$('body').checkBrowser({
100+
once: 'No'
101+
});
102+
pre
103+
code.language-javascript.
104+
$('body').checkBrowser({
105+
warningBoxName: '.old-browser-warning'
106+
});
107+
pre
108+
code.language-javascript.
109+
$('body').checkBrowser({
110+
closeBtnName: '#close-old-browser-warning'
111+
});
112+
pre
113+
code.language-javascript.
114+
$('body').checkBrowser({
115+
duration: 1200
116+
});
117+
pre
118+
code.language-javascript.
119+
$('body').checkBrowser({
120+
easing: 'swing'
121+
});
122+
pre
123+
code.language-javascript.
124+
$('body').checkBrowser({
125+
browsers: {
126+
Firefox: 27,
127+
Chrome: 30,
128+
Opera: 15,
129+
IE: 10
130+
}
131+
});

demo/js/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ $(document).ready(function () {
33
once: 'Yes',
44
duration: 1000,
55
browsers: {
6-
Chrome: 39
6+
Chrome: 52
77
}
88
});
99
});

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77
"test": "echo \"Error: no test specified\" && exit 1",
88
"pug": "pug demo --out build",
99
"stylus": "stylus stylesheets/old-browser.styl -o build",
10-
"build": "npm run pug && npm run stylus"
10+
"copy1": "cp bower_components/prism/prism.js build",
11+
"copy2": "cp bower_components/prism/themes/prism.css build",
12+
"copy3": "cp src/check-browser.js build",
13+
"copy4": "cp demo/js/main.js build",
14+
"build": "npm run pug && npm run stylus && npm run copy1 && npm run copy2 && npm run copy3 && npm run copy4"
1115
},
1216
"repository": {
1317
"type": "git",

stylesheets/old-browser__variables.styl renamed to stylesheets/config.styl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/*== Variables ==*/
2-
31
$very-light-gray-mostly-white = #f9f9f9
42
$very-light-gray = #f0f0f0
53
$light-gray = #c2c2c2

stylesheets/old-browser.styl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Import variables
2-
@require 'old-browser__variables'
2+
@require 'config'
33

44
.old-browser-warning
55
background: $very-light-gray-mostly-white
@@ -78,7 +78,7 @@
7878
/*-- Personal styles --*/
7979

8080
body
81-
padding-top: 70px; /* For fixed top nav bar*/
81+
padding-top: 70px /* For fixed top nav bar*/
8282

8383
.browser-sprite
8484
background: url('../img/old-browser/browser-sprite.png') no-repeat

0 commit comments

Comments
 (0)