is it possible to make it 1:1:1:1?In the default style, an article forum in preview mode has a layout of 1:2:2:4:4
This is exactly what the code in this resource does...is it possible to make it 1:1:1:1?
Not at all..This is exactly what the code in this resource does...
You would use separate code for narrow viewports.Is it possible to rewrite this code so it also applies to mobile display? I think 2 columns for mobile viewport are better.
Thanks very much, I will give that a tryIt's just CSS/Less.
You can inspect the templates and re-use it for your own purposes.
You will just need to change the class names, or use the same structure on your page node.
.p-body-main:not(.p-body-main--withSidebar) .block--previews .block-body
{
grid-template-columns: repeat(2, 1fr);
grid-template-areas: "a a" "b_1 b_2" "b_3 b_4";
}
@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;
}
}
}
}
}
}
.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.