app/Plugin/SEOAllOne42/Resource/template/social_button.twig line 1

Open in your IDE?
  1. <script async="async" defer="defer" src="https://d.line-scdn.net/r/web/social-plugin/js/thirdparty/loader.min.js"></script>
  2. <script type="text/javascript" src="https://b.st-hatena.com/js/bookmark_button.js" charset="utf-8" async="async">
  3.   {lang: "ja"}
  4. </script>
  5. <div id="fb-root"></div>
  6. <script async defer crossorigin="anonymous" src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v8.0" nonce="dilSYGI6"></script>
  7. {#<div class="fb-share-button" data-href="https://www.mocacleveland.org/exhibitions/lee-mingwei-you-are-not-stranger" data-layout="button" data-size="small">
  8. <a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fwww.mocacleveland.org%2Fexhibitions%2Flee-mingwei-you-are-not-stranger&amp;src=sdkpreparse" class="fb-xfbml-parse-ignore">Share1111</a>
  9. </div>#}
  10. <script>
  11.     $(function () {
  12.         var current_URL = window.location.origin + window.location.pathname;
  13.         var current_title = document.title;
  14.         var encoded_current_URL = encodeURI(current_URL);
  15.         var add_html_twitter = '<a href="https://twitter.com/share?ref_src=twsrc%5Etfw" class="twitter-share-button" data-show-count="false" data-lang="ja" data-size="large">ツイートする</a><script async src="https://platform.twitter.com/widgets.js" charset="utf-8"><\/script>';
  16.         var add_html_facebook = '<iframe src="https://www.facebook.com/plugins/share_button.php?href=' + encoded_current_URL + '&layout=button&size=large&mobile_iframe=true&width=75&height=28&appId" width="75" height="28" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true" allow="encrypted-media" target="_top"></iframe>';
  17.         var add_html_facebook2 = '<a class="seoallone-share-btn-facebook" href="https://www.facebook.com/sharer/sharer.php?u='+encoded_current_URL+'" target="_blank"><i class="seoallone-ion-social-facebook"></i>&nbsp;Share</a>';
  18.         var add_html_line = '<div class="line-it-button" data-lang="ja" data-type="share-c" data-url="' + location.href + '" style="display: none;"></div>';
  19.         var add_html = '';
  20.         {% if facebook_flg is defined and facebook_flg == 1%}
  21.             add_html = add_html + '<span class="mg_socialbutton_2">' + add_html_facebook2 + '</span>';
  22.         {% endif %}
  23.         {% if twitter_flg is defined and twitter_flg == 1%}
  24.             add_html = add_html + '<span class="mg_socialbutton_1">' + add_html_twitter + '</span>';
  25.         {% endif %}
  26.         {% if line_flg is defined and line_flg == 1%}
  27.             add_html = add_html + '<span class="mg_socialbutton_3">' + add_html_line + '</span>';
  28.         {% endif %}
  29.         console.log('abcd');
  30.         
  31.         if ( $(".seo-all-in-social-button" ).length ) {
  32.             $('.seo-all-in-social-button').html('<div>' + add_html + '</div>');
  33.         } else {
  34.             $('.ec-productRole__description').eq(0).before('<div>' + add_html + '</div>');
  35.         }
  36.         LineIt.loadButton();
  37.     });
  38. </script>
  39. <style>
  40.     .mg_socialbutton_1,
  41.     .mg_socialbutton_2,
  42.     .mg_socialbutton_3,
  43.     .mg_socialbutton_4 {
  44.         display: inline-block;
  45.         margin: 5px 10px 5px 5px;
  46.     }
  47.     .mg_socialbutton_4 {
  48.         line-height: 30px;
  49.         vertical-align: text-bottom;
  50.     }
  51.     
  52.     .mg_socialbutton_2 {
  53.         margin: 10px 5px 0px 0px;
  54.     }
  55.     
  56.     .seoallone-share-btn-facebook {
  57.         {#background-color: #95a5a6;#}
  58.         background-color: #0084ff;
  59.         float: left;
  60.         padding: 5px 16px;
  61.         border-radius: 3px;
  62.         color: #fff;
  63.         font-weight: bold;
  64.         font-size: 13px;
  65.         vertical-align: middle;
  66.         -moz-transition: background 0.2s ease-in-out;
  67.         -o-transition: background 0.2s ease-in-out;
  68.         -webkit-transition: background 0.2s ease-in-out;
  69.         transition: background 0.2s ease-in-out;
  70.         font-family: Helvetica, Arial, sans-serif;
  71.     }
  72.     
  73.     .seoallone-share-btn-facebook:hover {
  74.         color: #fff;
  75.         text-decoration: none;
  76.     }
  77.     .seoallone-ion-social-facebook {
  78.         width: 14px;
  79.     height: 14px;
  80.     background: url({{ asset('SEOAllOne42/assets/icons8-facebook.svg', 'plugin') }}) no-repeat center/contain;
  81.     display: inline-block;
  82.         position: relative;
  83.         top: 2px;
  84.         left: 0px;
  85.     }
  86. </style>