2017年9月7日木曜日

[Blogger][共有] ボタン下に "はてなブックマークボタン" を追加

Blogger

作業用ブログと間違えてテンプレートを飛ばしてしまったので、またやり直し
はぁ
ついでに没のファビコンをアップしておきます
(元サイズは300x300です)
欲しい方はどうぞ

ここのコードと同じですが

ボタンのデザインが違うので

以下のコードを
<div class="post-share-buttons">
<b:include data="post" name="shareButtons">
</b:include></div>
下に追加 (divで囲みました)

<a expr:href='"http://b.hatena.ne.jp/entry/" + data:post.canonicalUrl' class="hatena-bookmark-button" data-hatena-bookmark-title="data:post.title" data-hatena-bookmark-layout="basic-label-counter" title="このエントリーをはてなブックマークに追加"><img src="https://b.st-hatena.com/images/entry-button/button-only@2x.png" alt="このエントリーをはてなブックマークに追加" width="20" height="20" style="border: none;" /></a>

スクリプト:
<script type="text/javascript" src="https://b.st-hatena.com/js/bookmark_button.js" charset="utf-8" async="async"></script>

</body>直前に記述
追記
前にテンプレートを飛ばした時にダメだった様な気がするので現在私が使っているのを載せておきます

<a class='hatena-bookmark-button' data-hatena-bookmark-lang='en' data-hatena-bookmark-layout='basic-label-counter' expr:href='&quot;https://b.hatena.ne.jp/entry/&quot; + data:post.canonicalUrl' title='このエントリーをはてなブックマークに追加'><img alt='このエントリーをはてなブックマークに追加' height='20' src='https://b.st-hatena.com/images/v4/public/entry-button/button-only@2x.png' style='border: none;' width='20'/></a><script async='async' charset='utf-8' src='https://b.st-hatena.com/js/bookmark_button.js' type='text/javascript'/>

スクリプトも同じ場所で動くはず

F(uriouz)

欲しいものリスト / 優先度の高いほしいものリスト / ☕を奢る
Donate 寄付 カンパ サポート Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation.
詳細プロフィールを表示

0 comments:

スパム対策の為コメントをオフにしています。
Disqusは利用出来ます。

注: コメントを投稿できるのは、このブログのメンバーだけです。

...

Recent Posts

 
"The Android robot is reproduced or modified from work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License."