Popular Post Version 1
InfiniteAMP
<b:widget id='PopularPosts1' locked='false' title='Trending' type='PopularPosts' version='1'> <b:widget-settings> <b:widget-setting name='numItemsToShow'>4</b:widget-setting> <b:widget-setting name='showThumbnails'>true</b:widget-setting> <b:widget-setting name='showSnippets'>false</b:widget-setting> <b:widget-setting name='timeRange'>LAST_MONTH</b:widget-setting> </b:widget-settings> <b:includable id='main'> <b:if cond='data:title'><h2><data:title/></h2></b:if> <div class='widget-content popular-posts'> <ul> <b:loop values='data:posts' var='post'> <li> <b:if cond='data:showThumbnails == "false"'> <b:if cond='data:showSnippets == "false"'> <!-- (1) No snippet/thumbnail --> <a expr:href='data:post.href'><data:post.title/></a> <b:else/> <!-- (2) Show only snippets --> <div class='item-title'><a expr:href='data:post.href' expr:title='data:post.title'><data:post.title/></a></div> <div class='item-snippet'><data:post.snippet/></div> </b:if> <b:else/> <b:if cond='data:showSnippets == "false"'> <!-- (3) Show only thumbnails --> <div class='item-thumbnail-only'> <b:if cond='data:post.thumbnail'> <div class='item-thumbnail'> <a expr:href='data:post.href' target='_blank'> <amp-img expr:alt='data:post.title' expr:height='data:thumbnailSize' expr:src='data:post.thumbnail' expr:title='data:post.title' expr:width='data:thumbnailSize'/> </a> </div> </b:if> <div class='item-title'><a expr:href='data:post.href' expr:title='data:post.title'><data:post.title/></a></div> </div> <div class='clear'/> <b:else/> <!-- (4) Show snippets and thumbnails --> <div class='item-content'> <b:if cond='data:post.thumbnail'> <div class='item-thumbnail'> <a expr:href='data:post.href' target='_blank'> <amp-img expr:alt='data:post.title' expr:height='data:thumbnailSize' expr:src='data:post.thumbnail' expr:title='data:post.title' expr:width='data:thumbnailSize'/> </a> </div> </b:if> <div class='item-title'><a expr:href='data:post.href' expr:title='data:post.title'><data:post.title/></a></div> <div class='item-snippet'><data:post.snippet/></div> </div> <div class='clear'/> </b:if> </b:if> </li> </b:loop> </ul> </div> </b:includable> </b:widget>Custom
<b:widget id='PopularPosts1' locked='false' title='Trending' type='PopularPosts' version='1'> <b:widget-settings> <b:widget-setting name='numItemsToShow'>4</b:widget-setting> <b:widget-setting name='showThumbnails'>true</b:widget-setting> <b:widget-setting name='showSnippets'>false</b:widget-setting> <b:widget-setting name='timeRange'>LAST_MONTH</b:widget-setting> </b:widget-settings> <b:includable id='main'> <div class='widget-content popular-posts m0 p0 bg-white row-ctn'> <b:if cond='data:title'><h2 class='h2 p1 m0 center white bg-gray><data:title/></h2></b:if> <ul class='list-reset cot'> <b:loop values='data:posts' var='post'> <li class='block m0 p0 cot'> <b:if cond='data:showThumbnails == "false"'> <b:if cond='data:showSnippets == "false"'> <!-- (1) No snippet/thumbnail --> <a expr:href='data:post.href'><data:post.title/></a> <b:else/> <!-- (2) Show only snippets --> <div class='item-title'><a expr:href='data:post.href' expr:title='data:post.title' class='title h3'><data:post.title/></a></div> <div class='flex-auto item-snippet'><data:post.snippet/></div> </b:if> <b:else/> <b:if cond='data:showSnippets == "false"'> <!-- (3) Show only thumbnails --> <div class='item-thumbnail-only'> <b:if cond='data:post.thumbnail'> <div class='item-thumbnail'> <a expr:href='data:post.href' target='_blank'> <amp-img expr:alt='data:post.title' expr:height='data:thumbnailSize' expr:src='data:post.thumbnail' expr:title='data:post.title' expr:width='data:thumbnailSize'/> </a> </div> </b:if> <div class='item-title'><a expr:href='data:post.href' expr:title='data:post.title'><data:post.title/></a></div> </div> <div class='clear'/> <b:else/> <!-- (4) Show snippets and thumbnails --> <div class='item-content flex m0 p0'> <b:if cond='data:post.thumbnail'> <div class='item-thumbnail flex-none'> <a expr:href='data:post.href' target='_blank'> <amp-img expr:alt='data:post.title' expr:height='data:thumbnailSize' expr:src='data:post.thumbnail' expr:title='data:post.title' expr:width='data:thumbnailSize'/> </a> </div> </b:if> <div class='item-title flex-none'><a expr:href='data:post.href' expr:title='data:post.title'><data:post.title/></a></div> <div class='item-snippet flex-auto'><data:post.snippet/></div> </div> <div class='clear'/> </b:if> </b:if> </li> </b:loop> </ul> </div> </b:includable> </b:widget>
v1.1
<b:widget id='PopularPosts1' locked='false' title='Trending' type='PopularPosts' version='1'> <b:widget-settings> <b:widget-setting name='numItemsToShow'>4</b:widget-setting> <b:widget-setting name='showThumbnails'>true</b:widget-setting> <b:widget-setting name='showSnippets'>false</b:widget-setting> <b:widget-setting name='timeRange'>LAST_MONTH</b:widget-setting> </b:widget-settings> <b:includable id='main'> <div class='widget-content popular-posts m0 p0 bg-white row-ctn'> <b:if cond='data:title'><h2 class='h2 p1 m0 center white bg-gray'><data:title/></h2></b:if> <ul class='list-reset cot'> <b:loop values='data:posts' var='post'> <li class='block m0 p0 cot'> <b:if cond='data:showThumbnails == "false"'> <b:if cond='data:showSnippets == "false"'> <!-- (1) No snippet/thumbnail --> <a expr:href='data:post.href'><data:post.title/></a> <b:else/> <!-- (2) Show only snippets --> <div class='item-title'><a expr:href='data:post.href' expr:title='data:post.title' class='title h3'><data:post.title/></a></div> <div class='flex-auto item-snippet'><data:post.snippet/></div> </b:if> <b:else/> <b:if cond='data:showSnippets == "false"'> <!-- (3) Show only thumbnails --> <div class='item-thumbnail-only'> <b:if cond='data:post.thumbnail'> <div class='item-thumbnail'> <a expr:href='data:post.href' target='_blank'> <amp-img expr:alt='data:post.title' expr:height='data:thumbnailSize' expr:src='data:post.thumbnail' expr:title='data:post.title' expr:width='data:thumbnailSize'/> </a> </div> </b:if> <div class='item-title'><a expr:href='data:post.href' expr:title='data:post.title'><data:post.title/></a></div> </div> <div class='clear'/> <b:else/> <!-- (4) Show snippets and thumbnails --> <div class='item-content flex m0 p0'> <b:if cond='data:post.thumbnail'> <div class='item-thumbnail flex-none'> <a expr:href='data:post.href' target='_blank'> <amp-img expr:alt='data:post.title' expr:height='data:thumbnailSize' expr:src='data:post.thumbnail' expr:title='data:post.title' expr:width='data:thumbnailSize'/> </a> </div> </b:if> <div class='item-title flex-none'><a expr:href='data:post.href' expr:title='data:post.title'><data:post.title/></a></div> <div class='item-snippet flex-auto'><data:post.snippet/></div> </div> <div class='clear'/> </b:if> </b:if> </li> </b:loop> </ul> </div> </b:includable> </b:widget>
Disqus Comment
Show Disqus