# 空气主题

**URL:** https://meta.discourse.org/t/air-theme/197703
**Category:** Theme
**Tags:** air-theme
**Created:** [2021年七月20日 20:24 UTC](https://meta.discourse.org/t/air-theme/197703 "2021-07-20T20:24:30Z")
**Posts on this page:** 20
**Page:** 13

<div class="post-metadata">

### Author: ![Steve\_Emerson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/steve_emerson/32/243351_2.png) [@Steve\_Emerson](https://meta.discourse.org/u/Steve_Emerson)
#### Post date: [2023年九月15日 19:20 UTC](https://meta.discourse.org/t/air-theme/197703/435 "2023-09-15T19:20:44Z")

</div>

是的，只是移动文档，所以问题不大。不过，如果最终能修复就更好了。

感谢你对此进行调查 🙂

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [2023年九月15日 20:33 UTC](https://meta.discourse.org/t/air-theme/197703/436 "2023-09-15T20:33:09Z")

</div>

> [@Steve\_Emerson](#):
>
> 不过，如果最终能修复就好了。

问题似乎出在这里：

> <https://github.com/discourse/discourse-air/blob/main/mobile/mobile.scss#L14>

我曾以为可以通过向主题组件添加一些 CSS 来修复这个问题，但事实证明这是一个棘手的问题，因为主文档页面没有向 `body` 标签添加 CSS 类。这意味着仅仅使用这个是不够的。它修复了单个文档主题上的问题，但没有修复文档主题列表上的问题：

```css
html body.archetype-docs-topic #main-outlet {
  border-radius: 0px !important;
  width: calc(100% - 3em) !important;
  background-color: var(--secondary) !important;
  margin-bottom: 0px !important;
}

```

我怀疑修复需要对文档插件和 air 主题都进行一些小的更改。我将与团队跟进此事。应该很快就能修复。

---

<div class="post-metadata">

### Author: ![Steve\_Emerson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/steve_emerson/32/243351_2.png) [@Steve\_Emerson](https://meta.discourse.org/u/Steve_Emerson)
#### Post date: [2023年九月15日 20:49 UTC](https://meta.discourse.org/t/air-theme/197703/437 "2023-09-15T20:49:49Z")

</div>

感谢您对此事的关注 😃

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [2023年九月19日 19:35 UTC](https://meta.discourse.org/t/air-theme/197703/438 "2023-09-19T19:35:19Z")

</div>

> [@jordan-vidrine](#):
>
> 此主题还包含一些组件，可增强您的论坛。

在此处添加一条注释，说明“加载滑块”和“深色浅色方案切换器”已从主题组件中移除：

> <https://github.com/discourse/discourse-air/blob/main/about.json#L5-L9>

我已从 OP 中移除对“加载滑块”的引用。是否也应移除“深色浅色方案切换器”，或者是否有类似的组件可与侧边栏配合使用，应添加该组件？

---

<div class="post-metadata">

### Author: ![jordan.vidrine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jordan.vidrine/32/515563_2.png) [@jordan.vidrine](https://meta.discourse.org/u/jordan.vidrine)
#### Post date: [2023年九月25日 20:06 UTC](https://meta.discourse.org/t/air-theme/197703/439 "2023-09-25T20:06:24Z")

</div>

我相信此组件现在可以与侧边栏配合使用。有一个设置可以将其设置为在页眉或侧边栏中。

---

<div class="post-metadata">

### Author: ![erikds](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/erikds/32/245561_2.png) [@erikds](https://meta.discourse.org/u/erikds)
#### Post date: [2023年十月2日 23:40 UTC](https://meta.discourse.org/t/air-theme/197703/441 "2023-10-02T23:40:44Z")

</div>

大家好，主题很棒。我对 `.nav-pils:not(.user-nav) li a` 选择器的边框半径有一个小小的瑕疵，这导致活动标签的边框不一致地尖锐：

 ![image](https://global.discourse-cdn.com/meta/original/4X/2/3/0/230fd074a9c29742a036524134f73b455c322242.png)

将底部边框半径设置为 0 可以解决这个问题。你们是否愿意接受一个 PR，或者是我遗漏了什么？

 ![image](https://global.discourse-cdn.com/meta/original/4X/b/8/b/b8bc7ed16bd51f3acf57726a56ed3acda2992bf3.png)

编辑：由于只有几行代码，我已经去做了并在这里提交了一个 PR [https://github.com/discourse/discourse-air/pull/38](https://github.com/discourse/discourse-air/pull/38)。

---

<div class="post-metadata">

### Author: ![erikds](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/erikds/32/245561_2.png) [@erikds](https://meta.discourse.org/u/erikds)
#### Post date: [2023年十月3日 14:55 UTC](https://meta.discourse.org/t/air-theme/197703/442 "2023-10-03T14:55:07Z")

</div>

抱歉，再挑一个小毛病——想知道这是否是使用[events插件](https://meta.discourse.org/t/events-plugin/69776)遇到的类似问题：

 ![image](https://global.discourse-cdn.com/meta/original/4X/7/7/d/77d6d1a2b2f5e7928f810c83fe0b1023c45b4780.jpeg)

---

<div class="post-metadata">

### Author: ![cmahns](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cmahns/32/329271_2.png) [@cmahns](https://meta.discourse.org/u/cmahns)
#### Post date: [2023年十月4日 12:45 UTC](https://meta.discourse.org/t/air-theme/197703/443 "2023-10-04T12:45:12Z")

</div>

在全屏使用聊天时，打开线程窗格时似乎有一个轻微的 CSS 挂件。在线程的 X 按钮旁边的右侧：

 ![Screenshot from 2023-10-04 08-39-18](https://global.discourse-cdn.com/meta/original/4X/2/8/0/280c89070dda57ebdb2ab2a58de8faf132075c38.png)  
 ![Screenshot from 2023-10-04 08-37-26](https://global.discourse-cdn.com/meta/original/4X/e/5/a/e5a9b9d44186481322daf4c851b2ace7afac2763.png)

---

<div class="post-metadata">

### Author: ![jenmck](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jenmck/32/332487_2.png) [@jenmck](https://meta.discourse.org/u/jenmck)
#### Post date: [2023年十月11日 00:22 UTC](https://meta.discourse.org/t/air-theme/197703/444 "2023-10-11T00:22:01Z")

</div>

> [@imgh05t](#):
>
> 谢谢，这奏效了！但关于显示子类别呢？这段代码不知何故不起作用
> 
> ```plaintext
> .category-boxes .subcategories {
> display: flex !important;
> flex-flow: wrap;
> }
> 
> ```

有人可能对此有解决方案，以在类别框中显示子类别吗？

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [2023年十月13日 02:18 UTC](https://meta.discourse.org/t/air-theme/197703/447 "2023-10-13T02:18:55Z")

</div>

您好 @jordan.vidrine，现代分类框显示有可用更新。更新后现在显示空白页。

 ![Screenshot_20231012-231827](https://global.discourse-cdn.com/meta/original/4X/8/5/a/85a2cd8f3e5539744f439b2eb6f4e9ad8d6ec5ef.png)

测试通过

## 升级 Docker 和 Discourse 后已修复。但更新并未显示必需项。

---

<div class="post-metadata">

### Author: ![wizible](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wizible/32/332934_2.png) [@wizible](https://meta.discourse.org/u/wizible)
#### Post date: [2023年十月13日 16:31 UTC](https://meta.discourse.org/t/air-theme/197703/448 "2023-10-13T16:31:02Z")

</div>

我想从 discourse-search-banner 背景中移除渐变，使其只有一种颜色。  
我已经阅读了文章 [https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966。](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966%E3%80%82)  
但是，我找不到“编辑 HTML/CSS”按钮。我收到的消息是“如果您想编辑此主题，则必须在其存储库中提交更改”。

如何对 Air 主题 + 组件进行 CSS/HTML 更改？

谢谢。

---

<div class="post-metadata">

### Author: ![jordan.vidrine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jordan.vidrine/32/515563_2.png) [@jordan.vidrine](https://meta.discourse.org/u/jordan.vidrine)
#### Post date: [2023年十月13日 16:49 UTC](https://meta.discourse.org/t/air-theme/197703/449 "2023-10-13T16:49:14Z")

</div>

此帖子介绍了如何添加/编辑您自己的 CSS 来影响主题。

> [@Air Theme](https://meta.discourse.org/t/discourse-air-theme/197703/421?u=jordan-vidrine):
>
> Installing your own theme-component and attaching it to the theme should work. You will want to add this line into the css of the theme component. .custom-category-boxes .description { display: none; } To install a custom theme component you will go to /admin/customize/themes click Install then click Create New. From there you will be taken to the new component’s page, where you will select which theme you want it to be included on. You can then click Edit CSS + Html and add the code I s…

---

<div class="post-metadata">

### Author: ![wizible](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wizible/32/332934_2.png) [@wizible](https://meta.discourse.org/u/wizible)
#### Post date: [2023年十月13日 16:53 UTC](https://meta.discourse.org/t/air-theme/197703/450 "2023-10-13T16:53:56Z")

</div>

首先，祝您生日快乐。  
其次，感谢您的答复。

我再次查看了。但正如我之前所说。我的 Air 主题中没有“编辑 HTML/CSS”按钮。在默认主题中，我有该按钮。

 ![image](https://global.discourse-cdn.com/meta/original/4X/c/9/f/c9f719d9cfc4e3eef728e36d98ec74faab121417.png)  
 ![image](https://global.discourse-cdn.com/meta/original/4X/0/d/a/0da248a88f8b1c67ee227a64e68700276b544f57.png)

---

<div class="post-metadata">

### Author: ![jordan.vidrine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jordan.vidrine/32/515563_2.png) [@jordan.vidrine](https://meta.discourse.org/u/jordan.vidrine)
#### Post date: [2023年十月13日 17:04 UTC](https://meta.discourse.org/t/air-theme/197703/451 "2023-10-13T17:04:09Z")

</div>

> [@wizible](#):
>
> 首先，祝您生日快乐。  
> 其次，感谢您的回答。

不客气！

您首先需要从主题组件菜单中创建自己的主题组件。然后，您需要在 air 主题上启用该主题组件。

从那里开始，您在新主题组件中所做的 CSS/HTML 更改将应用于 air 主题。

---

<div class="post-metadata">

### Author: ![wizible](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wizible/32/332934_2.png) [@wizible](https://meta.discourse.org/u/wizible)
#### Post date: [2023年十月13日 17:10 UTC](https://meta.discourse.org/t/air-theme/197703/452 "2023-10-13T17:10:58Z")

</div>

啊，好的，我现在明白了。所以就像 WordPress 一样，这是一个子主题，对吧？

我也必须保留所有原始组件，对吧？

 ![image](https://global.discourse-cdn.com/meta/original/4X/6/2/6/626c96370d8fb010bc456614fb04bb19337a8066.png)

---

<div class="post-metadata">

### Author: ![Titi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/titi/32/333006_2.png) [@Titi](https://meta.discourse.org/u/Titi)
#### Post date: [2023年十一月1日 00:17 UTC](https://meta.discourse.org/t/air-theme/197703/455 "2023-11-01T00:17:37Z")

</div>

您好，

请问如何更改欢迎消息的大小？  
 ![image](https://global.discourse-cdn.com/meta/original/4X/6/f/f/6ffea809d686a64767059b6d05aaa4bd6db84e32.png)

如果找到它，我们只需修改 CSS 并设置合适的大小：

```plaintext
.custom-search-banner-wrap h1 {
    font-size: 3em;
}

```

> [@yhmtsai](#):
>
> 您好，我正在使用 Air Theme 和 [Topic List Thumbnails Theme Component - theme - Discourse Meta](https://meta.discourse.org/t/topic-list-thumbnails-theme-component/150602/211)

您好 @jordan.vidrine  
我正在使用 Air Theme 和 [Topic List Thumbnails Theme Component - theme - Discourse Meta](https://meta.discourse.org/t/topic-list-thumbnails-theme-component/150602/211) 的列表模式以及 Air Theme。它运行良好，但我遇到了一个问题，还没有找到解决方法。  
我在“桌面分类页面样式”字段中填写了：  
分类和最新主题

在主页上，我看到了分类，但在分类下方，最新主题以默认模板显示。我希望使用列表模式的缩略图。  
我该如何操作？

供参考，列表模式的缩略图在分类内部运行良好。

---

<div class="post-metadata">

### Author: ![jordan.vidrine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jordan.vidrine/32/515563_2.png) [@jordan.vidrine](https://meta.discourse.org/u/jordan.vidrine)
#### Post date: [2023年十一月1日 16:32 UTC](https://meta.discourse.org/t/air-theme/197703/456 "2023-11-01T16:32:05Z")

</div>

我不认为该组件与“近期主题分类”页面上生成的分类列表兼容。所有“分类…”页面都有其自身的特殊模板，该组件不会影响它们。

---

<div class="post-metadata">

### Author: ![KCAS](https://avatars.discourse-cdn.com/v4/letter/k/13edae/32.png) [@KCAS](https://meta.discourse.org/u/KCAS)
#### Post date: [2023年十一月11日 11:59 UTC](https://meta.discourse.org/t/air-theme/197703/458 "2023-11-11T11:59:11Z")

</div>

您好，

我在 [Double boxes bug “Modern Category + Group Boxes” Subcategories] 中遇到了一个问题。有什么办法可以解决吗？ ([Double boxes bug "Modern Category + Group Boxes" Subcategories](https://meta.discourse.org/t/double-boxes-bug-modern-category-group-boxes-subcategories/285169))

> [@Double boxes bug "Modern Category + Group Boxes" Subcategories](https://meta.discourse.org/t/double-boxes-bug-modern-category-group-boxes-subcategories/285169):
>
> Hello, When using the “[Modern Category + Group Boxes](https://github.com/discourse/discourse-minimal-category-boxes)” component, in theme [Air](https://github.com/discourse/discourse-air). By default it won’t show sub catergory boxes. There is a specific setting for this within the category \> Settings \> “Show subcategory list above topics in this category.”. However, when this is enabled it shows both the “Modern Category + Group Boxes” and the default ones, instead of just the modern ones. Top ones are modern. bottom are the original.

---

<div class="post-metadata">

### Author: ![jordan.vidrine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jordan.vidrine/32/515563_2.png) [@jordan.vidrine](https://meta.discourse.org/u/jordan.vidrine)
#### Post date: [2023年十一月13日 16:47 UTC](https://meta.discourse.org/t/air-theme/197703/460 "2023-11-13T16:47:19Z")

</div>

> [@KCAS](#):
>
> 我在 [Double boxes bug “Modern Category + Group Boxes” Subcategories] 上遇到了问题。有什么修复的建议吗？ ([Double boxes bug “Modern Category + Group Boxes” Subcategories](https://meta.discourse.org/t/double-boxes-bug-modern-category-group-boxes-subcategories/285169))

这个问题已经修复了 😄

---

<div class="post-metadata">

### Author: ![dschwerin-teachforau](https://avatars.discourse-cdn.com/v4/letter/d/76d3ee/32.png) [@dschwerin-teachforau](https://meta.discourse.org/u/dschwerin-teachforau)
#### Post date: [2023年十二月12日 01:48 UTC](https://meta.discourse.org/t/air-theme/197703/462 "2023-12-12T01:48:20Z")

</div>

我们能否编辑方框中的类别缩写（如下图所示）？

 ![Category abbreviations](https://global.discourse-cdn.com/meta/original/4X/b/f/b/bfb7658db6bdbd557ea9d32fe3261231383a1828.png)

我们非常希望能够更新这些缩写，因为我们有许多类别名称相似（名称是基于班级/年级的迭代），所以它们的缩写也越来越相似。此外，这些缩写对我们的社区来说意义不大。

[上一頁](https://meta.discourse.org/t/air-theme/197703.md?page=12)

[下一頁](https://meta.discourse.org/t/air-theme/197703.md?page=14)
