• 欢迎 游客 您的光临,下载之前请先阅读 积分规则(暂行) 。任何技术问题请在论坛提问,本站定制插件、模板主题。售前、售后问题请联系QQ:5916171
  • 发帖需要扣除两点虚拟积分是为了控制乱发广告,如不便可进群提问。点击链接加入群聊【XenForo讨论社区】:群号1:143277648

模板修改 修改主题颜色

小关

打酱油的路过~~
UID
255
注册
2019/01/25
消息
489
解决方案
12
黄金
16,399G
后台过滤查找模板 thread_list_macros Ctrl+F 查找代码

PHP:
<a href="{{ link('threads' . (($thread.isUnread() AND !$forceRead) ? '/unread' : ''), $thread) }}" class="" data-tp-primary="on" data-xf-init="{{ $canPreview ? 'preview-tooltip' : '' }}" data-preview-url="{{ $canPreview ? link('threads/preview', $thread) : '' }}">{$thread.title}</a>

替换成如下代码:

PHP:
                 <a href="{{ link('threads' . (($thread.isUnread() AND !$forceRead) ? '/unread' : ''), $thread) }}" class="" data-tp-primary="on" data-xf-init="{{ $canPreview ? 'preview-tooltip' : '' }}" data-preview-url="{{ $canPreview ? link('threads/preview', $thread) : '' }}">
                    <xf:if is="$thread.reply_count >= 0 AND $thread.reply_count < 5">
                        <span>
                            {$thread.title}
                        </span>
                        <xf:elseif is="$thread.reply_count >= 5 AND $thread.reply_count <= 50" />
                        <span class="blue-thread--title">
                            {$thread.title}
                        </span>
                        <xf:elseif is="$thread.reply_count > 50 && $thread.view_count > 1000" />
                        <span class="green-thread--title">
                            {$thread.title}
                        </span>
                    </xf:if>
                </a>

添加css样式到 extra.less

CSS:
.blue-thread--title {
    color: #47a7eb;
}
.green-thread--title {
    color: #7db702;
}

效果如下图:
cnxfans-1532758606349.png
 
后退
顶部 底部