# 主题列表预览（TLP）

**URL:** <https://meta.discourse.org/t/topic-list-previews-tlp/209973>\
**Category:** Theme component\
**Created:** [2021年十一月23日 12:25 UTC](https://meta.discourse.org/t/topic-list-previews-tlp/209973 "2021-11-23T12:25:59Z")\
**Posts on this page:** 20\
**Page:** 36

<div class="post-metadata">

**Author:** ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)\
**Post date:** [2026年一月14日 08:43 UTC](https://meta.discourse.org/t/topic-list-previews-tlp/209973/717 "2026-01-14T08:43:10Z")

</div>

啊是的，核心更改了标签的参数名称。这可能是原因。

我个人没有注意到，因为我倾向于使用 [https://meta.discourse.org/t/tag-intersection-navigator/368815，我已经更新了它以实现兼容性。](https://meta.discourse.org/t/tag-intersection-navigator/368815%EF%BC%8C%E6%88%91%E5%B7%B2%E7%BB%8F%E6%9B%B4%E6%96%B0%E4%BA%86%E5%AE%83%E4%BB%A5%E5%AE%9E%E7%8E%B0%E5%85%BC%E5%AE%B9%E6%80%A7%E3%80%82)

我会在适当的时候查看 TLP 基本标签的兼容性。

---

<div class="post-metadata">

**Author:** ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)\
**Post date:** [2026年一月14日 13:24 UTC](https://meta.discourse.org/t/topic-list-previews-tlp/209973/718 "2026-01-14T13:24:04Z")

</div>

试试这个尺寸 @copymonopoly

> <https://github.com/merefield/discourse-tc-topic-list-previews/commit/70f408a66f42c40d4d7badfa8c4687a91c92e808>

如果你认为主题列表预览（Topic List Previews）很棒，并且我做得很好，你可以[给我买杯咖啡](https://github.com/sponsors/merefield/sponsorships?sponsor=merefield&tier_id=464896&preview=false) ☕，如果主题列表预览对你的业务或组织很重要，请考虑[赞助我更高的等级](https://github.com/sponsors/merefield?frequency=recurring&sponsor=merefield)🏅 。所有这些都将有助于确保 TLP 及时更新及其未来。我目前无法保证支持，并可能随时永久撤销支持。

---

<div class="post-metadata">

**Author:** ![copymonopoly](https://avatars.discourse-cdn.com/v4/letter/c/4491bb/32.png) [@copymonopoly](https://meta.discourse.org/u/copymonopoly)\
**Post date:** [2026年一月14日 18:58 UTC](https://meta.discourse.org/t/topic-list-previews-tlp/209973/719 "2026-01-14T18:58:13Z")

</div>

感谢您快速修复，非常感谢您在插件上所做的工作。  
我将来一定会考虑支持它。

---

<div class="post-metadata">

**Author:** ![newbit1337](https://avatars.discourse-cdn.com/v4/letter/n/ecc23a/32.png) [@newbit1337](https://meta.discourse.org/u/newbit1337)\
**Post date:** [2026年一月27日 10:13 UTC](https://meta.discourse.org/t/topic-list-previews-tlp/209973/720 "2026-01-27T10:13:40Z")

</div>

您好！

是否可以将平铺布局与其他布局混合使用？  
目前，如果我选择一个类别使用平铺布局，其他所有类别似乎也使用了它。要么全部是平铺，要么都不是平铺。这是预期的，还是我遗漏了什么？

干杯，  
newbit

---

<div class="post-metadata">

**Author:** ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)\
**Post date:** [2026年一月27日 10:17 UTC](https://meta.discourse.org/t/topic-list-previews-tlp/209973/721 "2026-01-27T10:17:03Z")

</div>

可以仅为单个类别进行配置。然后它不会以这种方式显示给其他类别。

我在我的一个实例上已经在生产环境中实现了这一点。

---

<div class="post-metadata">

**Author:** ![newbit1337](https://avatars.discourse-cdn.com/v4/letter/n/ecc23a/32.png) [@newbit1337](https://meta.discourse.org/u/newbit1337)\
**Post date:** [2026年一月27日 10:27 UTC](https://meta.discourse.org/t/topic-list-previews-tlp/209973/722 "2026-01-27T10:27:19Z")

</div>

哦，我现在明白了。它似乎是按类别工作的！  
如果我转到 `/categories` 并且选择了组件中的类别，它似乎可以完美运行！  
现在，我的问题是关于概览页面（`/latest`）的。  
有没有办法在那里也混合使用平铺/无平铺布局？  
这样只有我选择的类别会以平铺样式显示，而其他类别保持无平铺布局。  
如果不可能，没问题！感谢这个很棒的组件！

---

<div class="post-metadata">

**Author:** ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)\
**Post date:** [2026年一月27日 10:33 UTC](https://meta.discourse.org/t/topic-list-previews-tlp/209973/723 "2026-01-27T10:33:10Z")

</div>

目前不可能。要么全有，要么全无。

有一个错误阻止了特色（大）图块正常工作。我一直打算在主分支上修复它（它在一个带有 CSS 砌体布局的实验性分支上可以工作）。这是目前单视图多样性的唯一选择。

我很好奇您的提议看起来会是什么样子，但请注意，我们必须考虑代码复杂性、可行性和性能。

如果您有时间，请随时在此处提交一个模型图，如果合理，我们将来可能会考虑它，特别是如果您愿意赞助这项工作。

---

<div class="post-metadata">

**Author:** ![REALITY](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/reality/32/199798_2.png) [@REALITY](https://meta.discourse.org/u/REALITY)\
**Post date:** [2026年一月29日 20:59 UTC](https://meta.discourse.org/t/topic-list-previews-tlp/209973/724 "2026-01-29T20:59:19Z")

</div>

有谁的 YouTube 缩略图坏了吗？我试过所有方法，它们就是不显示。

---

<div class="post-metadata">

**Author:** ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)\
**Post date:** [2026年一月29日 22:28 UTC](https://meta.discourse.org/t/topic-list-previews-tlp/209973/725 "2026-01-29T22:28:40Z")

</div>

请检查您是否已用完磁盘空间，因为 Discourse 将停止下载远程图片——这是缩略图所必需的。一旦您清理了空间（使用 `./launcher cleanup app`？），请记住重新设置 `download_remote_images_to_local`。

---

<div class="post-metadata">

**Author:** ![REALITY](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/reality/32/199798_2.png) [@REALITY](https://meta.discourse.org/u/REALITY)\
**Post date:** [2026年一月29日 22:43 UTC](https://meta.discourse.org/t/topic-list-previews-tlp/209973/726 "2026-01-29T22:43:45Z")

</div>

> [@merefield](#):
>
> download\_remote\_images\_to\_local

我真的没试过……谢谢。一切都好了。

---

<div class="post-metadata">

**Author:** ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)\
**Post date:** [2026年一月31日 15:02 UTC](https://meta.discourse.org/t/topic-list-previews-tlp/209973/727 "2026-01-31T15:02:03Z")

</div>

感谢 @RGJ 和 Communiteq 的朋友们提供了这个巧妙的小修复，使得 TLP 能够与 CDN 正常协同工作：

> <https://github.com/merefield/discourse-tc-topic-list-previews/pull/53>
>
> The loadScript function was trying to find the script asset locally, but that do…es not work if assets are on s3, so it 404'd.

---

<div class="post-metadata">

**Author:** ![cmdntd](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cmdntd/32/192008_2.png) [@cmdntd](https://meta.discourse.org/u/cmdntd)\
**Post date:** [2026年三月16日 07:14 UTC](https://meta.discourse.org/t/topic-list-previews-tlp/209973/728 "2026-03-16T07:14:37Z")

</div>

它会自动将我的 `/u/user/messages/tags/abc` 更改为 `tiles topic lists`。

我如何能将消息的显示方式更改为 `default display`？

---

<div class="post-metadata">

**Author:** ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)\
**Post date:** [2026年三月16日 14:33 UTC](https://meta.discourse.org/t/topic-list-previews-tlp/209973/729 "2026-03-16T14:33:56Z")

</div>

您可以雇佣我来看一看，或者欢迎提交拉取请求 (PR)。

---

<div class="post-metadata">

**Author:** ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)\
**Post date:** [2026年四月2日 04:50 UTC](https://meta.discourse.org/t/topic-list-previews-tlp/209973/730 "2026-04-02T04:50:07Z")

</div>

此组件导致过去两天内更新到 2026.1.3 ESR 的许多网站出现故障。

故障原因是缺少兼容性锁定。此次更新导致 Discourse 拉取了主题组件的最新版本，而该版本在 ESR 上无法正常工作。

我已提交了一个 [PR](https://github.com/merefield/discourse-tc-topic-list-previews/pull/56) 来添加此锁定，能否请您将其合并？

> **网站管理员：在 PR 合并之前如何解决此问题**
>
> 对于遇到此问题的用户，如果 PR 尚未合并，您可以暂时使用 [https://github.com/communiteq/discourse-tc-topic-list-previews](https://github.com/communiteq/discourse-tc-topic-list-previews)。您可以在主题组件配置页面底部的“设置编辑器”按钮处复制/粘贴设置。
> 
> - 禁用原始主题组件
> - 将临时分支作为新的主题组件添加，并将其添加到主主题中
> - 更改新 tc 的名称并添加 `[temp]` 以便区分
> - 进入原始主题组件配置页面底部，点击“设置编辑器”
> - 全选（ **ctrl-a** ）并复制（ **ctrl-c** ）
> - 关闭弹出窗口，导航到临时分支的配置页面
> - 点击“设置编辑器”，全选（ **ctrl-a** ），删除内容（ **del** ），然后粘贴（ **ctrl-v** ）
> - 点击保存

---

<div class="post-metadata">

**Author:** ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)\
**Post date:** [2026年四月2日 07:34 UTC](https://meta.discourse.org/t/topic-list-previews-tlp/209973/731 "2026-04-02T07:34:06Z")

</div>

合并成功，谢谢 Richard。

请注意，我并未明确支持 `esr`，但很乐意配合您的 PR。

---

<div class="post-metadata">

**Author:** ![ferdnyc](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ferdnyc/32/153935_2.png) [@ferdnyc](https://meta.discourse.org/u/ferdnyc)\
**Post date:** [2026年五月12日 15:42 UTC](https://meta.discourse.org/t/topic-list-previews-tlp/209973/732 "2026-05-12T15:42:27Z")

</div>

> [@merefield](#):
>
> # 可选的“最新帖子”摘要与导航
> 
> TLP 通常的工作方式。在主题列表中：
> 
> - 如果你点击主题标题，你将导航到该主题中最新的未读帖子（可能是原始帖子）。这是原生核心行为 👍（我们很喜欢！❤）
> - 如果你点击缩略图或摘要，你将进入原始帖子

我知道那是半年前的事了，但……你真的是指_ **最新** _的未读帖子，还是应该指\*\*最早\*\*的未读帖子？（换句话说，即在你已读的最后一个帖子之后的第一个帖子）。

（我之所以这样问，主要是因为你如果真的在谈论 **最新** 的帖子，那么“未读”这个区分似乎就没有意义了。很少有 **已读** 的帖子会出现在 **未读** 帖子 **之后** ，因此最新帖子几乎总是最新的未读帖子。）

---

<div class="post-metadata">

**Author:** ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)\
**Post date:** [2026年五月12日 17:20 UTC](https://meta.discourse.org/t/topic-list-previews-tlp/209973/733 "2026-05-12T17:20:28Z")

</div>

啊，没错，那是个拼写错误。我不能再编辑它了，但它的意思当然是“第一个”未读帖子。

---

<div class="post-metadata">

**Author:** ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)\
**Post date:** [2026年五月12日 19:39 UTC](https://meta.discourse.org/t/topic-list-previews-tlp/209973/734 "2026-05-12T19:39:19Z")

</div>

我已经为您更改了。

---

<div class="post-metadata">

**Author:** ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)\
**Post date:** [2026年六月3日 16:44 UTC](https://meta.discourse.org/t/topic-list-previews-tlp/209973/735 "2026-06-03T16:44:58Z")

</div>

由于社区 PR 的提交，现在图块的空白区域也可点击：

> <https://github.com/merefield/discourse-tc-topic-list-previews/pull/61>
>
> Fixes #60.
> 
> In tile mode, topic preview cards use pointer cursor styling, but …clicking blank/non-interactive space inside the tile does not navigate anywhere.
> 
> This adds a topic-list-item-click behavior transformer so blank tile space navigates to the same topic destination used by the title link.
> 
> The change avoids handling clicks on interactive elements such as links, buttons, inputs, avatars, tags, category links, badges, topic actions, and topic status elements.
> 
> Tested on a Discourse install by temporarily installing this branch as a theme component and confirming:
> \- blank space inside the tile navigates to the topic
> \- title/image/excerpt links still work
> \- avatars, tags, category links, badges, and topic actions are not intercepted

🚀 🙏

当前功能说明：

- 点击标题或空白区域（新增功能）将像核心功能一样，跳转至第一条未读帖子
- 点击缩略图将跳转至原帖（OP）（图片通常位于此处——将此处改为跳转至所选图片是一个值得列入路线图的功能）
- 点击摘要将跳转至原帖（OP）

如果您安装了 sidecar 插件，作者、版主、TL3 用户或管理员还可以针对每个主题单独调整此行为，使点击预览的任何区域都跳转至最后一条帖子。

---

<div class="post-metadata">

**Author:** ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)\
**Post date:** [2026年七月7日 14:34 UTC](https://meta.discourse.org/t/topic-list-previews-tlp/209973/736 "2026-07-07T14:34:34Z")

</div>

主题列表预览现在在支持的浏览器中使用原生 CSS 渲染瀑布流视图（目前默认仅支持 Safari——在 Chrome 和 Firefox 中需要设置实验性标志）

这代表了渲染效率的巨大提升，并将节省设备电量。

> <https://github.com/merefield/discourse-tc-topic-list-previews/pull/66>
>
> \* for browsers that support the new \`display: grid-lanes\` standard.
> \* see htt…ps://webkit.org/blog/17660/introducing-css-grid-lanes/
> \* falls back to current grid row approximation algorithm if unavailable
> \* css version is infinitely more efficient and avoids loads of overhead and some jank!
> \* FIX: also fixes large tiles for featured tags.

如果未检测到支持，它将回退到瀑布流近似实现。

随着时间推移，完整支持将逐步扩展到其他浏览器。

[上一頁](https://meta.discourse.org/t/topic-list-previews-tlp/209973.md?page=35)

[下一頁](https://meta.discourse.org/t/topic-list-previews-tlp/209973.md?page=37)
