XF 2.1 Making pinned content stand out in the forum view?

iaresee

Member
I'd like to emphasize or darken the background for pinned threads in a forum so they stand out from the rest of the content:

204169

I'm having trouble finding the right vB Style property to tweak to adjust only the background color for pinned threads.

Is this possible? Can someone steer me in the correct direction? Thanks!
 

iaresee

Member
Even better would be if I could add some delination between pinning and unpinned posts like we had in 1.x.
 

sbj

Well-known member
 

iaresee

Member
In case someone lands on this thread, my ultimate solution was to edit the forum_view template for my sub-style. In the sticky thread display section:

Code:
                    <xf:if is="$stickyThreads is not empty">
                        <div class="structItemContainer-group structItemContainer-group--sticky">
                            <xf:foreach loop="$stickyThreads" value="$thread">
                                <xf:macro template="thread_list_macros" name="item" arg-thread="{$thread}" arg-forum="{$forum}" />
                            </xf:foreach>
                        </div>

                        <xf:ad position="forum_view_below_stickies" arg-forum="{$forum}" />
                    </xf:if>
I added:

Code:
<hr class="stickySeparator"/>
Right before the xf:ad element.

End result for the entire block was:

Code:
                    <xf:if is="$stickyThreads is not empty">
                        <div class="structItemContainer-group structItemContainer-group--sticky">
                            <xf:foreach loop="$stickyThreads" value="$thread">
                                <xf:macro template="thread_list_macros" name="item" arg-thread="{$thread}" arg-forum="{$forum}" />
                            </xf:foreach>
                        </div>
                        <hr class="stickySeparator"/>

                        <xf:ad position="forum_view_below_stickies" arg-forum="{$forum}" />
                    </xf:if>
And in extra.less I added:

Code:
// Controls the style of the separator between sticky and non-sticky content
// See: https://xenforo.com/community/resources/separate-sticky-threads-from-normal-ones.5706/
.stickySeparator {
  height: 30px;
  border-style:none;
  background-color: @xf-pageBg;
  margin: 0px;
}
This got me:

204170

Which is good enough to satisfy my needs.
 
Top