Daemonite Material 主题:充足的布局调整

动机

调整 Daemonite Material Theme 的整体布局,使其外观稍显大胆,主要通过使用更大的字体尺寸和元素尺寸来实现。另一方面,减小部分字体尺寸以优化移动端的显示效果。

背景

这是在另一天为另一个 Discourse 实例实现 Daemonite Material Theme 时产生的想法。虽然这仅涉及一些 CSS 的微小修改,但我们将其整理并打包,以帮助有类似需求的其他人。此外,这也可能引发关于是否以及如何将此主题整合到原始主题中的讨论。

详情

  • 默认字体尺寸
  • 更大的分类标题
  • 更大的头像图片
  • 移除主题状态图标的尺寸限制
  • 更大的 详细 主题条目
  • 主题页面上主题标题的字体尺寸更小
  • 增加主题页面上主题帖子条目的宽度

截图

请参见下文。

设置

安装

配置

目前,此主题组件没有任何配置设置。

7 个赞

Some screenshots by example…


Topic item (verbose)

Larger font size, don’t limit avatar size.

Before

image

After

image


Topic item (narrow)

Before

image

After

image


Category item

Removed font size limitation on category title and description.

Before

image

After

image


Title sizes on topic page / in header

Decreased font size here. Especially on mobile, this makes a huge difference.

Topic title on desktop

Before

After

Topic title on mobile, before/after

 

Header/title layout on mobile

Before

image

After

image


Increase topic post item width

Before

After

1 个赞

When combining this with some other tweaks using the Category badge adjustment component, which is basically about making the corners of the category badges less rounded and emphasizing the category label, you will get these results:

Before

image

After

image

2 个赞

I’m guessing there is a bit more to it :stuck_out_tongue:

Using Safari 12.0.2:

2 个赞

That’s probably due to our amendments in Daemonite Material Theme: Ample layout adjustments. We really didn’t know what we were doing actually. Thanks for noticing!

Bummer. This indeed works fine with Safari Version 11.0.3, the only one available to me. Haven’t been able to look at this through Safari 12.x yet.

I would like to avoid spamming the main topic when working on this, so could someone from the Discourse team please divert this discussion (i.e. the last three topic items) to Daemonite Material Theme: Ample layout adjustments? Thanks!

1 个赞

Here we are. Thanks, @Johani!

1 个赞

I will be happy to run further tests and report back if you provide me with instructions.

Thanks @_vincent. I just gave it a try on browserstack.com as there’s no Safari 12.x currently around us.

Results for Safari 11.1 and 12.0

https://www.browserstack.com/screenshots/9438a3becc3af763386c60bd955bf1c91bd78ae2

Thumbnails


OS X High Sierra: Safari 11.1


OS X Mojave: Safari 12


This looks reasonably good to me. Do you have an idea what could have gone wrong? Do you have more details about your devices or setup, if this might actually matter resolving this issue? I feel a bit silly now.

Did you switch back to default theme?

Currently yes, in order to investigate the brand header overlapping issue on the account activation page reported by @LittleLebowsky.

1 个赞


系统头像有误