Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ gem 'react_component'

gem 'graphql-client', '~> 0.8.6'

gem 'social-share-button', '~> 0.1.6'

group :development, :test do
gem 'pry-rails'
gem 'letter_opener'
Expand Down
6 changes: 5 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,9 @@ GEM
railties (>= 3.1, < 5.0)
slim (~> 3.0)
slop (3.6.0)
social-share-button (0.1.10)
coffee-rails
sass-rails
sorcery (0.9.1)
bcrypt (~> 3.1)
oauth (~> 0.4, >= 0.4.4)
Expand Down Expand Up @@ -565,6 +568,7 @@ DEPENDENCIES
simple_form
simplecov (~> 0.15.1)
slim-rails
social-share-button (~> 0.1.6)
sorcery
spreadsheet
uglifier (>= 1.3.0)
Expand All @@ -575,4 +579,4 @@ RUBY VERSION
ruby 2.3.0p0

BUNDLED WITH
1.15.4
1.16.6
1 change: 1 addition & 0 deletions app/assets/javascripts/application.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
#= require react
#= require react_ujs
#= require components
#= require social-share-button

#= require_directory ./application
4 changes: 3 additions & 1 deletion app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
/*
*= require_self
*= require_directory ./application
*= require social-share-button
*/

@import "variables";
@import "bootstrap-sass-official/assets/stylesheets/bootstrap-sprockets";
@import "bootstrap-sass-official/assets/stylesheets/bootstrap";
@import "font-awesome-sprockets";
@import "font-awesome";
@import "awesome-bootstrap-checkbox"
@import "awesome-bootstrap-checkbox";
@import "social-share-button";

//don't put css in this file
5 changes: 4 additions & 1 deletion app/views/badges/_badge_info.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@
img.show-badge
.badge-description
.modal-footer
button.btn.btn-danger type='button' data-dismiss='modal' Close
.text-left
| Share the milestone:
= social_share_button_tag share_msg, url:"learnitgirl.com", via: "learnitgirl", desc: share_msg
button.btn.btn-danger type='button' data-dismiss='modal' Close
3 changes: 3 additions & 0 deletions config/initializers/social_share_button.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SocialShareButton.configure do |config|
config.allow_sites = %w(twitter facebook linkedin)
end
19 changes: 19 additions & 0 deletions config/locales/social_share_button.en.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
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+
google_bookmark: Google Bookmark
tumblr: Tumblr
plurk: Plurk
pinterest: Pinterest
email: Email
19 changes: 19 additions & 0 deletions config/locales/social_share_button.zh-CN.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
'zh-CN':
social_share_button:
share_to: 分享到 %{name}
weibo: 新浪微博
twitter: Twitter
facebook: Facebook
douban: 豆瓣
qq: QQ空间
tqq: 腾讯微博
delicious: Delicious
baidu: 百度收藏
kaixin001: 开心网
renren: 人人网
google_plus: Google+
google_bookmark: Google 收藏
tumblr: Tumblr
plurk: Plurk
pinterest: Pinterest
email: Email
19 changes: 19 additions & 0 deletions config/locales/social_share_button.zh-TW.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
'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+
google_bookmark: Google 收藏
tumblr: Tumblr
plurk: 噗浪
pinterest: Pinterest
email: Email
2 changes: 1 addition & 1 deletion db/seeds/init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -174,5 +174,5 @@
Badge.find_or_create_by(name: 5, image: "badges/energetic.png", thumbnail: "badges/thumbnails/energetic.png", description: "Badge awarded when mentee completes all tasks for 2 weeks in a row")
Badge.find_or_create_by(name: 6, image: "badges/timekeeper.png", thumbnail: "badges/thumbnails/timekeeper.png",description: "Badge awarded when mentee completes all tasks for the current week")
Badge.find_or_create_by(name: 7, image: "badges/novice.png", thumbnail: "badges/thumbnails/novice.png", description: "Badge awarded when mentee completes first task")
Badge.find_or_create_by(name: 9, image: "badges/coder.png", thumbnail: "badges/thumbnails/coder.png", description: "Badge awarded when mentee find_or_create_bys her first github commit")
Badge.find_or_create_by(name: 9, image: "badges/coder.png", thumbnail: "badges/thumbnails/coder.png", description: "Badge awarded when mentee creates her first GitHub commit")
Badge.find_or_create_by(name: 10, image: "badges/visionary.png", thumbnail: "badges/thumbnails/visionary.png", description: "Badge awarded when mentee has provided a creative project description that’s doable and detailed")