post_article_macros
template.$thread.sticky ? 'message--articlePreview--sticky' :'' }}{{
-- like so on line 224: <article class="message message--article message--articlePreview {{
$thread.sticky ? 'message--articlePreview--sticky' :'' }}{{
$thread.discussion_state == 'moderated' ? 'is-moderated' : '' }}{{
$thread.discussion_state == 'deleted' ? 'is-deleted' : ''
}} js-inlineModContainer js-threadListItem-{$thread.thread_id}">
cta_article_grid.less
template, or extra.less
template, depending on which you are using:&--sticky
{
grid-area: a !important;
}
@media (min-width: @xf-responsiveMedium)
{
@__ctaArticleFooter: 40px;
.block.block--articles.block--previews .block-body .message--articlePreview
{
margin-top: 0;
&:nth-of-type(n)
{
grid-area: unset;
& .articlePreview
{
&-main
{
flex-direction: column;
min-height: 100%;
padding-bottom: @__ctaArticleFooter;
}
&-image
{
width: 100%;
}
&-title
{
font-size: @xf-fontSizeLarger;
}
&-content
{
margin-bottom: -@__ctaArticleFooter;
}
&-footer
{
position: relative;
bottom: @__ctaArticleFooter;
}
&-meta
{
border-top: solid 1px @xf-borderColor;
& .articlePreview-by
{
display: none;
}
}
}
}
&--sticky
{
grid-area: a !important;
}
}
}
.message--articlePreview .articlePreview-image+.articlePreview-text .bbWrapper:after
{
background: none;
}
For threads without images, it is possible to configure those to use a default image.
Edit thepost_article_macros
template.
Look for:
HTML:<xf:if is="$thread.cover_image"> <a href="{$linkUnread}" class="articlePreview-image" style="background-image: url('{$thread.cover_image}')" aria-hidden="true" tabindex="-1"> </a> </xf:if>
Replace with:
HTML:<xf:if is="$thread.cover_image"> <a href="{$linkUnread}" class="articlePreview-image"...
See this update: https://xenforo.com/community/resou...rid-layout.8303/updates#resource-update-39167and if no image a generic image
You may be able to edit the template and use theis there a way to add a image view count on the article preview page
xf_attachment.view_count
var, if it's available.Yeah I am seeing that also. You can see it in the preview picture here tooNoticed that image height of the fifth article (first one in the second row) is different than the others?
@media (min-width: @xf-responsiveMedium)
{
@__ctaArticleFooter: 40px;
.block.block--articles.block--previews .block-body .message--articlePreview
{
margin-top: 0;
&:nth-of-type(n)
{
grid-area: unset;
& .articlePreview
{
&-main
{
flex-direction: column;
min-height: 100%;
padding-bottom: @__ctaArticleFooter;
}
&-image
{
width: 100%;
&:after
{
padding-bottom: 75%;
}
}
&-title
{
font-size: @xf-fontSizeLarger;
}
&-content
{
margin-bottom: -@__ctaArticleFooter;
}
&-footer
{
position: relative;
bottom: @__ctaArticleFooter;
}
&-meta
{
border-top: solid 1px @xf-borderColor;
& .articlePreview-by
{
display: none;
}
}
}
}
}
}
.message--articlePreview .articlePreview-image+.articlePreview-text .bbWrapper:after
{
background: none;
}
We use essential cookies to make this site work, and optional cookies to enhance your experience.