jquery-cssemoticons-rails 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 5cd47f92793b68d10a3f5fc81064a2bea14c480a
4
+ data.tar.gz: caaa6116e427ea94a725a8ece3903043cfd90119
5
+ SHA512:
6
+ metadata.gz: 7b76f62636554668e180e816c96f6d813e8ec4621cc08ade8be495697e0cc54d9e06c9afa78a63c3a0e63e5d8618cedd0418caaa244a3511eb3ea7168b54f94d
7
+ data.tar.gz: c20f11c40145923a126183e5adf3acf21f65efa54b5de36f3b0caec13a371c4f1432be3d0bfd61c4f67f51615a02d3462631db45adbc9efd3b89ef0912bfa0a7
data/.gitignore ADDED
@@ -0,0 +1,5 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
5
+ .DS_Store
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source "http://rubygems.org"
2
+
3
+ gemspec
data/README.md ADDED
@@ -0,0 +1,51 @@
1
+ # jQuery CSSEmoticons Rails
2
+
3
+ Rails gem for https://github.com/JangoSteve/jQuery-CSSEmoticons
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'jquery-cssemoticons-rails'
11
+ ```
12
+
13
+ Or install it yourself with:
14
+
15
+ ```ruby
16
+ gem install jquery-cssemoticons-rails
17
+ ```
18
+
19
+ And then execute:
20
+
21
+ ```
22
+ $ bundle
23
+ ```
24
+
25
+ ## Usage
26
+
27
+ Add the following to your javascript asset manifest
28
+
29
+ ```coffeescript
30
+ //= require jquery.cssemoticons
31
+ ```
32
+
33
+ Add the following to you css manifest
34
+
35
+ ```scss
36
+ /*
37
+ *= require jquery.cssemoticons
38
+ */
39
+ ```
40
+
41
+ And thats it!
42
+
43
+ Head over to https://github.com/JangoSteve/jQuery-CSSEmoticons for usage.
44
+
45
+ ## Contributing
46
+
47
+ 1. Fork it
48
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
49
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
50
+ 4. Push to the branch (`git push origin my-new-feature`)
51
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+ Bundler::GemHelper.install_tasks
@@ -0,0 +1,22 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'jquery-cssemoticons-rails/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "jquery-cssemoticons-rails"
8
+ spec.version = JqueryCSSEmoticons::Rails::VERSION
9
+ spec.authors = ["Kainage"]
10
+ spec.email = ["kainage@gmail.com"]
11
+ spec.homepage = "http://github.com/kainage/jquery-cssemoticons-rails"
12
+ spec.summary = "This gem adds jquery-cssemoticons to your rails app"
13
+ spec.description = "This gem adds jquery-cssemoticons to your rails app"
14
+
15
+ spec.files = `git ls-files`.split($/)
16
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
+ spec.test_files = spec.files.grep(%r{^(test|spec)/})
18
+ spec.require_paths = ["lib"]
19
+
20
+ spec.add_dependency "rails", ">= 3.1.0"
21
+ spec.add_development_dependency "bundler"
22
+ end
@@ -0,0 +1,5 @@
1
+ module JqueryCSSEmoticons
2
+ module Rails
3
+ VERSION = "0.0.1"
4
+ end
5
+ end
@@ -0,0 +1,8 @@
1
+ require "jquery-cssemoticons-rails/version"
2
+
3
+ module JqueryCSSEmoticons
4
+ module Rails
5
+ class Engine < ::Rails::Engine
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,11 @@
1
+ /*
2
+ * jQuery CSSEmoticons plugin 0.2.9
3
+ *
4
+ * Copyright (c) 2010 Steve Schwartz (JangoSteve)
5
+ *
6
+ * Dual licensed under the MIT and GPL licenses:
7
+ * http://www.opensource.org/licenses/mit-license.php
8
+ * http://www.gnu.org/licenses/gpl.html
9
+ *
10
+ * Date: Sun Oct 22 1:00:00 2010 -0500
11
+ */(function(a){a.fn.emoticonize=function(m){var c=a.extend({},a.fn.emoticonize.defaults,m);var d=[")","(","*","[","]","{","}","|","^","<",">","\\","?","+","=","."];var l=[":-)",":o)",":c)",":^)",":-D",":-(",":-9",";-)",":-P",":-p",":-Þ",":-b",":-O",":-/",":-X",":-#",":'(","B-)","8-)",";*(",":-*",":-\\","?-)",": )",": ]","= ]","= )","8 )",": }",": D","8 D","X D","x D","= D",": (",": [",": {","= (","; )","; ]","; D",": P",": p","= P","= p",": b",": Þ",": O","8 O",": /","= /",": S",": #",": X","B )",": |",": \\","= \\",": *",": &gt;",": &lt;"];var j=[":)",":]","=]","=)","8)",":}",":D",":(",":[",":{","=(",";)",";]",";D",":P",":p","=P","=p",":b",":Þ",":O",":/","=/",":S",":#",":X","B)",":|",":\\","=\\",":*",":&gt;",":&lt;"];var h={"&gt;:)":{cssClass:"red-emoticon small-emoticon spaced-emoticon"},"&gt;;)":{cssClass:"red-emoticon small-emoticon spaced-emoticon"},"&gt;:(":{cssClass:"red-emoticon small-emoticon spaced-emoticon"},"&gt;: )":{cssClass:"red-emoticon small-emoticon"},"&gt;; )":{cssClass:"red-emoticon small-emoticon"},"&gt;: (":{cssClass:"red-emoticon small-emoticon"},";(":{cssClass:"red-emoticon spaced-emoticon"},"&lt;3":{cssClass:"pink-emoticon counter-rotated"},O_O:{cssClass:"no-rotate"},o_o:{cssClass:"no-rotate"},"0_o":{cssClass:"no-rotate"},O_o:{cssClass:"no-rotate"},T_T:{cssClass:"no-rotate"},"^_^":{cssClass:"no-rotate"},"O:)":{cssClass:"small-emoticon spaced-emoticon"},"O: )":{cssClass:"small-emoticon"},"8D":{cssClass:"small-emoticon spaced-emoticon"},XD:{cssClass:"small-emoticon spaced-emoticon"},xD:{cssClass:"small-emoticon spaced-emoticon"},"=D":{cssClass:"small-emoticon spaced-emoticon"},"8O":{cssClass:"small-emoticon spaced-emoticon"},"[+=..]":{cssClass:"no-rotate nintendo-controller"}};var f=new RegExp("(\\"+d.join("|\\")+")","g");var n="(^|[\\s\\0])";for(var g=l.length-1;g>=0;--g){l[g]=l[g].replace(f,"\\$1");l[g]=new RegExp(n+"("+l[g]+")","g")}for(var g=j.length-1;g>=0;--g){j[g]=j[g].replace(f,"\\$1");j[g]=new RegExp(n+"("+j[g]+")","g")}for(var k in h){h[k].regexp=k.replace(f,"\\$1");h[k].regexp=new RegExp(n+"("+h[k].regexp+")","g")}var e="span.css-emoticon";if(c.exclude){e+=","+c.exclude}var b=e.split(",");return this.not(e).each(function(){var o=a(this);var i="css-emoticon";if(c.animate){i+=" un-transformed-emoticon animated-emoticon"}for(var p in h){specialCssClass=i+" "+h[p].cssClass;o.html(o.html().replace(h[p].regexp,"$1<span class='"+specialCssClass+"'>$2</span>"))}a(l).each(function(){o.html(o.html().replace(this,"$1<span class='"+i+"'>$2</span>"))});a(j).each(function(){o.html(o.html().replace(this,"$1<span class='"+i+" spaced-emoticon'>$2</span>"))});a.each(b,function(q,r){o.find(a.trim(r)+" span.css-emoticon").each(function(){a(this).replaceWith(a(this).text())})});if(c.animate){setTimeout(function(){a(".un-transformed-emoticon").removeClass("un-transformed-emoticon")},c.delay)}})};a.fn.unemoticonize=function(b){var c=a.extend({},a.fn.emoticonize.defaults,b);return this.each(function(){var d=a(this);d.find("span.css-emoticon").each(function(){var e=a(this);if(c.animate){e.addClass("un-transformed-emoticon");setTimeout(function(){e.replaceWith(e.text())},c.delay)}else{e.replaceWith(e.text())}})})};a.fn.emoticonize.defaults={animate:true,delay:500,exclude:"pre,code,.no-emoticons"}})(jQuery);
@@ -0,0 +1,295 @@
1
+ /*
2
+ * jQuery CSSEmoticons plugin 0.2.9
3
+ *
4
+ * Copyright (c) 2010 Steve Schwartz (JangoSteve)
5
+ *
6
+ * Dual licensed under the MIT and GPL licenses:
7
+ * http://www.opensource.org/licenses/mit-license.php
8
+ * http://www.gnu.org/licenses/gpl.html
9
+ *
10
+ * Date: Sun Oct 22 1:00:00 2010 -0500
11
+ */
12
+
13
+ /* Basic styles for emoticons */
14
+ span.css-emoticon {
15
+ font-family: "Trebuchet MS"; /* seems to give the best and most consistent emoticon appearance */
16
+ font-size: 0.65em;
17
+ font-weight: bold;
18
+ color: #000000;
19
+ display: inline-block;
20
+ overflow: hidden;
21
+ vertical-align: middle;
22
+ transform: rotate(90deg);
23
+ -webkit-transform: rotate(90deg);
24
+ -moz-transform: rotate(90deg);
25
+ -o-transform: rotate(90deg);
26
+ width: 1.54em; /* note that this is a multiple of this span's font-size, not containing text font-size */
27
+ height: 1.54em; /* so, relative to containing text, width and height are 0.9 x 1.6 = 1.44em */
28
+ text-align: center;
29
+ padding: 0;
30
+ line-height: 1.34em;
31
+ -moz-border-radius: 1.54em;
32
+ -webkit-border-radius: 1.54em;
33
+ border-radius: 1.54em;
34
+ -moz-box-shadow: 1px -1px 2px rgba(0,0,0,0.5);
35
+ -webkit-box-shadow: 1px -1px 2px rgba(0,0,0,0.5);
36
+ box-shadow: 1px -1px 2px rgba(0,0,0,0.5);
37
+ border: 1px solid rgba(0,0,0,0.25);
38
+ background-color: #ffcc00;
39
+ background-image: -webkit-gradient(
40
+ linear,
41
+ right top,
42
+ left top,
43
+ color-stop(0.41, rgb(255,204,0)),
44
+ color-stop(0.56, rgb(255,221,85)),
45
+ color-stop(1, rgb(255,238,170))
46
+ );
47
+ background-image: -moz-linear-gradient(
48
+ center right,
49
+ rgb(255,204,0) 41%,
50
+ rgb(255,221,85) 56%,
51
+ rgb(255,238,170) 100%
52
+ );
53
+ -webkit-transition-property:color, background, transform;
54
+ -webkit-transition-duration: 1s, 1s;
55
+ -webkit-transition-timing-function: linear, ease-in;
56
+ }
57
+
58
+ /* Styles for two-character emoticons that need more letter-spacing for proportionality */
59
+ span.css-emoticon.spaced-emoticon {
60
+ padding-left: 0.2em;
61
+ width: 1.34em;
62
+ letter-spacing: 0.2em;
63
+ }
64
+
65
+ /* This is a dirty dirty hack, because webkit doesn't properly do the padding+width=total-width as it should
66
+ I think the width of the border may be throwing things off, because it's more noticable for small icons */
67
+ @media screen and (-webkit-min-device-pixel-ratio:0) {
68
+ span.css-emoticon.spaced-emoticon {
69
+ width: 1.4em;
70
+ }
71
+ }
72
+
73
+ /* Styles for emoticons that need to have smaller characters to fit inside the circle */
74
+ span.css-emoticon.small-emoticon {
75
+ font-size: 0.55em;
76
+ width: 1.82em;
77
+ height: 1.82em;
78
+ line-height: 1.72em;
79
+ -moz-border-radius: 1.82em;
80
+ -webkit-border-radius: 1.82em;
81
+ border-radius: 1.82em;
82
+ }
83
+
84
+ span.css-emoticon.small-emoticon.spaced-emoticon {
85
+ padding-left: 0;
86
+ width: 1.82em;
87
+ letter-spacing: 0.1em;
88
+ }
89
+
90
+ /* Styles for additional colors */
91
+ span.css-emoticon.red-emoticon {
92
+ background-color: #eb0542;
93
+ background-image: -webkit-gradient(
94
+ linear,
95
+ right top,
96
+ left top,
97
+ color-stop(0.41, rgb(235,5,66)),
98
+ color-stop(0.56, rgb(235,38,90)),
99
+ color-stop(1, rgb(250,55,110))
100
+ );
101
+ background-image: -moz-linear-gradient(
102
+ center right,
103
+ rgb(235,5,66) 41%,
104
+ rgb(235,38,90) 56%,
105
+ rgb(250,55,110) 100%
106
+ );
107
+ }
108
+
109
+ span.css-emoticon.pink-emoticon {
110
+ background-color: #ff8fd4;
111
+ background-image: -webkit-gradient(
112
+ linear,
113
+ right top,
114
+ left top,
115
+ color-stop(0.41, rgb(255,143,212)),
116
+ color-stop(0.56, rgb(255,153,216)),
117
+ color-stop(1, rgb(255,173,225))
118
+ );
119
+ background-image: -moz-linear-gradient(
120
+ center right,
121
+ rgb(255,143,212) 41%,
122
+ rgb(255,153,216) 56%,
123
+ rgb(255,173,225) 100%
124
+ );
125
+ }
126
+
127
+ /* styles for emoticons that need no rotation, like O_o */
128
+ span.css-emoticon.no-rotate {
129
+ transform: rotate(0deg);
130
+ -webkit-transform: rotate(0deg);
131
+ -moz-transform: rotate(0deg);
132
+ -o-transform: rotate(0deg);
133
+ -moz-box-shadow: 1px 1px 2px rgba(0,0,0,0.5);
134
+ -webkit-box-shadow: 1px 1px 2px rgba(0,0,0,0.5);
135
+ box-shadow: 1px 1px 2px rgba(0,0,0,0.5);
136
+ font-size: 0.45em;
137
+ width: 2.2em;
138
+ height: 2.2em;
139
+ line-height: 1.9em;
140
+ -moz-border-radius: 2.2em;
141
+ -webkit-border-radius: 2.2em;
142
+ border-radius: 2.2em;
143
+ background-image: -webkit-gradient(
144
+ linear,
145
+ right bottom,
146
+ right top,
147
+ color-stop(0.41, rgb(255,204,0)),
148
+ color-stop(0.56, rgb(255,221,85)),
149
+ color-stop(1, rgb(255,238,170))
150
+ );
151
+ background-image: -moz-linear-gradient(
152
+ center bottom,
153
+ rgb(255,204,0) 41%,
154
+ rgb(255,221,85) 56%,
155
+ rgb(255,238,170) 100%
156
+ );
157
+ }
158
+
159
+ span.css-emoticon.no-rotate.red-emoticon {
160
+ background-image: -webkit-gradient(
161
+ linear,
162
+ right bottom,
163
+ right top,
164
+ color-stop(0.41, rgb(235,5,66)),
165
+ color-stop(0.56, rgb(235,38,90)),
166
+ color-stop(1, rgb(250,55,110))
167
+ );
168
+ background-image: -moz-linear-gradient(
169
+ center bottom,
170
+ rgb(235,5,66) 41%,
171
+ rgb(235,38,90) 56%,
172
+ rgb(250,55,110) 100%
173
+ );
174
+ }
175
+
176
+ span.css-emoticon.no-rotate.pink-emoticon {
177
+ background-image: -webkit-gradient(
178
+ linear,
179
+ right bottom,
180
+ right top,
181
+ color-stop(0.41, rgb(255,143,212)),
182
+ color-stop(0.56, rgb(255,153,216)),
183
+ color-stop(1, rgb(255,173,225))
184
+ );
185
+ background-image: -moz-linear-gradient(
186
+ center bottom,
187
+ rgb(255,143,212) 41%,
188
+ rgb(255,153,216) 56%,
189
+ rgb(255,173,225) 100%
190
+ );
191
+ }
192
+
193
+ /* Styles for emoticons that need to be rotated counter-clockwise, like <3 */
194
+ span.css-emoticon.counter-rotated {
195
+ transform: rotate(-90deg);
196
+ -webkit-transform: rotate(-90deg);
197
+ -moz-transform: rotate(-90deg);
198
+ -o-transform: rotate(-90deg);
199
+ -moz-box-shadow: -1px 1px 2px rgba(0,0,0,0.5);
200
+ -webkit-box-shadow: -1px 1px 2px rgba(0,0,0,0.5);
201
+ box-shadow: -1px 1px 2px rgba(0,0,0,0.5);
202
+ background-image: -webkit-gradient(
203
+ linear,
204
+ left top,
205
+ right top,
206
+ color-stop(0.41, rgb(255,204,0)),
207
+ color-stop(0.56, rgb(255,221,85)),
208
+ color-stop(1, rgb(255,238,170))
209
+ );
210
+ background-image: -moz-linear-gradient(
211
+ center left,
212
+ rgb(255,204,0) 41%,
213
+ rgb(255,221,85) 56%,
214
+ rgb(255,238,170) 100%
215
+ );
216
+ }
217
+
218
+ span.css-emoticon.counter-rotated.red-emoticon {
219
+ background-image: -webkit-gradient(
220
+ linear,
221
+ left top,
222
+ right top,
223
+ color-stop(0.41, rgb(235,5,66)),
224
+ color-stop(0.56, rgb(235,38,90)),
225
+ color-stop(1, rgb(250,55,110))
226
+ );
227
+ background-image: -moz-linear-gradient(
228
+ center left,
229
+ rgb(235,5,66) 41%,
230
+ rgb(235,38,90) 56%,
231
+ rgb(250,55,110) 100%
232
+ );
233
+ }
234
+
235
+ span.css-emoticon.counter-rotated.pink-emoticon {
236
+ background-image: -webkit-gradient(
237
+ linear,
238
+ left top,
239
+ right top,
240
+ color-stop(0.41, rgb(255,143,212)),
241
+ color-stop(0.56, rgb(255,153,216)),
242
+ color-stop(1, rgb(255,173,225))
243
+ );
244
+ background-image: -moz-linear-gradient(
245
+ center left,
246
+ rgb(255,143,212) 41%,
247
+ rgb(255,153,216) 56%,
248
+ rgb(255,173,225) 100%
249
+ );
250
+ }
251
+
252
+ /* Styles for animated states */
253
+ span.css-emoticon.un-transformed-emoticon, span.css-emoticon.animated-emoticon:hover {
254
+ /* font-size: inherit;
255
+ font-weight: inherit;
256
+ vertical-align: inherit;
257
+ line-height: inherit;
258
+ font-family: inherit; */
259
+ letter-spacing: inherit;
260
+ color: inherit;
261
+ overflow: visible;
262
+ transform: rotate(0deg);
263
+ -webkit-transform: rotate(0deg);
264
+ -moz-transform: rotate(0deg);
265
+ -o-transform: rotate(0deg);
266
+ background: none;
267
+ background-image: none;
268
+ box-shadow: none;
269
+ -moz-box-shadow: none;
270
+ -webkit-box-shadow: none;
271
+ border-color: transparent;
272
+ }
273
+
274
+ span.css-emoticon.nintendo-controller {
275
+ font-size: .8em;
276
+ height: 1.2em;
277
+ line-height: 1em;
278
+ width: 2.7em;
279
+ vertical-align: bottom;
280
+ border-radius: 0;
281
+ -webkit-border-radius: 0;
282
+ -moz-border-radius: 0;
283
+ background: -webkit-gradient(
284
+ linear,
285
+ left bottom,
286
+ left top,
287
+ color-stop(0.09, rgb(116,121,140)),
288
+ color-stop(0.55, rgb(165,170,189))
289
+ );
290
+ background: -moz-linear-gradient(
291
+ center bottom,
292
+ rgb(116,121,140) 9%,
293
+ rgb(165,170,189) 55%
294
+ );
295
+ }
metadata ADDED
@@ -0,0 +1,80 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jquery-cssemoticons-rails
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Kainage
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-07-01 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 3.1.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 3.1.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ description: This gem adds jquery-cssemoticons to your rails app
42
+ email:
43
+ - kainage@gmail.com
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - ".gitignore"
49
+ - Gemfile
50
+ - README.md
51
+ - Rakefile
52
+ - jquery-cssemoticons-rails.gemspec
53
+ - lib/jquery-cssemoticons-rails.rb
54
+ - lib/jquery-cssemoticons-rails/version.rb
55
+ - vendor/assets/javascripts/jquery.cssemoticons.min.js
56
+ - vendor/assets/stylesheets/jquery.cssemoticons.css
57
+ homepage: http://github.com/kainage/jquery-cssemoticons-rails
58
+ licenses: []
59
+ metadata: {}
60
+ post_install_message:
61
+ rdoc_options: []
62
+ require_paths:
63
+ - lib
64
+ required_ruby_version: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ required_rubygems_version: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ version: '0'
74
+ requirements: []
75
+ rubyforge_project:
76
+ rubygems_version: 2.2.2
77
+ signing_key:
78
+ specification_version: 4
79
+ summary: This gem adds jquery-cssemoticons to your rails app
80
+ test_files: []