模板修改 修改主题颜色

  • 欢迎 游客 您的光临,下载之前请先阅读 积分规则(暂行) 。任何技术问题请在论坛提问,本站定制插件、模板主题售前、售后问题请联系QQ:5916171

小关_

打酱油的路过~~
管理成员
UID
255
注册
2019/01/25
消息
449
解决方案
6
反馈评分
1,393
黄金
4,494.0G
    Windows 10 Chrome 79.0.3945.79
  • #1
后台过滤查找模板 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