akveo / akveo/nebular

[Question] How to change centered layout on specific page ?

未关闭
#2,341 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
TypeScript
星标
8.1k
派生
1.5k
PR 合并指标
30 天内没有已合并 PR

描述

Hi! 👋

I have a question about the `nb-layout` and in particular about the `center` option. With this option, we have this behavior (according to the documentation):

> 📝 The layout content (columns) becomes centered when the window width is more than the value specified in the theme variable layout-content-width.

How can we have pages with a full width content with this configuration?

Of course, I don't wish to duplicate the layout structure on each component!

Let's take a simple example of a layout present in the `app.component.html`:
```html





```

I have a solution but I don't like it.
I could use the router (url or data) to set the `center` option.

--
I add another case: being able to add columns in a child component.
For example, if my route display this component template:
```html

First column

Second column

```
This is not possible because `nb-layout-column` is not allowed in depth.
And I can't remove `nb-layout-column` from the `app.component` because the `router-outlet` seems to be not allowed as first child (`nb-layout` > `router-outlet`)

--

What is the best solution to do this?
Thank you for your feedback 😃

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。