为您的 Discourse 论坛提供轻量级的主题列表展示。已删除“发帖人”列,但在“活动”列和主题标题下方添加了一些信息(最后发帖人的姓名和头像、主题创建者的姓名,以及用于标签的小表情符号)。
兼容性
此主题组件与标签、特色链接功能以及 原始主题列表版本 中可用的任何功能兼容。任何类别样式展示(项目符号、条形、框)都应与此组件配合使用。
该主题组件已在几种配色方案上进行了测试,适用于浅色、中性或深色主题。
遗憾的是,该主题组件可能无法与已更改主题列表展示的插件(如“主题列表预览”)配合使用。
如有任何问题,请随时告知!
29 个赞
Love this component.
Is there any easy way to make the poster-info div exactly as in the screenshot?
I think this makes it more readable
Author name above
Relative-date below
2 个赞
It’s not a bad idea actually, I might use this by default
But for now, you can edit the component, ib the header part, around line 60 to 69
Original
<div class='poster-avatar'>
<a href="{{topic.lastPostUr}}" data-user-card="{{topic.last_poster_username}}">{{avatar topic.lastPoster usernamePath="username" imageSize="medium"}}</a>
</div>
<div class='poster-info'>
<a href="{{topic.lastPostUrl}}">
{{format-date topic.bumpedAt format="tiny"}}
</a>
<br />
<span class='editor'><a href="/users/{{topic.last_poster_username}}" data-auto-route="true" data-user-card="{{topic.last_poster_username}}">{{topic.last_poster_username}}</a></span>
</div>
What you want to use
<div class='poster-avatar'>
<a href="{{topic.lastPostUr}}" data-user-card="{{topic.last_poster_username}}">{{avatar topic.lastPoster usernamePath="username" imageSize="medium"}}</a>
</div>
<div class='poster-info'>
<span class='editor'><a href="/users/{{topic.last_poster_username}}" data-auto-route="true" data-user-card="{{topic.last_poster_username}}">{{topic.last_poster_username}}</a></span>
<br />
<a href="{{topic.lastPostUrl}}">
{{format-date topic.bumpedAt format="tiny"}}
</a>
</div>
You’ll need to edit this after each update but the component will not be upgraded that much.
You could also fork the repository, edit the file and use this version on your forum, if you’re familiar with github
5 个赞
I tried this change on my forum and I think it’s a good idea, I pushed an upgrade
If you prefer what we previously used, let me know, I can make an alternate version
6 个赞
@Steven did it stoped working with the last update? Its broke here.
1 个赞
Steven
2019 年11 月 29 日 11:48
7
I didn’t notice yet, I usually do my upgrades on the weekend, I’ll check this tonight
Steven
2019 年11 月 29 日 17:29
8
I upgraded a forum and checked the logs, no issue for me.
Can you share a screenshot of the issue on your forum ? If I remember correctly you use a heavily customized theme, I think it might come from it. But I’ll see what I can do
3 个赞
I don’t use this theme anymore.
I tested in Material Design without CSS customizations, can’t make it work in any theme. Maybe it’s a plugin?
Steven
2019 年11 月 30 日 21:04
10
If you have Discourse topic previews for example the component will not work because it also uses change the topic-list-item.raw template
1 个赞
You’re right about it. But I only use it for News Plugin 📰 , that requires the Topic Preview.
So I have to choose between then.
Looks awesome on my forum and the little tag emoji is nice haha, awesome work!
2 个赞
Using this too on my instance. Looks so much cleaner. I never understood the concept of the 5 avatars, looks so cluttered.
1 个赞
刚刚更新到最新的 Discourse 版本(2.5.0.beta2),发现帖子中的用户头像似乎消失了。
论坛链接:https://techscammersunited.com/
1 个赞
Steven
2020 年3 月 26 日 01:51
15
我明天再检查一下。我几天前更新过,当时没问题,可能是有什么变化。
3 个赞
Steven
2020 年3 月 26 日 13:28
16
感谢您的反馈,问题现已修复。您可以升级组件并重新激活它。
3 个赞
我已更新到最新版本(2.4.1),但头像不见了。我暂时禁用了该组件。
Steven
2020 年3 月 27 日 12:58
20
您也需要升级 Discourse,问题就会得到解决。
2 个赞
对我来说,不幸的是这意味着要进行大量升级(18 个自定义插件),所以我倾向于每 3-4 个月更新一次。我想我运气不好