first version of fb_share
This commit is contained in:
parent
b79de66973
commit
1c62c1a799
2
Gemfile
2
Gemfile
|
@ -39,6 +39,8 @@ gem 'progress_bar'
|
|||
|
||||
gem 'sinatra'
|
||||
gem 'sprockets'
|
||||
gem 'social-share-button'
|
||||
|
||||
gem 'tinymce-rails'
|
||||
gem 'therubyracer' if RUBY_PLATFORM.downcase.include?("linux")
|
||||
gem 'rb-readline' if RUBY_PLATFORM.downcase.include?("linux")
|
||||
|
|
|
@ -250,6 +250,7 @@ GEM
|
|||
rack (~> 1.3, >= 1.3.6)
|
||||
rack-protection (~> 1.2)
|
||||
tilt (~> 1.3, >= 1.3.3)
|
||||
social-share-button (0.0.6)
|
||||
spork (0.9.0)
|
||||
spork (0.9.0-x86-mingw32)
|
||||
win32-process
|
||||
|
@ -343,6 +344,7 @@ DEPENDENCIES
|
|||
shoulda-matchers
|
||||
simplecov
|
||||
sinatra
|
||||
social-share-button
|
||||
spork
|
||||
sprockets
|
||||
sunspot-rails-tester
|
||||
|
|
|
@ -7,3 +7,4 @@
|
|||
//= require jquery
|
||||
//= require jquery_ujs
|
||||
//= require_tree .
|
||||
//= social-share-button
|
|
@ -3,5 +3,5 @@
|
|||
*and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
|
||||
*the top of the compiled file, but it's generally better to create a new file per style scope.
|
||||
*= require_self
|
||||
|
||||
*= require social-share-button
|
||||
*/
|
||||
|
|
|
@ -140,6 +140,7 @@ module ApplicationHelper
|
|||
stylesheets << "<link href='/assets/bootstrap-orbit.css' rel='stylesheet' type='text/css' />\n"
|
||||
stylesheets << "<link href='/assets/style.css' rel='stylesheet' type='text/css' />\n"
|
||||
end
|
||||
stylesheets << "<link href='/assets/social-share-button.scss' rel='stylesheet' type='text/css' />\n"
|
||||
stylesheets << "<link href='#{page.design.reset_css.file.url}' rel='stylesheet' type='text/css' />\n" if page.design.reset_css
|
||||
stylesheets << "<link href='#{asset_path 'banner_nav.css'}' rel='stylesheet' type='text/css' />\n"
|
||||
stylesheets << "<link href='#{page.design.default_css.file.url}' rel='stylesheet' type='text/css' />\n" if page.design.default_css
|
||||
|
@ -161,6 +162,7 @@ module ApplicationHelper
|
|||
end
|
||||
javascripts << "<script type='text/javascript' src='/static/jquery.cycle.all.latest.js'></script>\n"
|
||||
javascripts << "<script type='text/javascript' src='/static/kernel.js'></script>\n"
|
||||
javascripts << "<script type='text/javascript' src='/assets/social-share-button.coffee'></script>\n"
|
||||
javascripts << "<script type='text/javascript' src='/assets/event.js'></script>\n"
|
||||
page.design.javascripts.each do |js|
|
||||
# javascripts << "<script type='text/javascript' src='#{js.file.url}'></script>"
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
SocialShareButton.configure do |config|
|
||||
config.allow_sites = %w(twitter facebook google_plus)
|
||||
end
|
|
@ -0,0 +1,14 @@
|
|||
en:
|
||||
social_share_button:
|
||||
share_to: Share to %{name}
|
||||
weibo: Sina Weibo
|
||||
twitter: Twitter
|
||||
facebook: Facebook
|
||||
douban: Douban
|
||||
qq: Qzone
|
||||
tqq: Tqq
|
||||
delicious: Delicious
|
||||
baidu: Baidu.com
|
||||
kaixin001: Kaixin001.com
|
||||
renren: Renren.com
|
||||
google_plus: Google+
|
|
@ -0,0 +1,14 @@
|
|||
zh_tw:
|
||||
social_share_button:
|
||||
share_to: 分享到%{name}
|
||||
weibo: 新浪微博
|
||||
twitter: Twitter
|
||||
facebook: Facebook
|
||||
douban: 豆瓣
|
||||
qq: QQ空間
|
||||
tqq: 腾讯微博
|
||||
delicious: Delicious
|
||||
baidu: 百度收藏
|
||||
kaixin001: 開心網
|
||||
renren: 人人網
|
||||
google_plus: Google+
|
|
@ -40,5 +40,6 @@
|
|||
</div>
|
||||
|
||||
<div class="fb">
|
||||
<%= render "shared/addthis_toolbox"%>
|
||||
<%= social_share_button_tag(@news_bulletin.title) %>
|
||||
<%#= render "shared/addthis_toolbox"%>
|
||||
</div>
|
||||
|
|
Reference in New Issue