Dracula 一个适用于 Discourse 的暗色主题

A theme built on the Dracula color palette. This color scheme has been one of my favorite go to themes in the text editors and other software I use.

I felt like Discourse could use it as well :smile:

:bat: : Github Repo https://github.com/dracula/discourse

:vampire: Preview on Theme Creator

:coffin: How do I install a theme or theme component?

If you see anything off, let me know here and I’ll get that updated! Hope you enjoy :smiling_face_with_three_hearts:

43 个赞

This actually looks very neat.

2 个赞

Looking great, I can definitely feel Dracula vibes.

3 个赞

are colours fixed or can they be changed?

2 个赞

Theme colors are fixed per theme/color scheme once defined. If you would like to customize this for your own use though, feel free to fork the repo and change the colors in the about.json file. :vampire:

3 个赞

Hello,

In the mobile view, how do I hide the “Replies” column and show the Views column? Thank you.

Update: found the solution for the Replies column, but cannot figure out how to add “Views”

We do not show the views count on mobile, only activity and replies. To create your own mobile topic list view, you would need to create a theme-component that edits the mobile topic-list-item template found here:

An example of someone on this forum who has done something similar can b found in this topic MD Topic List Mobile component.


If you haven’t created a theme or theme-component before, I would suggest reading through this topic that does a great job of explaining the process.

4 个赞

Dracula 主题 - 颜色问题

描述: 在我们的 Discourse 站点上遇到了 Dracula 主题的问题。该主题的外观与其预期外观不同,尤其是在颜色方案和标签外观方面。最初,该主题在我测试的站点上显示与其他使用 Dracula 的站点不同。从 GitHub 存储库重新安装后,外观一致,这表明可能存在过时的代码或变量使用问题。
重现步骤:

  1. 通过“管理”→“自定义”→“主题”安装 Dracula 主题。
  2. 将其设置为默认主题。
  3. 在“管理”→“自定义”下禁用用户其他主题和颜色方案选项。
  4. 在我的个人资料(首选项 → 界面)中确认 Dracula 是唯一可选择的主题,确保我查看的是其默认设置。
  5. 注意到外观差异,尤其是标签,其外观不符合预期(表明主题可能存在问题)。

屏幕截图:

平台:

  • Mac (桌面)

浏览器:

  • Chrome

附加评论: 该问题似乎源于主题中使用了过时的 CSS 变量。Dracula 主题中的当前语法($primary、$tertiary、$secondary)与 Discourse 最新主题中使用的较新变量格式(var(–tertiary)、var(–secondary))相比已过时,如 GitHub 示例所示。这种旧的变量使用很可能导致异常的渲染,尤其是在没有其他可选主题或颜色方案时。即使重新安装主题后问题仍然存在,这表明主题的代码结构存在更深层的问题。

谢谢分享!我正在处理一个修复程序。

是否可以将此设置为主题?

我需要在侧边栏主题切换列表中显示此内容。

您是要求将其安装在 meta 和侧边栏上吗?

颜色方案实际上是您现在也可以在 Discourse 中选择的一种。

1 个赞

是的,可以在 Meta 上选择吗?
目前似乎不可用。

Dracula 在此处 meta 上可用作配色方案选择。

您可以通过访问个人用户偏好设置中的界面偏好设置来找到它。

2 个赞

不,对我来说不是:

您现在应该可以在此元页面上的“偏好设置”中的颜色选择器中选择德古拉配色方案了。

4 篇帖子已拆分为新主题:添加配色方案