app/template/default/Block/Sp/Item/lm_item_share_btn.twig line 1

Open in your IDE?
  1. <script>
  2.     $(function () {
  3.         // facebook
  4.         $('a.share_button.facebook').on('click' , function(e) {
  5.             var uri = encodeURI('http://www.facebook.com/share.php?u=' + location.href);
  6.             window.open(uri, 'facebookwindow', 'width=550, height=450,personalbar=0,toolbar=0,scrollbars=1,resizable=1');
  7.         });
  8.         // twitter
  9.         $('a.share_button.twitter').on('click' , function(e) {
  10.             var uri = encodeURI('http://twitter.com/share?url=' + location.href + '&text=' + document.title);
  11.             window.open(uri, 'twitterwindow', 'width=550, height=450,personalbar=0,toolbar=0,scrollbars=1,resizable=1');
  12.         });
  13.         // LINE
  14.         $('a.share_button.line').on('click' , function(e) {
  15.             var uri = encodeURI('https://timeline.line.me/social-plugin/share?url=' + location.href);
  16.             window.open(uri, 'linewindow', 'width=550, height=450,personalbar=0,toolbar=0,scrollbars=1,resizable=1');
  17.         });
  18.     });
  19. </script>
  20. <style>
  21.     .share_button {
  22.         font-size: 6.0rem;
  23.     }
  24.     .share_button.line {
  25.         color: #00b300;
  26.     }
  27.     .share_button.twitter {
  28.         color: #1c9ceb;
  29.     }
  30.     .share_button.facebook {
  31.         color: #395693;
  32.     }
  33. </style>
  34. <div style="margin-bottom: 20px;" id="share_buttons">
  35.     <!-- LINEで送る -->
  36.     <a class="share_button line"><i class="fab fa-line"></i></a>
  37.     <!-- Facebook -->
  38.     <a class="share_button facebook"><i class="fab fa-facebook-square"></i></a>
  39.     <!-- Twitter -->
  40.     <a class="share_button twitter"><i class="fab fa-twitter-square"></i></a>
  41. </div>