browser_warrior 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aec36d9d5a3ef627496379991ab4edad647cdc0e
4
- data.tar.gz: eefa9a4ad8c935c70d760820e483a6fc19ab2007
3
+ metadata.gz: 4b558de70b5f31ae83c9b4e6b63f9e0bf440e3d4
4
+ data.tar.gz: efdefbc83f4753aea608eca81b952d0e2d8e64f8
5
5
  SHA512:
6
- metadata.gz: 70ea3c1fafc777500a5ee7cc27daf5e080ddb4132f34f7b1bd685a7c470ad5e9fc528a0586bacac49fe0b4cb6de898cc78cd15b80527deb5eee98d1d35855025
7
- data.tar.gz: 23349cbe405716c1bef53e767f2f608421735c070da99338897137038ba4088e2f931f55eb23ea6c270bc866309b4de29adeb97ecaa62a91aca764bd02f6eb66
6
+ metadata.gz: aa3c294ffbb1da83f7d587a823ad701b42402460937d2c4199e4311f855066bf0ff03cb95cea51463926fe7bd0ac833c306b3778d82b7e06b06a5339f157d7d0
7
+ data.tar.gz: bd82c93fd1f9f434d9c1f9051c94e1f4649571ee1c47fd06fb1a4f068376ef7dabe96ead37544274d21136815fce63689410965e87dd80967382856ecb7c6821
data/README.md CHANGED
@@ -48,7 +48,6 @@ See more: <https://github.com/fnando/browser#usage>
48
48
  Sure. Execute:
49
49
 
50
50
  ```bash
51
- # We are doing more work on it
52
51
  $ rails g browser_warrior:views
53
52
  ```
54
53
 
@@ -57,10 +56,29 @@ Then edit them.
57
56
 
58
57
  Easy, is it?
59
58
 
60
- ## TODO
59
+ ## i18n
60
+
61
+ `BrowserWarrior` will render the correct page based on your i18n locale config.
62
+
63
+ Now it supports `en` and `zh-CN`.
64
+
65
+ You can easily add more locale pages.
66
+
67
+ ## Extra Good Advise
68
+
69
+ I advise adding the code below to your base layout( e.g. `application.html.erb` ):
70
+
71
+ ```html
72
+ // app/layouts/application.html.erb
73
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
74
+ <meta name="renderer" content="webkit" />
75
+ ```
76
+
77
+
78
+ ## Roadmap
61
79
 
62
80
  - [x] Release 0.1.0, one line code to support rejecting old browser page
63
- - [ ] I18n support
81
+ - [x] I18n support ( 0.3.0 )
64
82
  - [ ] Extend support rails 4 and rails 3.
65
83
  - [ ] Design a mechanism to support more than one themes.
66
84
 
@@ -0,0 +1,46 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Unsupported Browser</title>
5
+ <%= stylesheet_link_tag "browser_warrior/application", media: "all" %>
6
+ </head>
7
+ <body>
8
+ <div class="browser-warrior-mask">
9
+ <div class="browser-warrior-dialog" id="browser-warrior-dialog">
10
+ <div class="browser-warrior-text">
11
+ <h1 class="browser-warrior-title">You are using old IE browser!</h1>
12
+ <p class="browser-warrior-para">
13
+ This browser maybe cause security problem, and it will be a bad user experience to visit our website.
14
+ </p>
15
+ <p class="browser-warrior-para">
16
+ Wrong text location, confused layout, not-worked feature maybe happen.
17
+ </p>
18
+ <p class="browser-warrior-para">
19
+ We do NOT support your browser, please see these below:
20
+ </p>
21
+ <div class="browser-warrior-para">
22
+ <a class="browser-warrior-browser-link" href="https://www.google.com/search?q=chrome" target="_blank" hidefocus>
23
+ <i class="browser-warrior-browser-icon browser-warrior-browser-icon-chrome"></i>
24
+ Chrome Browser
25
+ </a>
26
+ <a class="browser-warrior-browser-link" href="https://www.google.com/search?q=firefox" target="_blank" hidefocus>
27
+ <i class="browser-warrior-browser-icon browser-warrior-browser-icon-firefox"></i>
28
+ Firefox Browser
29
+ </a>
30
+ <a class="browser-warrior-browser-link" href="https://www.google.com/search?q=opera" target="_blank" hidefocus>
31
+ <i class="browser-warrior-browser-icon browser-warrior-browser-icon-opera"></i>
32
+ Opera Browser
33
+ </a>
34
+ <a class="browser-warrior-browser-link" href="https://www.google.com/search?q=ie" target="_blank" hidefocus>
35
+ <i class="browser-warrior-browser-icon browser-warrior-browser-icon-ie"></i>
36
+ Upgrade your IE Browser
37
+ </a>
38
+ </div>
39
+ <p class="browser-warrior-para">
40
+ Please choose and install one, then visit our website again.
41
+ </p>
42
+ </div>
43
+ </div>
44
+ </div>
45
+ </body>
46
+ </html>
@@ -1,3 +1,3 @@
1
1
  module BrowserWarrior
2
- VERSION = '0.2.0'
2
+ VERSION = '0.3.0'
3
3
  end
@@ -6,6 +6,7 @@ module BrowserWarrior
6
6
 
7
7
  def copy_views
8
8
  copy_file "app/views/browser_warrior/index.html.erb", "app/views/browser_warrior/index.html.erb"
9
+ copy_file "app/views/browser_warrior/index.en.html.erb", "app/views/browser_warrior/index.en.html.erb"
9
10
  end
10
11
 
11
12
  def copy_css_image
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: browser_warrior
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - yafeilee
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-23 00:00:00.000000000 Z
11
+ date: 2016-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -96,6 +96,7 @@ files:
96
96
  - app/assets/images/browser_warrior/ie.png
97
97
  - app/assets/images/browser_warrior/opera.png
98
98
  - app/assets/stylesheets/browser_warrior/application.scss
99
+ - app/views/browser_warrior/index.en.html.erb
99
100
  - app/views/browser_warrior/index.html.erb
100
101
  - lib/browser_warrior.rb
101
102
  - lib/browser_warrior/engine.rb