diff --git a/app/views/users/_share_button.html.haml b/app/views/users/_share_button.html.haml new file mode 100644 index 00000000..fb6dac18 --- /dev/null +++ b/app/views/users/_share_button.html.haml @@ -0,0 +1,7 @@ +.row + .col-sm-12 + .tweet-box.col-sm-12 + .tweet-content-img.pull-right + %a.twitter-share-button{"data-text" => "Here is my #opensource contribution", "data-size" => 'large', "data-url" => request.original_url, :href => "https://twitter.com/share"} Tweet + :javascript + !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs'); diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index e159a89d..49c85eb0 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -45,13 +45,8 @@ = link_to 'Settings', '#settings', data: { toggle: 'tab' } .tab-content .tab-pane.active#rounds - .row - .col-sm-12 - .tweet-box.col-sm-12 - .tweet-content-img.pull-right - %a.twitter-share-button{"data-text" => "Here is my #opensource contribution", "data-size" => 'large', "data-url" => request.original_url, :href => "https://twitter.com/share"} Tweet - :javascript - !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs'); + - if @show_transactions + = render partial: 'share_button' .row .box-body #users-chart-container