Skip to content

Commit 04952cf

Browse files
authored
Merge branch 'main' into main
2 parents bbf8718 + 1972c70 commit 04952cf

File tree

5 files changed

+24
-17
lines changed

5 files changed

+24
-17
lines changed

src/BootstrapBlazor.Shared/Components/Samples/Layouts.razor

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
Introduction="@Localizer["LayoutsUpAndDownIntro"]"
4141
Name="UpAndDown">
4242
<div class="layout-demo">
43-
<Layout ShowFooter="true">
43+
<Layout ShowFooter="true" AdditionalAssemblies="[typeof(MainLayout).Assembly]">
4444
<Header>
4545
<div>Header</div>
4646
</Header>
@@ -58,7 +58,7 @@
5858
Introduction="@Localizer["LayoutsMiddleLeftRightIntro"]"
5959
Name="MiddleLeftRight">
6060
<div class="layout-demo">
61-
<Layout ShowFooter="true">
61+
<Layout ShowFooter="true" AdditionalAssemblies="[typeof(MainLayout).Assembly]">
6262
<Header>
6363
<div>Header</div>
6464
</Header>
@@ -79,7 +79,7 @@
7979
Introduction="@Localizer["LayoutsLeftRightIntro"]"
8080
Name="LeftRight">
8181
<div class="layout-demo">
82-
<Layout ShowFooter="true" IsFullSide="true">
82+
<Layout ShowFooter="true" IsFullSide="true" AdditionalAssemblies="[typeof(MainLayout).Assembly]">
8383
<Header>
8484
<div>Header</div>
8585
</Header>
@@ -100,7 +100,7 @@
100100
Introduction="@Localizer["LayoutsCustomPercentIntro"]"
101101
Name="CustomPercent">
102102
<div class="layout-demo">
103-
<Layout ShowFooter="true" SideWidth="200">
103+
<Layout ShowFooter="true" SideWidth="200" AdditionalAssemblies="[typeof(MainLayout).Assembly]">
104104
<Header>
105105
<div>Header</div>
106106
</Header>
@@ -140,7 +140,7 @@
140140
@((MarkupString)Localizer["LayoutsAppTips7"].Value)
141141
</Tips>
142142
<div class="layout-demo1">
143-
<Layout ShowFooter="true" SideWidth="160px" Menus="IconSideMenuItems1">
143+
<Layout ShowFooter="true" SideWidth="160px" Menus="IconSideMenuItems1" AdditionalAssemblies="[typeof(MainLayout).Assembly]">
144144
<Header>
145145
<div>Header</div>
146146
</Header>
@@ -158,7 +158,7 @@
158158
@Localizer["LayoutsAppTips8"]
159159
</p>
160160
<div class="layout-demo2">
161-
<Layout ShowFooter="true" SideWidth="160px" Menus="IconSideMenuItems2">
161+
<Layout ShowFooter="true" SideWidth="160px" Menus="IconSideMenuItems2" AdditionalAssemblies="[typeof(MainLayout).Assembly]">
162162
<Header>
163163
<div>Header</div>
164164
</Header>

src/BootstrapBlazor/Components/Layout/Layout.razor

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
}
3030
@if (Menus != null)
3131
{
32-
@RenderMenu(IsFullSide)
32+
@RenderMenu
3333
}
3434
</aside>
3535
<section class="layout-right">
@@ -58,7 +58,7 @@
5858
}
5959
@if (Menus != null)
6060
{
61-
@RenderMenu(IsFullSide)
61+
@RenderMenu
6262
}
6363
</aside>
6464
@RenderMain
@@ -100,9 +100,9 @@
100100
@Header
101101
</header>;
102102

103-
RenderFragment<bool> RenderMenu => hasScroll =>
103+
RenderFragment RenderMenu =>
104104
@<div class="layout-menu">
105-
@if (hasScroll)
105+
@if (IsFixedTabHeader || IsFullSide)
106106
{
107107
<Scroll>
108108
<Menu Items="@Menus" IsVertical="true" IsAccordion="@IsAccordion" OnClick="ClickMenu"></Menu>

src/BootstrapBlazor/Components/Layout/Layout.razor.scss

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,10 +233,14 @@
233233
}
234234

235235
&.is-fixed-tab {
236-
.tabs-header {
237-
position: sticky;
238-
top: var(--bb-layout-header-height);
239-
z-index: 5;
236+
.layout-menu,
237+
.tabs {
238+
height: calc(var(--bb-layout-height) - var(--bb-layout-header-height) - var(--bb-layout-footer-height));
239+
240+
.tabs-body {
241+
height: calc(100% - var(--bb-tabs-item-height));
242+
overflow: auto;
243+
}
240244
}
241245
}
242246
}
@@ -275,6 +279,10 @@
275279
top: 0;
276280
height: var(--bb-layout-height);
277281
}
282+
283+
.layout-menu {
284+
height: calc(var(--bb-layout-height) - var(--bb-layout-header-height));
285+
}
278286
}
279287
}
280288

src/BootstrapBlazor/Components/Menu/Menu.razor

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
<CascadingValue Value="this" IsFixed="true">
77
@if (IsVertical)
88
{
9-
<SideMenu Items="@Items" Id="@SideMenuId" class="@SideMenuClassString" OnClick="@OnClickMenu" IsScrollToView="@IsScrollIntoView" />
9+
<SideMenu Items="@Items" Id="@SideMenuId" class="@SideMenuClassString" OnClick="@OnClickMenu"></SideMenu>
1010
}
1111
else
1212
{
13-
<TopMenu Items="@Items" OnClick="@OnClickMenu" />
13+
<TopMenu Items="@Items" OnClick="@OnClickMenu"></TopMenu>
1414
}
1515
</CascadingValue>
1616
</nav>

src/BootstrapBlazor/Components/Tab/Tab.razor.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
.tabs-body-content {
1717
background-color: var(--bs-body-bg);
18-
height: 100%;
1918

2019
&.bb-fs-open {
2120
padding: var(--bb-tabs-body-padding);

0 commit comments

Comments
 (0)