Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/BootstrapBlazor.Shared/Components/Samples/Layouts.razor
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
Introduction="@Localizer["LayoutsUpAndDownIntro"]"
Name="UpAndDown">
<div class="layout-demo">
<Layout ShowFooter="true">
<Layout ShowFooter="true" AdditionalAssemblies="[typeof(MainLayout).Assembly]">
<Header>
<div>Header</div>
</Header>
Expand All @@ -58,7 +58,7 @@
Introduction="@Localizer["LayoutsMiddleLeftRightIntro"]"
Name="MiddleLeftRight">
<div class="layout-demo">
<Layout ShowFooter="true">
<Layout ShowFooter="true" AdditionalAssemblies="[typeof(MainLayout).Assembly]">
<Header>
<div>Header</div>
</Header>
Expand All @@ -79,7 +79,7 @@
Introduction="@Localizer["LayoutsLeftRightIntro"]"
Name="LeftRight">
<div class="layout-demo">
<Layout ShowFooter="true" IsFullSide="true">
<Layout ShowFooter="true" IsFullSide="true" AdditionalAssemblies="[typeof(MainLayout).Assembly]">
<Header>
<div>Header</div>
</Header>
Expand All @@ -100,7 +100,7 @@
Introduction="@Localizer["LayoutsCustomPercentIntro"]"
Name="CustomPercent">
<div class="layout-demo">
<Layout ShowFooter="true" SideWidth="200">
<Layout ShowFooter="true" SideWidth="200" AdditionalAssemblies="[typeof(MainLayout).Assembly]">
<Header>
<div>Header</div>
</Header>
Expand Down Expand Up @@ -140,7 +140,7 @@
@((MarkupString)Localizer["LayoutsAppTips7"].Value)
</Tips>
<div class="layout-demo1">
<Layout ShowFooter="true" SideWidth="160px" Menus="IconSideMenuItems1">
<Layout ShowFooter="true" SideWidth="160px" Menus="IconSideMenuItems1" AdditionalAssemblies="[typeof(MainLayout).Assembly]">
<Header>
<div>Header</div>
</Header>
Expand All @@ -158,7 +158,7 @@
@Localizer["LayoutsAppTips8"]
</p>
<div class="layout-demo2">
<Layout ShowFooter="true" SideWidth="160px" Menus="IconSideMenuItems2">
<Layout ShowFooter="true" SideWidth="160px" Menus="IconSideMenuItems2" AdditionalAssemblies="[typeof(MainLayout).Assembly]">
<Header>
<div>Header</div>
</Header>
Expand Down
8 changes: 4 additions & 4 deletions src/BootstrapBlazor/Components/Layout/Layout.razor
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
}
@if (Menus != null)
{
@RenderMenu(IsFullSide)
@RenderMenu
}
</aside>
<section class="layout-right">
Expand Down Expand Up @@ -58,7 +58,7 @@
}
@if (Menus != null)
{
@RenderMenu(IsFullSide)
@RenderMenu
}
</aside>
@RenderMain
Expand Down Expand Up @@ -100,9 +100,9 @@
@Header
</header>;

RenderFragment<bool> RenderMenu => hasScroll =>
RenderFragment RenderMenu =>
@<div class="layout-menu">
@if (hasScroll)
@if (IsFixedTabHeader || IsFullSide)
{
<Scroll>
<Menu Items="@Menus" IsVertical="true" IsAccordion="@IsAccordion" OnClick="ClickMenu"></Menu>
Expand Down
5 changes: 5 additions & 0 deletions src/BootstrapBlazor/Components/Layout/Layout.razor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@
}

&.is-fixed-tab {
.layout-menu,
.tabs {
height: calc(var(--bb-layout-height) - var(--bb-layout-header-height) - var(--bb-layout-footer-height));

Expand Down Expand Up @@ -278,6 +279,10 @@
top: 0;
height: var(--bb-layout-height);
}

.layout-menu {
height: calc(var(--bb-layout-height) - var(--bb-layout-header-height));
}
}
}

Expand Down
Loading