puffly 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +43 -13
- data/lib/puffly/version.rb +1 -1
- data/vendor/assets/javascripts/puffly.coffee +2 -2
- data/vendor/assets/stylesheets/_puffy-colors.sass +6 -0
- data/vendor/assets/stylesheets/puffly.sass +11 -15
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 72e42ab3c37d98c100a77db12a78b0304dea8888
|
4
|
+
data.tar.gz: 94c8bb3a6c5898d75387c22fe6c1df06cad81916
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ca3d0812797905a1a32051396166b7bd853003fe06fd2a01ae6af82e21bd600208fbf68f18917a95af217662cd79b70f11bf2158391f73446f40807f7c97154
|
7
|
+
data.tar.gz: 8cd4621853f96e13e0db3f8236bbc9d57e11210c29355c29b90152d4d9625294a11d99bdf9210552edf975eb512722781a23ea7b152a9e957722d2e8a81c6828
|
data/README.md
CHANGED
@@ -1,41 +1,71 @@
|
|
1
|
-
|
1
|
+
[![Gem Version](https://badge.fury.io/rb/puffly.svg)](https://badge.fury.io/rb/puffly)
|
2
|
+
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/bbf2d676a27842eab590d8dac0cda3ca)](https://www.codacy.com/app/Kevyder/puffly?utm_source=github.com&utm_medium=referral&utm_content=kevyder/puffly&utm_campaign=Badge_Grade)
|
2
3
|
|
3
|
-
|
4
|
+
# Puffly
|
4
5
|
|
5
|
-
|
6
|
+
Fun and cute flash messages for your Ruby on Rails application.
|
6
7
|
|
7
8
|
## Installation
|
8
9
|
|
9
10
|
Add this line to your application's Gemfile:
|
10
11
|
|
11
|
-
```ruby
|
12
|
-
gem 'puffly'
|
13
|
-
```
|
12
|
+
```ruby
|
13
|
+
gem 'puffly'
|
14
|
+
```
|
14
15
|
|
15
16
|
And then execute:
|
16
17
|
|
17
|
-
$ bundle
|
18
|
+
$ bundle install
|
18
19
|
|
19
20
|
Or install it yourself as:
|
20
21
|
|
21
22
|
$ gem install puffly
|
22
23
|
|
24
|
+
Once installed, add the following to your `application.scss`:
|
25
|
+
|
26
|
+
```scss
|
27
|
+
@import "puffly";
|
28
|
+
```
|
29
|
+
|
30
|
+
and your `application.js`:
|
31
|
+
|
32
|
+
```js
|
33
|
+
//= require jquery
|
34
|
+
//= require puffly
|
35
|
+
```
|
36
|
+
|
23
37
|
## Usage
|
24
38
|
|
25
|
-
|
39
|
+
Add this lines to your `application.erb` or the main layout of your application:
|
40
|
+
|
41
|
+
```erb
|
42
|
+
<% flash.each do |type, msg| %>
|
43
|
+
<%= content_tag :span, msg, class: "#{type}", id: "puffly" %>
|
44
|
+
<% end %>
|
45
|
+
```
|
46
|
+
|
47
|
+
And add the flash message to the action of your controller:
|
26
48
|
|
27
|
-
|
49
|
+
```ruby
|
50
|
+
flash[OPTION] = "Your message"
|
51
|
+
```
|
28
52
|
|
29
|
-
|
53
|
+
You can set some options when creating a flash message.
|
30
54
|
|
31
|
-
|
55
|
+
####`flash[OPTION]`
|
56
|
+
|
57
|
+
OPTION | SASS Variable | HEX Color
|
58
|
+
------------ | ------------- | -------------
|
59
|
+
:success | $color-sucess | `#3DC763`
|
60
|
+
:error | $color-error | `#ED3D3D`
|
61
|
+
:warning | $color-warning | `#FF9800`
|
62
|
+
:notice | $color-notice | `#2B5C7F`
|
32
63
|
|
33
64
|
## Contributing
|
34
65
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
66
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/kevyder/puffly.
|
36
67
|
|
37
68
|
|
38
69
|
## License
|
39
70
|
|
40
71
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
41
|
-
|
data/lib/puffly/version.rb
CHANGED
@@ -1,32 +1,28 @@
|
|
1
|
-
|
2
|
-
$color-error: #f44336
|
3
|
-
$color-warning: #ff9800
|
4
|
-
$color-notice: #2196F3
|
5
|
-
$font: sans-serif
|
1
|
+
@import "puffly-colors"
|
6
2
|
|
7
|
-
#
|
3
|
+
#puffly
|
8
4
|
display: none
|
9
5
|
position: fixed
|
10
6
|
min-width: 5%
|
11
7
|
max-width: 15%
|
12
|
-
text-align:
|
8
|
+
text-align: left
|
13
9
|
left: 80%
|
14
|
-
|
10
|
+
bottom: 5%
|
15
11
|
z-index: 0
|
16
12
|
font-size: 1rem
|
17
|
-
color: white
|
18
|
-
padding: 15px
|
19
|
-
opacity: 0.
|
13
|
+
color: $white
|
14
|
+
padding: 15px 20px
|
15
|
+
opacity: 0.7
|
20
16
|
font-family: $font
|
21
17
|
|
22
|
-
#
|
18
|
+
#puffly.success
|
23
19
|
background-color: $color-sucess
|
24
20
|
|
25
|
-
#
|
21
|
+
#puffly.error
|
26
22
|
background-color: $color-error
|
27
23
|
|
28
|
-
#
|
24
|
+
#puffly.warning
|
29
25
|
background-color: $color-warning
|
30
26
|
|
31
|
-
#
|
27
|
+
#puffly.notice
|
32
28
|
background-color: $color-notice
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puffly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Rodríguez
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-12-
|
11
|
+
date: 2016-12-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -57,6 +57,7 @@ files:
|
|
57
57
|
- lib/puffly/version.rb
|
58
58
|
- puffly.gemspec
|
59
59
|
- vendor/assets/javascripts/puffly.coffee
|
60
|
+
- vendor/assets/stylesheets/_puffy-colors.sass
|
60
61
|
- vendor/assets/stylesheets/puffly.sass
|
61
62
|
homepage: https://github.com/kevyder/puffly
|
62
63
|
licenses:
|