letter_avatar 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -0
- data/lib/letter_avatar/avatar.rb +1 -1
- data/lib/letter_avatar/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b3e894eb2935644884d0bb884aed9cf07be4580
|
4
|
+
data.tar.gz: 6fce9e3db60337ff2b9bf1ec7ba3947dc033f079
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cbe7868ac9267dae719add1673266aa8a4b09a0ca3428690bb63214bc3563f723c9e9d505b19b081ac74b2c87252bac31ba1713f8dfe6cc2c29592a06b022f95
|
7
|
+
data.tar.gz: c45893a953e35cf75045cb84e01f5faeec363c3b9cf5088b3ef77b81707d97b07a3b5f111b8c83831d88057c72d18a380dccb9f9cb43c1bb1315d9208ad3a041
|
data/README.md
CHANGED
@@ -53,6 +53,14 @@ LetterAvatar.setup do |config|
|
|
53
53
|
end
|
54
54
|
```
|
55
55
|
|
56
|
+
#### Color palette
|
57
|
+
|
58
|
+
We have two color palettes implemented: `iwanthue` and `google`.
|
59
|
+
|
60
|
+
Each of them have different colors, but the `iwanthue` also differently calculates the color for specyfied username.
|
61
|
+
|
62
|
+
The `google` selected will generate the same avatar for both, "Krzysiek" and "ksz2k" usernames given (both of them starts with letter "k"), but `iwanthue` will calculate it's md5 and then selects color, so there's huge chance that these usernames get different colors.
|
63
|
+
|
56
64
|
## Usage
|
57
65
|
|
58
66
|
```ruby
|
@@ -72,6 +80,8 @@ There's also helper for this. To use it, you need:
|
|
72
80
|
|
73
81
|
```ruby
|
74
82
|
letter_avatar_for('ksz2k', 200)
|
83
|
+
# or even
|
84
|
+
letter_avatar_tag('ksz2k', 200, class: 'av')
|
75
85
|
```
|
76
86
|
|
77
87
|
### Way to support non [a-z0-9] charsets
|
data/lib/letter_avatar/avatar.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: letter_avatar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- discourse developers
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2015-11-
|
14
|
+
date: 2015-11-30 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: bundler
|