bard-staging_banner 0.3.3 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bard/staging_banner/middleware.rb +8 -4
- data/lib/bard/staging_banner/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d1aaf62e6c42301469ece0151c0d196397f904ad572ccb9784bdffd4aa3890a1
|
4
|
+
data.tar.gz: 698bd47d92c66ff0074888f94676c63842e7e98362dac273d52dfd15164e38e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 93eb4b0a7dc19dac71aa20604c5f90aed4e050b12ee0e85accec05d42566e0d9cb595650b8e0f53b9040471868ed63c6fe27d2bf5923e568dfac0ff95abb5e14
|
7
|
+
data.tar.gz: 1603df1e6ef3cc048cd0211df2547f67cdce70240bf5b9141d29c2a163c974db649bbbffd2a2be0fa12c967d4394bae0426dab559e1a0aa507a03f8ed6e45f4f
|
@@ -34,9 +34,10 @@ module Bard
|
|
34
34
|
|
35
35
|
def inject response
|
36
36
|
count = mail_count
|
37
|
-
mail_link = %(<a href="/mails">(#{mail_count})</a>) if count > 0
|
38
|
-
html = %
|
39
|
-
|
37
|
+
mail_link = %(<a href="/mails">(#{mail_count})</a>) if count > 0
|
38
|
+
html = %(<div class="staging-banner" id="upper-left">Staging #{mail_link}</div>)
|
39
|
+
html += %w[upper-right bottom-left bottom-right].map do |corner|
|
40
|
+
%(<div class="staging-banner" id="#{corner}"></div>)
|
40
41
|
end.join("\n")
|
41
42
|
|
42
43
|
markup = html + <<~CSS
|
@@ -57,6 +58,7 @@ module Bard
|
|
57
58
|
text-align: center;
|
58
59
|
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
|
59
60
|
transform-origin: 50% 50%;
|
61
|
+
opacity: 0.75;
|
60
62
|
}
|
61
63
|
|
62
64
|
#upper-left {
|
@@ -69,18 +71,21 @@ module Bard
|
|
69
71
|
top: 0;
|
70
72
|
right: 0;
|
71
73
|
transform: rotate(45deg) translate(52px, -60px);
|
74
|
+
pointer-events: none;
|
72
75
|
}
|
73
76
|
|
74
77
|
#bottom-left {
|
75
78
|
bottom: 0;
|
76
79
|
left: 0;
|
77
80
|
transform: rotate(225deg) translate(52px, -60px);
|
81
|
+
pointer-events: none;
|
78
82
|
}
|
79
83
|
|
80
84
|
#bottom-right {
|
81
85
|
bottom: 0;
|
82
86
|
right: 0;
|
83
87
|
transform: rotate(-225deg) translate(-52px, -60px);
|
88
|
+
pointer-events: none;
|
84
89
|
}
|
85
90
|
</style>
|
86
91
|
CSS
|
@@ -89,4 +94,3 @@ module Bard
|
|
89
94
|
end
|
90
95
|
end
|
91
96
|
end
|
92
|
-
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bard-staging_banner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Micah Geisel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-02-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: letter_opener_web
|
@@ -60,7 +60,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
requirements: []
|
63
|
-
rubygems_version: 3.
|
63
|
+
rubygems_version: 3.5.4
|
64
64
|
signing_key:
|
65
65
|
specification_version: 4
|
66
66
|
summary: Middleware to inject an annoying banner on every page in the staging environment
|