exception_handler 0.3.45 → 0.4
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 +4 -4
- data/README.md +86 -122
- data/app/assets/images/exception_handler/alert.jpg +0 -0
- data/app/assets/images/exception_handler/alert.png +0 -0
- data/app/assets/images/exception_handler/bg.jpg +0 -0
- data/app/assets/images/exception_handler/bg_overlay.png +0 -0
- data/app/assets/images/exception_handler/close.png +0 -0
- data/app/assets/images/exception_handler/connect/facebook.png +0 -0
- data/app/assets/images/exception_handler/connect/fusion.png +0 -0
- data/app/assets/images/exception_handler/connect/linkedin.png +0 -0
- data/app/assets/images/exception_handler/connect/twitter.png +0 -0
- data/app/assets/images/exception_handler/connect/youtube.png +0 -0
- data/app/assets/images/exception_handler/home.png +0 -0
- data/app/assets/images/exception_handler/noise.png +0 -0
- data/app/assets/images/exception_handler/overlay.png +0 -0
- data/app/assets/stylesheets/exception_handler/error.css.erb +297 -0
- data/app/controllers/exception_handler/exception_controller.rb +13 -6
- data/app/views/exception_handler/exception/show.html.erb +25 -23
- data/app/views/layouts/error.html.erb +17 -73
- data/lib/exception_handler.rb +9 -5
- data/lib/exception_handler/config.rb +9 -3
- data/lib/exception_handler/parser.rb +2 -2
- data/lib/exception_handler/version.rb +1 -1
- data/lib/generators/exception_handler/install_generator.rb +1 -1
- data/lib/generators/exception_handler/migration_generator.rb +12 -2
- data/lib/generators/templates/config.rb +43 -0
- data/lib/generators/templates/{create_table.rb → migration.rb.erb} +2 -2
- data/readme/400.jpg +0 -0
- data/readme/500.jpg +0 -0
- data/readme/application_controller.jpg +0 -0
- data/readme/config.jpg +0 -0
- data/readme/db.jpg +0 -0
- data/readme/db_edit.jpg +0 -0
- data/readme/dev.jpg +0 -0
- data/readme/exception_controller.jpg +0 -0
- data/readme/exceptions_app.png +0 -0
- data/readme/layout.jpg +0 -0
- data/readme/parser.jpg +0 -0
- data/readme/source/title.psd +0 -0
- data/readme/subtitle.jpg +0 -0
- data/readme/title.png +0 -0
- data/readme/view.jpg +0 -0
- metadata +50 -41
- data/app/assets/images/exception_handler/bg.png +0 -0
- data/app/assets/images/exception_handler/contact/facebook.png +0 -0
- data/app/assets/images/exception_handler/contact/fusion.png +0 -0
- data/app/assets/images/exception_handler/contact/linkedin.png +0 -0
- data/app/assets/images/exception_handler/contact/twitter.png +0 -0
- data/app/assets/images/exception_handler/contact/youtube.png +0 -0
- data/lib/generators/templates/exception_handler.rb +0 -25
- data/readme/404.png +0 -0
- data/readme/404_demo.png +0 -0
- data/readme/500.png +0 -0
- data/readme/500_demo.png +0 -0
- data/readme/config.png +0 -0
- data/readme/config_db.png +0 -0
- data/readme/db.png +0 -0
- data/readme/development.png +0 -0
- data/readme/exception_handler.png +0 -0
- data/readme/gem_install.png +0 -0
- data/readme/install.png +0 -0
- data/readme/install_migration.png +0 -0
- data/readme/install_views.png +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59b626c88f86b2004ac659f93be9a15249db6809
|
4
|
+
data.tar.gz: 13a0cd232e3e096df48e6afe04a1a43ebe5de56d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9112518dc66d6f03981325fe72437c7365f748802bb39c562e8185ad15234e9a091a4f09247c8bcd4bd4b4bb1984de67adb4857981c35ff68ed6f61c48a04e3
|
7
|
+
data.tar.gz: 62328b6458cd677c0ff16646a2dcd68449afa5284ab50fc93486989b558d79331b35ffb5773bd04b4cc8ddc66dfbc1175a0d627f62c56ef19a4466a0089b8f1f
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+

|
2
2
|
|
3
3
|
[](http://badge.fury.io/rb/exception_handler)
|
4
4
|
[](https://codeclimate.com/github/richpeck/exception_handler)
|
@@ -7,205 +7,169 @@
|
|
7
7
|
[](https://travis-ci.org/richpeck/exception_handler)
|
8
8
|
|
9
9
|
|
10
|
-
|
10
|
+
----------
|
11
11
|
|
12
|
-
|
12
|
+
Sick of the standard Rails error pages?
|
13
13
|
|
14
|
-
|
15
|
-
when an exception happens. Defaults to ActionDispatch::PublicExceptions.new(Rails.public_path).
|
14
|
+
Need a custom layout to show professional-looking errors in production?
|
16
15
|
|
17
|
-
|
16
|
+
`exception_handler` is exactly what you need!
|
18
17
|
|
19
|
-
|
18
|
+
----------
|
20
19
|
|
21
|
-
|
20
|
+
**ExceptionHandler** provides error handling for Rails 4+ apps *(adapted from [**1**](https://gist.github.com/wojtha/8433843) & [**2**](http://www.sharagoz.com/posts/1-rolling-your-own-exception-handler-in-rails-3))*.
|
22
21
|
|
23
|
-
|
22
|
+
It hooks into the **[`config.exceptions_app`](http://guides.rubyonrails.org/configuring.html#rails-general-configuration)** middleware:
|
24
23
|
|
25
|
-
|
26
|
-
- 500 errors (+ other)
|
24
|
+

|
27
25
|
|
28
|
-
|
26
|
+
With **ExceptionHandler**, you can create custom **404 & 500 production error pages**:
|
29
27
|
|
30
|
-
|
31
|
-
"supporting" functionality is called too. Problem? You're likely going to cause even more errors.
|
28
|
+

|
32
29
|
|
33
|
-
|
34
|
-
You can change them by using the **`rails generate exception_handler:assets --views`**:
|
30
|
+
---
|
35
31
|
|
36
|
-
|
37
|
-
--- | ---
|
38
|
-
 | 
|
39
|
-
Uses **errors** layout | Uses **standard** layout
|
40
|
-
|
41
|
-
-----------
|
42
|
-
|
43
|
-
####Saving Errors To DB
|
44
|
-
|
45
|
-
Adapted & refactored from [this tutorial](http://www.sharagoz.com/posts/1-rolling-your-own-exception-handler-in-rails-3)
|
46
|
-
|
47
|
-
Sometimes, you want to save your errors to your database (admin areas, multi-tenant apps, etc). We've included some middleware which captures the exceptions & saves them to the db:
|
48
|
-
|
49
|
-
- Model (class) Name
|
50
|
-
- Error Message
|
51
|
-
- Stack trace
|
52
|
-
- Target URL
|
53
|
-
- Referrer URL
|
54
|
-
- Params
|
55
|
-
- User Agent (Browser Details)
|
32
|
+
**ExceptionHandler** catches errors in the middleware hook (`config.exceptions_app`), channeling the users to our [custom `exceptions` controller](blob/master/app/controllers/exception_handler/exception_controller.rb). It then dissects data such as the `message`, `details`, `user agent`, etc, redirect the user to a `custom view`, storing it in the db:
|
56
33
|
|
57
|
-
|
58
|
-
|
34
|
+
**40x Errors** | **50x Errors**
|
35
|
+
--- | ---
|
36
|
+
") | ")
|
37
|
+
**layouts/application.html.erb** | **layouts/errors.html.erb**
|
59
38
|
|
60
|
-

|
61
39
|
|
62
|
-
|
40
|
+
All exceptions in Rails are handled by the [`ActiveDispatch::ShowExceptions`](https://github.com/rails/rails/blob/4-0-stable/actionpack/lib/action_dispatch/middleware/show_exceptions.rb) middleware.
|
63
41
|
|
64
|
-
|
42
|
+
This is invoked through a hook called `config.exceptions_app`, accessed through the `environment` files of rails `application.rb`, `environments/development.rb`, `environments/production.rb` etc.
|
65
43
|
|
66
|
-
|
67
|
-
- rails generate exception_handler:migration #-> will create migration (for `errors` table)
|
68
|
-
- rake db:migrate #-> creates `errors` table
|
44
|
+
Whilst it's common practice to use `config.exceptions_app = self.routes` to send exceptions to your routes, `ExceptionHandler` hooks directly into the middleware, giving us access to all the data:
|
69
45
|
|
70
|
-
|
71
|
-
- ExceptionHandler.setup do |config|
|
72
|
-
- config.db = true
|
73
|
-
- end
|
46
|
+

|
74
47
|
|
75
|
-
|
48
|
+
----------
|
76
49
|
|
77
50
|
## Installation
|
78
51
|
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
Add this line to your application's Gemfile:
|
52
|
+
gem install 'exception_handler'
|
53
|
+
|
54
|
+
or
|
84
55
|
|
85
|
-
|
86
|
-
|
87
|
-
And then execute:
|
56
|
+
gem 'exception_handler', '~> 0.4' # Gemfile
|
88
57
|
|
89
58
|
$ bundle
|
90
59
|
|
91
|
-
|
92
|
-
|
93
|
-
$ gem install exception_handler
|
94
|
-
|
95
|
-

|
60
|
+
You can see [`ExceptionHandler` on RubyGems](https://rubygems.org/gems/exception_handler)
|
96
61
|
|
97
62
|
--
|
98
63
|
|
99
|
-
|
100
|
-
|
101
|
-
Run:
|
64
|
+
##### Config
|
102
65
|
|
103
|
-
|
66
|
+
*Optional*
|
104
67
|
|
105
|
-
|
68
|
+
If you wish to change any of the default settings (listed below), run the following command:
|
106
69
|
|
107
|
-
|
108
|
-
access to the configuration options which can change the gem's behavior:
|
70
|
+
$ rails g exception_handler:install
|
109
71
|
|
110
|
-

|
111
73
|
|
112
|
-
|
74
|
+
This will deploy a file to `config/initializers/exception_handler.rb`, which you'll be able to edit as required.
|
113
75
|
|
114
|
-
|
76
|
+
You can run `ExceptionHandler` just from the `gem` if you wish.
|
115
77
|
|
116
|
-
|
78
|
+
--
|
117
79
|
|
118
|
-
|
80
|
+
##### DB
|
119
81
|
|
120
|
-
|
82
|
+
*Optional*
|
121
83
|
|
122
|
-
|
84
|
+
If you want to set up database support (IE have exceptions saved to a table), you need to create a migration:
|
123
85
|
|
124
|
-
|
86
|
+
$ rails generate exception_handler:migration
|
87
|
+
$ rake db:migrate
|
125
88
|
|
126
|
-

|
127
90
|
|
91
|
+
This is an optional step. If you want to save the data, you will also need to ensure your `config.db` option is correct:
|
128
92
|
|
129
|
-
|
93
|
+

|
130
94
|
|
131
|
-
|
95
|
+
--
|
132
96
|
|
133
|
-
|
97
|
+
##### Views
|
134
98
|
|
135
|
-
|
99
|
+
*Optional*
|
136
100
|
|
137
|
-
|
138
|
-
$ rails generate exception_handler:install #-> installs "config" file (initializer)
|
101
|
+
If you want to change the views, you can have them put into your app:
|
139
102
|
|
140
|
-
|
103
|
+
$ rails generate exception_handler:views #-> controller, models, views & assets
|
104
|
+
$ rails generate exception_handler:views -v views controllers models assets #-> remove as appropriate to install individual assets
|
141
105
|
|
106
|
+
The views will be appended to your app, and you'll be able to edit them as required.
|
142
107
|
|
143
|
-
|
144
|
-
$ rails generate exception_handler:migration #-> generates migration for "errors" table
|
108
|
+
---
|
145
109
|
|
146
|
-
|
110
|
+
###### Show
|
147
111
|
|
112
|
+

|
148
113
|
|
149
|
-
|
150
|
-
$ rails generate exception_handler:views #-> controller, models, views & assets
|
151
|
-
$ rails generate exception_handler:views -v views controllers models assets #-> remove as appropriate to install individual assets
|
114
|
+
The view is located in `app/views/exception_handler/show.html.erb` designed to work for all exceptions.
|
152
115
|
|
153
|
-
|
116
|
+
By default, it is split for use with different layouts, data being available to both.
|
154
117
|
|
118
|
+
This works exactly the same as the other views in your app (IE the `exceptions` controller invokes the `show` action)
|
155
119
|
|
120
|
+
---
|
156
121
|
|
157
|
-
|
122
|
+
###### Layout
|
158
123
|
|
159
|
-
|
124
|
+
One of the most critial aspects of **ExceptionHandler** is the custom `Error` layout.
|
160
125
|
|
161
|
-
|
126
|
+
If you want to change the layout (for 500 error pages), you need to use the following:
|
162
127
|
|
163
|
-
|
164
|
-
you'll need to make your app process requests as `production` for now. This is a temporary step, and will be
|
165
|
-
resolved in a new version:
|
128
|
+

|
166
129
|
|
167
|
-
|
168
|
-
config.consider_all_requests_local = false # true
|
130
|
+
----------
|
169
131
|
|
170
|
-
|
132
|
+
### Development
|
171
133
|
|
172
|
-
|
134
|
+
`config.exceptions_app` is only used in Rails' **production** environment.
|
173
135
|
|
174
|
-
|
136
|
+
If you wish to test the gem in dev, you'll need to make your app process requests as production for now. This is a temporary step, and will be resolved in a new version:
|
175
137
|
|
176
|
-
|
138
|
+

|
177
139
|
|
178
|
-
|
140
|
+
You should change this setting if you wish to test your styling in development mode. It should be temporary (you need to change it back once you have it looking how you like)
|
179
141
|
|
180
|
-
|
142
|
+
### Usable_Type & Usable_ID
|
181
143
|
|
182
|
-
|
144
|
+
----------
|
183
145
|
|
184
|
-
|
185
|
-
:---: | :---:
|
186
|
-
[](http://firststopcosmeticshop.co.uk/sdfsdf/sdf/sdfsdf) | [](http://firststopcosmeticshop.co.uk/search/fasdfasdfasdfasdfasdf)
|
187
|
-
[Link](http://firststopcosmeticshop.co.uk/sdfsdf/sdf/sdfsdf) | [Link](http://firststopcosmeticshop.co.uk/search/fasdfasdfasdfasdfasdf)
|
146
|
+
## Bugs
|
188
147
|
|
148
|
+
1. `ApplicationController`
|
189
149
|
|
190
|
-
|
150
|
+

|
151
|
+
|
152
|
+
A significant issue exists in respect to the inheritance of `exceptions_controller`.
|
153
|
+
Our current version (`0.4`) inherits from the `ApplicationController`. This causes a problem for many applications.
|
191
154
|
|
192
|
-
|
155
|
+
If you use any sort of `before_action` callback in your controller, especially to populate variables, this
|
156
|
+
will cause untold problems in your `exceptions_controller`.
|
193
157
|
|
194
|
-
|
158
|
+
`500` errors are server faults; trying to get the server to call more data will simply not work. It causes
|
159
|
+
an exception loop, leading to catastrophic failure.
|
195
160
|
|
196
|
-
1. Watching this [**video tutorial**](http://www.youtube.com/watch?v=Zo2vav3dYnY):
|
197
161
|
|
198
|
-
|
199
|
-
2. Read [**our tutorial**](http://google.com)
|
200
|
-
3. Ask on [**StackOverflow**](http://stackoverflow.com)
|
201
|
-
4. Go on the [**gem support page**](http://frontlineutilities.co.uk)
|
162
|
+
## Support
|
202
163
|
|
203
|
-
|
164
|
+
- Watch the video tutorial (soon)
|
165
|
+
- [Create an "issue"](https://github.com/richpeck/exception_handler/issues)
|
166
|
+
- Contact support (soon)
|
167
|
+
- [Ask on StackOverflow](http://stackoverflow.com/questions/ask?tags=exception_handler&ruby_on_rails)
|
204
168
|
|
205
|
-
##
|
169
|
+
## Contribution
|
206
170
|
|
207
171
|
1. Fork it ( https://github.com/richpeck/exception_handler/fork )
|
208
172
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
209
173
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
210
174
|
4. Push to the branch (`git push origin my-new-feature`)
|
211
|
-
5. Create a new Pull Request
|
175
|
+
5. Create a new Pull Request
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,297 @@
|
|
1
|
+
/* Vars */
|
2
|
+
<% size = 20 %>
|
3
|
+
<% opacity = 0.85 %>
|
4
|
+
<% footer = 50 %>
|
5
|
+
<% radius = 5 %>
|
6
|
+
<% title_bg = "rgba(227,11,11,1)" %>
|
7
|
+
|
8
|
+
|
9
|
+
/* Responsive */
|
10
|
+
@media screen and (max-width: 950px) {
|
11
|
+
html { background-size: cover !important; }
|
12
|
+
.container .error { width: 55% !important; }
|
13
|
+
}
|
14
|
+
|
15
|
+
/* Styling */
|
16
|
+
* { margin: 0; }
|
17
|
+
html, body, .container { height: 100%; }
|
18
|
+
html {
|
19
|
+
height: 100%;
|
20
|
+
background: #010008 url(<%= asset_url("exception_handler/bg.jpg") %>) top left no-repeat;
|
21
|
+
background-size: 100% 100%;
|
22
|
+
}
|
23
|
+
body {
|
24
|
+
font-family: Helvetica, Arial, Sans-Serif;
|
25
|
+
font-size: 14px;
|
26
|
+
text-transform: capitalize;
|
27
|
+
}
|
28
|
+
body:before,
|
29
|
+
body:after {
|
30
|
+
content: "";
|
31
|
+
position: absolute;
|
32
|
+
top: 0;
|
33
|
+
left: 0;
|
34
|
+
width: 100%;
|
35
|
+
height: 100%;
|
36
|
+
z-index: 1000;
|
37
|
+
}
|
38
|
+
body:before{ background-image: url(<%=asset_url("exception_handler/noise.png") %>); background-repeat: repeat; }
|
39
|
+
body:after{ background-image: url(<%=asset_url("exception_handler/bg_overlay.png") %>); background-repeat: no-repeat; }
|
40
|
+
|
41
|
+
a { color: #fff; text-decoration: none; }
|
42
|
+
a:hover { text-decoration: underline; }
|
43
|
+
|
44
|
+
.container {
|
45
|
+
position: relative;
|
46
|
+
min-height: 100%;
|
47
|
+
overflow-y: hidden; /* Shouldn't need to have this */
|
48
|
+
margin-bottom: -<%= footer * 1.2 %>px;
|
49
|
+
z-index: 1100;
|
50
|
+
}
|
51
|
+
|
52
|
+
.container .error {
|
53
|
+
display: block;
|
54
|
+
margin: 10% auto 0;
|
55
|
+
width: 25%;
|
56
|
+
color: #000;
|
57
|
+
text-align: center;
|
58
|
+
overflow: hidden;
|
59
|
+
background: rgba(255,255,255,1);
|
60
|
+
border: 1px solid rgba(0,0,0,1);
|
61
|
+
border-radius: <%= radius %>px;
|
62
|
+
|
63
|
+
-moz-background-clip: padding;
|
64
|
+
-webkit-background-clip: padding-box;
|
65
|
+
background-clip: padding-box;
|
66
|
+
|
67
|
+
-webkit-transition: width 0.15s ease-in-out;
|
68
|
+
-moz-transition: width 0.15s ease-in-out;
|
69
|
+
-ms-transition: width 0.15s ease-in-out;
|
70
|
+
-o-transition: width 0.15s ease-in-out;
|
71
|
+
transition: width 0.15s ease-in-out;
|
72
|
+
}
|
73
|
+
|
74
|
+
.container .error img.alert {
|
75
|
+
display: block;
|
76
|
+
margin: 0 auto 20px auto;
|
77
|
+
}
|
78
|
+
|
79
|
+
.container .message > * { display: block; }
|
80
|
+
.container .message .title {
|
81
|
+
display: block;
|
82
|
+
position: relative;
|
83
|
+
font-weight: bold;
|
84
|
+
font-size: 0.85em;
|
85
|
+
margin: 0;
|
86
|
+
color: rgba(255,255,255,1);
|
87
|
+
background: <%= title_bg %>;
|
88
|
+
padding: 12px 15px;
|
89
|
+
text-align: left;
|
90
|
+
text-shadow: 0px 1px 0px rgba(0,0,0,1);
|
91
|
+
overflow-y: hidden;
|
92
|
+
|
93
|
+
/* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#7a07ed+0,000000+100&0+0,1+100 */
|
94
|
+
background: <%= title_bg %> -moz-linear-gradient(top, rgba(227,11,11,0) 0%, rgba(0,0,0,0.4) 100%); /* FF3.6+ */
|
95
|
+
background: <%= title_bg %> -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(227,11,11,0)), color-stop(100%,rgba(0,0,0,0.4))); /* Chrome,Safari4+ */
|
96
|
+
background: <%= title_bg %> -webkit-linear-gradient(top, rgba(227,11,11,0) 0%,rgba(0,0,0,0.4) 100%); /* Chrome10+,Safari5.1+ */
|
97
|
+
background: <%= title_bg %> -o-linear-gradient(top, rgba(227,11,11,0) 0%,rgba(0,0,0,0.4) 100%); /* Opera 11.10+ */
|
98
|
+
background: <%= title_bg %> -ms-linear-gradient(top, rgba(227,11,11,0) 0%,rgba(0,0,0,0.4) 100%); /* IE10+ */
|
99
|
+
background: <%= title_bg %> linear-gradient(to bottom, rgba(227,11,11,0) 0%,rgba(0,0,0,0.4) 100%); /* W3C */
|
100
|
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#007a07ed', endColorstr='#000000',GradientType=0 ); /* IE6-9 */
|
101
|
+
}
|
102
|
+
.container .message .title:before,
|
103
|
+
.container .message .title:after {
|
104
|
+
position: absolute;
|
105
|
+
content: "";
|
106
|
+
width: 100%;
|
107
|
+
left: 0;
|
108
|
+
}
|
109
|
+
.container .message .title:before {
|
110
|
+
position: absolute;
|
111
|
+
content: "";
|
112
|
+
width: 100%;
|
113
|
+
left: 0;
|
114
|
+
height: 100%;
|
115
|
+
top: 0;
|
116
|
+
background: url(<%= asset_url("exception_handler/overlay.png") %>) repeat;
|
117
|
+
background-size: 100%;
|
118
|
+
}
|
119
|
+
.container .message .title:after {
|
120
|
+
height: 1px;
|
121
|
+
background: rgba(255,255,255,0.1);
|
122
|
+
bottom: 0px;
|
123
|
+
}
|
124
|
+
.container .message .title a.close {
|
125
|
+
float: right;
|
126
|
+
position: relative;
|
127
|
+
top: 2px;
|
128
|
+
right: -2px;
|
129
|
+
}
|
130
|
+
.container .message .title a.close img {
|
131
|
+
width: 12px;
|
132
|
+
|
133
|
+
-webkit-transition: opacity 0.15s ease-in-out;
|
134
|
+
-moz-transition: opacity 0.15s ease-in-out;
|
135
|
+
-ms-transition: opacity 0.15s ease-in-out;
|
136
|
+
-o-transition: opacity 0.15s ease-in-out;
|
137
|
+
transition: opacity 0.15s ease-in-out;
|
138
|
+
}
|
139
|
+
.container .message .title a.close:hover img { opacity: 0.75; }
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
.container .message .details {
|
144
|
+
position: relative;
|
145
|
+
margin: 0;
|
146
|
+
padding: 0;
|
147
|
+
height: 310px;
|
148
|
+
width: 100%;
|
149
|
+
background-image: url(<%= asset_url("exception_handler/alert.jpg") %>);
|
150
|
+
background-repeat: no-repeat;
|
151
|
+
background-size: cover;
|
152
|
+
background-position: center top;
|
153
|
+
}
|
154
|
+
.container .message .details:before,
|
155
|
+
.container .message .details:after {
|
156
|
+
display: block;
|
157
|
+
content: "";
|
158
|
+
position: absolute;
|
159
|
+
left: 0;
|
160
|
+
top: 0;
|
161
|
+
width: 100%;
|
162
|
+
z-index: 1000;
|
163
|
+
}
|
164
|
+
.container .message .details:after {
|
165
|
+
height: 2px;
|
166
|
+
|
167
|
+
/* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#000000+0,000000+100&1+0,0+100 */
|
168
|
+
background: -moz-linear-gradient(top, rgba(0,0,0,0.485) 0%, rgba(0,0,0,0) 100%); /* FF3.6+ */
|
169
|
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(0,0,0,0.85)), color-stop(100%,rgba(0,0,0,0))); /* Chrome,Safari4+ */
|
170
|
+
background: -webkit-linear-gradient(top, rgba(0,0,0,0.85) 0%,rgba(0,0,0,0) 100%); /* Chrome10+,Safari5.1+ */
|
171
|
+
background: -o-linear-gradient(top, rgba(0,0,0,0.85) 0%,rgba(0,0,0,0) 100%); /* Opera 11.10+ */
|
172
|
+
background: -ms-linear-gradient(top, rgba(0,0,0,0.85) 0%,rgba(0,0,0,0) 100%); /* IE10+ */
|
173
|
+
background: linear-gradient(to bottom, rgba(0,0,0,0.85) 0%,rgba(0,0,0,0) 100%); /* W3C */
|
174
|
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#000000', endColorstr='#00000000',GradientType=0 ); /* IE6-9 */
|
175
|
+
|
176
|
+
}
|
177
|
+
.container .message .details:before {
|
178
|
+
height: 100%;
|
179
|
+
outline-offset: -1px;
|
180
|
+
outline: 1px solid rgba(255,255,255,0.1);
|
181
|
+
}
|
182
|
+
.container .message .details img {
|
183
|
+
margin: 10% 0 0 0;
|
184
|
+
padding: 0;
|
185
|
+
}
|
186
|
+
.container .message .details .status {
|
187
|
+
position: absolute;
|
188
|
+
left: 0;
|
189
|
+
bottom: 0;
|
190
|
+
width: 100%;
|
191
|
+
color: #fff;
|
192
|
+
padding: 1em 15px;
|
193
|
+
font-size: 1.1em;
|
194
|
+
font-weight: bold;
|
195
|
+
background: rgba(0,0,0,0.5);
|
196
|
+
text-align: left;
|
197
|
+
}
|
198
|
+
|
199
|
+
.container .message .info {
|
200
|
+
display: block;
|
201
|
+
padding-top: 15px;
|
202
|
+
margin: auto;
|
203
|
+
font-size: 0.75em;
|
204
|
+
background: rgba(232,232,232,1);
|
205
|
+
}
|
206
|
+
.container .message .info > * {
|
207
|
+
display: block;
|
208
|
+
padding-left: 15px;
|
209
|
+
padding-right: 15px;
|
210
|
+
}
|
211
|
+
.container .message > .info h2 {
|
212
|
+
margin: 10px 0;
|
213
|
+
font-size: 1.75em;
|
214
|
+
text-align: left;
|
215
|
+
}
|
216
|
+
.container .message > .info .notification {
|
217
|
+
display: block;
|
218
|
+
position: relative;
|
219
|
+
clear: both;
|
220
|
+
margin: 20px 0 0;
|
221
|
+
padding-top: 5px;
|
222
|
+
padding-bottom: 5px;
|
223
|
+
text-align: left;
|
224
|
+
background: rgba(205,205,205,1);
|
225
|
+
border-top: 1px solid rgba(175,175,175,1);
|
226
|
+
}
|
227
|
+
.container .message > .info .notification > * { vertical-align: middle; }
|
228
|
+
.container .message > .info .notification strong {
|
229
|
+
display: inline-block;
|
230
|
+
max-width: 75%;
|
231
|
+
text-overflow: ellipsis;
|
232
|
+
white-space: nowrap;
|
233
|
+
overflow-x: hidden;
|
234
|
+
}
|
235
|
+
.container .message > .info .notification .version {
|
236
|
+
display: inline-block;
|
237
|
+
text-transform: lowercase;
|
238
|
+
padding: 0 15px 0 0;
|
239
|
+
margin: 0 10px 0 0;
|
240
|
+
border-right: 1px solid rgba(175,175,175,1);
|
241
|
+
}
|
242
|
+
.container .message > .info .notification a.home {
|
243
|
+
float: right;
|
244
|
+
position: relative;
|
245
|
+
right: -6px;
|
246
|
+
opacity: <%= opacity * 0.5 %>;
|
247
|
+
|
248
|
+
-webkit-transition: opacity 0.15s ease-in-out;
|
249
|
+
-moz-transition: opacity 0.15s ease-in-out;
|
250
|
+
-ms-transition: opacity 0.15s ease-in-out;
|
251
|
+
-o-transition: opacity 0.15s ease-in-out;
|
252
|
+
transition: opacity 0.15s ease-in-out;
|
253
|
+
}
|
254
|
+
.container .message > .info .notification a.home:hover { opacity: <%= opacity %>; }
|
255
|
+
.container .message > .info .notification a.home img { height: 12px; }
|
256
|
+
|
257
|
+
/* Footer */
|
258
|
+
footer {
|
259
|
+
display: block;
|
260
|
+
position: relative;
|
261
|
+
vertical-align: middle;
|
262
|
+
clear: both;
|
263
|
+
color: #fff;
|
264
|
+
margin: 15px auto 0;
|
265
|
+
padding: 14px 1%;
|
266
|
+
box-sizing: border-box;
|
267
|
+
max-height: <%= footer %>;
|
268
|
+
z-index: 1100;
|
269
|
+
}
|
270
|
+
|
271
|
+
footer .app { text-transform: uppercase; }
|
272
|
+
footer .app strong { font-size: 1em; letter-spacing: 1px; }
|
273
|
+
footer .app span { font-size: 0.9em; }
|
274
|
+
|
275
|
+
footer .connect {
|
276
|
+
display: block;
|
277
|
+
float: right;
|
278
|
+
clear: both;
|
279
|
+
text-align: center;
|
280
|
+
}
|
281
|
+
|
282
|
+
footer .connect:hover a { opacity: <%= opacity * 0.5 %>; }
|
283
|
+
footer .connect a {
|
284
|
+
display: inline-block;
|
285
|
+
opacity: <%= opacity * 0.7 %>;
|
286
|
+
padding-left: 4px;
|
287
|
+
margin: 0 -1px; /* Use 0 -1px for inline block & ERB - HAML removes whitespace; ERB does now - http://haml.info/docs/yardoc/file.REFERENCE.html#whitespace_removal__and_ */
|
288
|
+
transition: opacity 0.2s ease;
|
289
|
+
}
|
290
|
+
|
291
|
+
footer .connect a img { display: block; vertical-align: middle; }
|
292
|
+
footer .connect a.facebook img { height: <%= size * 0.85 %>px; }
|
293
|
+
footer .connect a.twitter img { height: <%= size * 0.85 %>px; }
|
294
|
+
footer .connect a.linkedin img { height: <%= size * 0.9 %>px; }
|
295
|
+
footer .connect a.youtube img { height: <%= size * 0.875 %>px; }
|
296
|
+
footer .connect a.fusion img { height: <%= size %>px; }
|
297
|
+
footer .connect:hover a:hover { opacity: 1; }
|