# 用于页脚的插件插槽，可使侧边栏保持全高

**URL:** https://meta.discourse.org/t/a-plugin-outlet-for-the-footer-that-keeps-the-sidebar-at-full-height/269384
**Category:** UX
**Created:** [2023年六月23日 13:39 UTC](https://meta.discourse.org/t/a-plugin-outlet-for-the-footer-that-keeps-the-sidebar-at-full-height/269384 "2023-06-23T13:39:30Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![manuel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/manuel/32/468169_2.png) [@manuel](https://meta.discourse.org/u/manuel)
#### Post date: [2023年六月23日 13:39 UTC](https://meta.discourse.org/t/a-plugin-outlet-for-the-footer-that-keeps-the-sidebar-at-full-height/269384/1 "2023-06-23T13:39:31Z")

</div>

我有一个简单的页脚设计，它应该在主背景上居中显示。大致如下：

 ![Screenshot from 2023-06-23 14-26-09](https://global.discourse-cdn.com/meta/original/4X/e/f/4/ef4bc760758987e8abe869bfc14a64e0ac3cd102.png)

在此屏幕截图中，我使用了 `discovery-below` outlet。但在许多路由上没有类似的 outlet 位置。

如果我使用现有的页脚 outlet 之一，与侧边栏的布局将如下所示：

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

因此，问题在于侧边栏被分组在 `main-outlet-wrapper` 中。而当前的页脚 outlet 堆叠在下方，使得放置一个能保持侧边栏全高并保持在主内容下方居中的页脚变得困难。

是否可以在主内容下方提供一个与 `above-main-container` outlet 类似的、一致的 outlet？

---

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [2023年六月23日 16:40 UTC](https://meta.discourse.org/t/a-plugin-outlet-for-the-footer-that-keeps-the-sidebar-at-full-height/269384/2 "2023-06-23T16:40:57Z")

</div>

这确实很有用，我为此提供了一个新的 outlet 的 PR：

> <https://github.com/discourse/discourse/pull/22260/files>
>
> Adding a couple plugin outlets for a theme, as well as one for https://meta.disc…ourse.org/t/a-plugin-outlet-for-the-footer-that-keeps-the-sidebar-at-full-height/269384

我将 `showFooter` 传递给了 `main-outlet-bottom`，因为我认为这对它来说是最有用的……但如果你遇到任何问题，请告诉我。

---

<div class="post-metadata">

### Author: ![manuel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/manuel/32/468169_2.png) [@manuel](https://meta.discourse.org/u/manuel)
#### Post date: [2023年六月26日 15:08 UTC](https://meta.discourse.org/t/a-plugin-outlet-for-the-footer-that-keeps-the-sidebar-at-full-height/269384/3 "2023-06-26T15:08:40Z")

</div>

太棒了！如果遇到问题，我会再联系您。

另外，侧边栏旁边还有一个用于全角横幅的新插槽！我简直不敢相信这个 PR 里有这么多好东西 🤩
