Skip to content

Commit

Permalink
Merge pull request #83 from Frylock13/vkontakte-social-network
Browse files Browse the repository at this point in the history
Add social network - Vkontakte(vk.com)
  • Loading branch information
huacnlee committed Aug 4, 2016
2 parents 1b06285 + 5b99f0b commit 0191640
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ This is a gem to helper you quick create a share feature in you Rails apps.
* Email
* LinkedIn
* Weichat (Weixin)
* Vkontakte

## Screenshot

Expand Down
23 changes: 23 additions & 0 deletions app/assets/images/social-share-button/vkontakte.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions app/assets/javascripts/social-share-button.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ window.SocialShareButton =
SocialShareButton.openUrl("http://www.pinterest.com/pin/create/button/?url=#{url}&media=#{img}&description=#{title}")
when "linkedin"
SocialShareButton.openUrl("https://www.linkedin.com/shareArticle?url=#{url}&title=#{title}")
when "vkontakte"
SocialShareButton.openUrl("http://vk.com/share.php?url=#{url}&title=#{title}&image=#{img}")
when "weixin"
if wx == undefined
console.log "You must require weichat API js by your self. https://res.wx.qq.com/open/js/jweixin-1.0.0.js"
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/social-share-button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ $size: 18px;
}

@each $site in twitter, facebook, google_bookmark, google_plus, weibo, qq,
delicious, linkedin, tumblr, pinterest, douban, weichat, email {
delicious, linkedin, tumblr, pinterest, douban, weichat, vkontakte, email {
.ssb-#{$site} {
background-image: image-url('social-share-button/#{$site}.svg');
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
SocialShareButton.configure do |config|
config.allow_sites = %w(twitter facebook google_plus weibo qq douban google_bookmark delicious tumblr pinterest email linkedin weichat)
config.allow_sites = %w(twitter facebook google_plus weibo qq douban google_bookmark delicious tumblr pinterest email linkedin weichat vkontakte)
end
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ en:
email: Email
linkedin: Linkedin
weichat: Weichat
vkontakte: Vkontakte
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@
email: Email
linkedin: Linkedin
weichat: 微信
vkontakte: Vkontakte
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@
email: Email
linkedin: Linkedin
weichat: 微信
vkontakte: Vkontakte
1 change: 1 addition & 0 deletions lib/social_share_button/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class Config
# - email
# - linkedin
# - weichat
# - vkontakte
attr_accessor :allow_sites

def initialize
Expand Down
2 changes: 1 addition & 1 deletion lib/social_share_button/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module SocialShareButton
VERSION = '0.3.1'
VERSION = '0.3.2'
end

0 comments on commit 0191640

Please sign in to comment.