Ok. How about the css? They all have .gridHi @Justwise
remove one of this from the code:
Code:<div class="grid"> <xf:widget key="forum_overview_share_page" /> </div>
Then in code<div class="grid">
for other two widgets add extra classes like<div class="grid class1">
and<div class="grid class2">
, for instance.
Less if you take padding and space between into accountSo here is how I was thinking. xF has fixed 1200px width, I have 3 columns, so I need 400px width pictures.
Yes, larger pictures reduced do look better on Retina, so I useAnd for mobile screens 400px is kind of ok, so I started to dance from 400px width. And here is my first question. I use windows, but 55% of my visitors are oh IOS or Mac. And I heard some about that retina thing. So I better use 800px width that will resize by browser & css? Or...? Please advice.
max-width:400px
or whatever display width you want. It's not a deal breaker, they just look a bit sharper.gotcha. thanks!Less if you take padding and space between into account
Yes, larger pictures reduced do look better on Retina, so I usemax-with:400px
or whatever display width you want. It's not a deal breaker, they just look a bit sharper.
I actually set pix as bg in .grid and appliedTypo fixed max-width
<xf:macro name="depth1" arg-node="!" arg-extras="!" arg-children="!" arg-childExtras="!" arg-depth="1">
<div class="block block--category block--category{$node.node_id}">
<span class="u-anchorTarget" id="{$node.Data.getCategoryAnchor()}"></span>
<div class="block-container">
<h2 class="block-header">
<a href="{{ link('categories', $node) }}">{$node.title}</a>
<xf:if is="{$node.description}"><span class="block-desc">{$node.description|raw}</span></xf:if>
</h2>
XenForo template syntax cannot achieve that out of the box. You can either duplicate the content and hide it with a css media query in the appropriate spot, or supply your backend with a device discovery method.Hi @BassMan. This is amazing, Thank you!
Just one question in which I hope you can help.
What kind of <xf:if> would I need to add to the code to achieve the following:
Desktop - Box above nodes
Mobile - Box below nodes
Ah that's a shame, but thanks for the headsup. Think i'll leave it as it is for the time being!XenForo template syntax cannot achieve that out of the box. You can either duplicate the content and hide it with a css media query in the appropriate spot, or supply your backend with a device discovery method.
<div class="grid-main">
<div class="grid">
<xf:widget key="xfrm_overview_top_authors" />
</div>
<div class="grid">
<xf:widget key="xfrm_whats_new_overview_new_resources" />
</div>
<div class="grid">
<xf:widget key="xfrm_stats" />
</div>
</div>
.grid-main {
display: flex;
}
.grid {
display: flex;
flex-direction: column;
flex: 1 1 250px;
margin-left: 2%;
}
.grid:first-of-type {
margin-left: 0;
}
.grid .block, .grid .block-container {
height: 100%;
}
@media (max-width: @xf-responsiveMedium)
{
.grid-main {
display: inherit;
}
.grid {
margin-left: inherit;
}
}
Helloso I can add the background in?
We use essential cookies to make this site work, and optional cookies to enhance your experience.