ここではデフォルトマークアップと呼びます(説明については省略)
(デフォルト)マークアップなしの状態で「人気の投稿」ガジェット を追加すると微妙だったので
ただ、サンプルがあまり見付からないので
他のテンプレートからパクってくるわけにもいかんし
How to Update Blogger Layout, Default Widget and bSkin Version - BloggerSpice AI-Driven SEO, Smart Blogging, Massive Income
https://www.bloggerspice.com/2017/03/blogger-layout-widget-update.html
こちらから拝借
とりあえず不要部分を削って(よくわからん部分もあるけど)
Code
<b:defaultmarkups>
<b:defaultmarkup type='PopularPosts'>
<b:includable id='main'>
<!-- Default the title to 'Popular posts'. -->
<b:with value='data:messages.popularPosts' var='defaultTitle'>
<b:include name='super.main'/>
</b:with>
</b:includable>
<b:includable id='snippetedPostContent'>
<div class='post'>
<b:class cond='data:post.featuredImage' name='has-featured-image'/>
<b:class cond='not data:post.featuredImage' name='no-featured-image'/>
<b:if cond='data:post.featuredImage'>
<div class='snippet-thumbnail'>
<a expr:href='data:post.url'>
<b:include data='{ image: data:post.featuredImage, imageSizes: [330,660,1320], sourceSizes: "(max-width: 660px) 100vw, 660px" }' name='responsiveImage'/>
</a>
</div>
</b:if>
<b:include cond='data:this.postDisplay.showTitle' name='snippetedPostTitle'/>
</div>
</b:includable>
</b:defaultmarkup>
</b:defaultmarkups>
単純にサムネイル画像の下に投稿タイトルが出るだけですが
(スニペット表示はこのままでは不可)
新テーマは
旧テーマの 72 x 72 px に制限されるサムネイル画像と違って
サムネイル画像のレンダリング サイズに制限がない?ので
単純なマークアップでも差別化にはなるかな
とりあえず最低限は仕上がったかね
現在デモ > https://development-for-blogger.blogspot.com/
次は「注目の投稿」ガジェット に取り掛かりたいけど、サンプルが見付からないので難航しそう




0 comments:
スパム対策の為コメントをオフにしています。
Disqusは利用出来ます。
注: コメントを投稿できるのは、このブログのメンバーだけです。