ããï¼ã¤ã§é©ãã»ã©ã¢ã¯ã»ã¹æ°ãå¢ããï¼èª°ã§ãç°¡åã«ã§ããåºå®ã½ã¼ã·ã£ã«ãã¿ã³ã®è¨ç½®æ¹æ³ã¨ã¯ï¼
ãã§ã«ãæ°ã¥ãã®æ¹ãå¤ãã¨æãã¾ãããæè¿ããã°ã®ãã¶ã¤ã³ãå¤å°ä¿®æ£ãã¦ãã¾ãã
ã¯ã¦ããTwitterçã®ã½ã¼ã·ã£ã«ãã¿ã³ã¯åãµã¼ãã¹ãã¨ã«ãã¶ã¤ã³ãç°ãªããä½ã¨ãªãçµ±ä¸æãããã¾ããã
ä»åã®ãã¶ã¤ã³å¤æ´ã¯ã½ã¼ã·ã£ã«ãã¿ã³å¨ãã®ãã¶ã¤ã³ãçµ±ä¸åããããã¦ã¼ã¶ã¯ãªãã¯ãèªããããããããã ä½ç½®ã«åºå®åãã¾ããã
ãã®å¹æã¯ã¦ãããï¼
ããã¯ãã¼ã¯çã¯å¾æ¥æ¯ã§2å以ä¸ã«ã
çããã«ãæ¯éãç´¹ä»ãããã¨æãã¾ããã®ã§ãè¨äºã«ãã¦ã¿ã¾ãã
è¨ç½®æ¹æ³
ä¸è¨ã®ã½ã¼ã¹ç¾¤ãããªãã®ããã°ã«è¿½å ããã ãã§ãã
ã½ã¼ã·ã£ã«ãã¿ã³ç»åã¯ã®ãããããã®ãã¼ã¸ã®ãã®ã使ç¨ããã¦ããã ãã¾ããã
CSSã½ã¼ã¹
ããªãã®ããã°ã®CSSã«ä¸è¨ã追å ãã¦ãã ããã
.social-button { display:none; width:90%; max-width:900px; height:0; margin:0 auto; position: fixed; bottom: 100px; left:auto; padding:1em 0 1em 50px; z-index:9999; filter:alpha(opacity=70); -moz-opacity: 0.7; opacity: 0.7; }
HTMLã½ã¼ã¹ï¼PCãã¥ã¼ï¼
ä¸è¨ã¯ã¯ã¦ãªããã°ã«è¿½å ããéã®HTMLã½ã¼ã¹ä¾ã§ãã
ãï½ç»åã®å ´æãã®æ¬ã¯ç»åãä¿åããURLã«ç½®ãæãã¦ä¸ããã
èªä½ããã°ã®æ¹ã¯ã{Permalink}ãè¨äºURLã{Title}ãè¨äºã¿ã¤ãã«ã{BlogURL}ãããã°ãããURLã«ãªãããã«ã¿ã°ãç½®ãæãã¦è¨ç½®ãã¦ãã ããã
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script type="text/javascript"> // ã½ã¼ã·ã£ã«ãã¿ã³ããã§ã¼ãã¤ã³ã»ã¢ã¦ã $(function(){ $(window).bind("scroll", function() { if ($(this).scrollTop() > 150) { $(".social-button").fadeIn(); } else { $(".social-button").fadeOut(); } // ã½ã¼ã·ã£ã«ãã¿ã³ãªã³ã¯ãå³ä¸ã«åºå® $(".social-button").css({"position":"fixed","bottom": "100px"}); }); }); </script> <p class="social-button"> <a href="http://b.hatena.ne.jp/entry/{Permalink}" title="ãã®è¨äºãã¯ã¦ãªããã¯ãã¼ã¯ã«è¿½å " target="_blank"> <img src="ã¯ã¦ãç»åã®å ´æ"></a> <a href="http://twitter.com/intent/tweet?url={Permalink}&text={Title} - {BlogTitle}" target="_blank"> <img src="Twitterç»åã®å ´æ"></a> <a href="http://www.facebook.com/sharer.php?src=bm&u={Permalink}&t={Title}" target="_blank"> <img src="Facebookç»åã®å ´æ"></a> <a href="https://plus.google.com/share?url={Permalink}" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;"> <img src="Google+ç»åã®å ´æ"></a> <a href="http://line.me/R/msg/text/?{Title}%0D%0A{Permalink}>"> <img src="LINEç»åã®å ´æ"></a> <a href="http://getpocket.com/edit?url={Permalink}&title={Title}" target="_blank"> <img src="Pocketç»åã®å ´æ"></a> <a href="http://cloud.feedly.com/#subscription%2Ffeed%2F{BlogURL}feed" target="_blank"> <img src="Feedlyç»åã®å ´æ"></a></p>
ã¹ãããã¥ã¼ã¨PCãã¥ã¼ã®ç»åãµã¤ãºãå¤ãã¦ããããã§é©å½ãªå¤§ããã«ãªãããã«è¡¨ç¤ºããã¾ãã
PCãã¥ã¼
ã¹ãããã¥ã¼
ãã£ãããã ãã®ã½ã¼ã¹ã³ã¼ã追å ã§ãã
誰ã§ãç°¡åã«ã§ãã¾ãã®ã§ãããªããä»ããã«ããã°ã«è¨ç½®ãã¾ãããï¼