social-share-button 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d1644149eafb5a28d3eae91fbc569b71cc97bc45
4
- data.tar.gz: 1e287381b3dc286ad8cd09a91b9fd183786d0139
3
+ metadata.gz: 2429224487cb009c6fbfbe08f43d019c4f343e1b
4
+ data.tar.gz: 0d3c7eedd06a2be0717230c11b376498643c2f01
5
5
  SHA512:
6
- metadata.gz: 06b15d21872daf6320ee32aa26477886d0db13bf4f525621f3fc1ff05144d901691da74b5793c9d3791b054d2016f449f83fddc8836e9dea516bc75b3229630d
7
- data.tar.gz: 8238c9887dc6033deb1df46234615fc81438ce836980e2e1c48a44031f6abce52b42a869c2f4cc252b356aa5cdfcc0eae73e6321f7aa3d404522d98abcd5c938
6
+ metadata.gz: f8bd57dd2423263d99ad3e9d2e86e49c85f62b211643dc23f370068b80a2bf6764c6129d0af432de1982006161fa66a3e18b12caed9ab9c2efa3d5aa01ab44c6
7
+ data.tar.gz: fe66be9dee91b4612a55a7389ff3bec7affddecb5abc8f6e957502cf2292ea60728d6af76e2414dba15d3c8c949f7f89ff5fa900f995139195685b8f7b16283c
data/README.md CHANGED
@@ -19,6 +19,7 @@ This is a gem to helper you quick create a share feature in you Rails apps.
19
19
  * Email
20
20
  * LinkedIn
21
21
  * Weichat (Weixin)
22
+ * Vkontakte
22
23
 
23
24
  ## Screenshot
24
25
 
@@ -127,6 +128,24 @@ Here are the mapping of attributes depending on you data-type parameter
127
128
  | | | data-source |
128
129
  </pre>
129
130
 
131
+ ## How to change icon size?
132
+
133
+ Yes, you can override social-share-button base css to change the icon size.
134
+
135
+ In you `app/assets/stylesheets/application.scss`:
136
+
137
+ ```scss
138
+ $size: 24px;
139
+
140
+ .social-share-button {
141
+ .ssb-icon {
142
+ background-size: $size $size;
143
+ height: $size;
144
+ width: $size;
145
+ }
146
+ }
147
+ ```
148
+
130
149
  ## Weichat feature
131
150
 
132
151
  You must include Weichat API JS file:
@@ -0,0 +1,23 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 19.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1"
4
+ id="Layer_1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg"
5
+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 256 256"
6
+ style="enable-background:new 0 0 256 256;" xml:space="preserve">
7
+ <style type="text/css">
8
+ .st0{fill:#4C75A3;}
9
+ .st1{fill:#FFFFFF;}
10
+ </style>
11
+ <g id="g5856">
12
+ <path id="rect2987" class="st0" d="M42.5,0h171C237,0,256,19,256,42.5v171c0,23.5-19,42.5-42.5,42.5h-171C19,256,0,237,0,213.5
13
+ v-171C0,19,19,0,42.5,0z"/>
14
+ <path id="path9-3" class="st1" d="M193.4,134c-7.1-7.6-16.5-12.7-28.2-15.1v-1c8.2-3.4,14.6-8.7,19.2-15.9c4.6-7.2,7-15.5,7-24.8
15
+ c0-8-1.7-15.1-5-21.2c-3.4-6.1-8.4-11-15.2-14.7c-6.3-3.4-13-5.6-20.2-6.7c-7.2-1.1-17.8-1.6-31.7-1.6H52v190h76.1
16
+ c13.2,0,24.1-1.2,32.6-3.6c8.5-2.4,16.4-6.4,23.5-12c6-4.7,10.8-10.6,14.4-17.7c3.6-7.1,5.4-15.4,5.4-24.9
17
+ C204,151.9,200.5,141.6,193.4,134L193.4,134z M99.5,67.8h3.3c8.5,0,14.9,0.1,19.2,0.2c4.3,0.1,8,0.9,11.2,2.2
18
+ c3.3,1.5,5.8,3.8,7.3,7c1.6,3.2,2.4,6.4,2.4,9.4c0,4.2-0.7,7.8-2.2,11s-4.1,5.6-7.9,7.4c-3.5,1.6-6.9,2.5-10.1,2.7
19
+ c-3.3,0.2-9,0.3-17.2,0.3h-6V67.8L99.5,67.8z M151.9,176.2c-2,3.6-5.2,6.4-9.5,8.2c-4.9,2.1-9.8,3.3-14.5,3.4
20
+ c-4.8,0.2-13.4,0.3-25.8,0.3h-2.6v-47.6h8.8c8.5,0,15.3,0.1,20.4,0.2c5.1,0.1,9,0.7,11.9,1.9c4.8,1.7,8.3,4.2,10.7,7.5
21
+ s3.6,7.9,3.6,13.8C154.9,168.5,153.9,172.6,151.9,176.2L151.9,176.2z"/>
22
+ </g>
23
+ </svg>
@@ -43,6 +43,8 @@ window.SocialShareButton =
43
43
  SocialShareButton.openUrl("http://www.pinterest.com/pin/create/button/?url=#{url}&media=#{img}&description=#{title}")
44
44
  when "linkedin"
45
45
  SocialShareButton.openUrl("https://www.linkedin.com/shareArticle?url=#{url}&title=#{title}")
46
+ when "vkontakte"
47
+ SocialShareButton.openUrl("http://vk.com/share.php?url=#{url}&title=#{title}&image=#{img}")
46
48
  when "weixin"
47
49
  if wx == undefined
48
50
  console.log "You must require weichat API js by your self. https://res.wx.qq.com/open/js/jweixin-1.0.0.js"
@@ -11,7 +11,7 @@ $size: 18px;
11
11
  }
12
12
 
13
13
  @each $site in twitter, facebook, google_bookmark, google_plus, weibo, qq,
14
- delicious, linkedin, tumblr, pinterest, douban, weichat, email {
14
+ delicious, linkedin, tumblr, pinterest, douban, weichat, vkontakte, email {
15
15
  .ssb-#{$site} {
16
16
  background-image: image-url('social-share-button/#{$site}.svg');
17
17
  }
@@ -1,3 +1,3 @@
1
1
  SocialShareButton.configure do |config|
2
- config.allow_sites = %w(twitter facebook google_plus weibo qq douban google_bookmark delicious tumblr pinterest email linkedin weichat)
2
+ config.allow_sites = %w(twitter facebook google_plus weibo qq douban google_bookmark delicious tumblr pinterest email linkedin weichat vkontakte)
3
3
  end
@@ -14,3 +14,4 @@ en:
14
14
  email: Email
15
15
  linkedin: Linkedin
16
16
  weichat: Weichat
17
+ vkontakte: Vkontakte
@@ -14,3 +14,4 @@
14
14
  email: Email
15
15
  linkedin: Linkedin
16
16
  weichat: 微信
17
+ vkontakte: Vkontakte
@@ -14,3 +14,4 @@
14
14
  email: Email
15
15
  linkedin: Linkedin
16
16
  weichat: 微信
17
+ vkontakte: Vkontakte
@@ -22,6 +22,7 @@ module SocialShareButton
22
22
  # - email
23
23
  # - linkedin
24
24
  # - weichat
25
+ # - vkontakte
25
26
  attr_accessor :allow_sites
26
27
 
27
28
  def initialize
@@ -1,3 +1,3 @@
1
1
  module SocialShareButton
2
- VERSION = '0.3.1'
2
+ VERSION = '0.3.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: social-share-button
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Lee
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-28 00:00:00.000000000 Z
11
+ date: 2016-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -73,6 +73,7 @@ files:
73
73
  - app/assets/images/social-share-button/qq.svg
74
74
  - app/assets/images/social-share-button/tumblr.svg
75
75
  - app/assets/images/social-share-button/twitter.svg
76
+ - app/assets/images/social-share-button/vkontakte.svg
76
77
  - app/assets/images/social-share-button/weibo.svg
77
78
  - app/assets/images/social-share-button/weichat.svg
78
79
  - app/assets/javascripts/social-share-button.coffee