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
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class DemoScreenshotSrcConstants
public const string Home = DemoScreenshotSrcPrefix + "home.png";

// Layout
public const string Demos_URL_Layout = DemoScreenshotSrcPrefix + "home.png";
public const string Demos_URL_Layout = DemoScreenshotSrcPrefix + "layout.png";

// Content
public const string Demos_URL_Icons = DemoScreenshotSrcPrefix + "icons.png";
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
101 changes: 93 additions & 8 deletions blazorbootstrap/Components/Layout/BlazorBootstrapLayout.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,81 @@ public partial class BlazorBootstrapLayout : BlazorBootstrapLayoutComponentBase

protected override string? ClassNames => BuildClassNames(Class, ("bb-page", true));

[Parameter] public RenderFragment? ContentSection { get; set; }
[Parameter] public string? ContentSectionCssClass { get; set; }
/// <summary>
/// Gets or sets the content section.
/// <para>
/// Default value is <see langword="null"/>.
/// </para>
/// </summary>
[AddedVersion("3.2.0")]
[DefaultValue(null)]
[Description("Gets or sets the content section.")]
[Parameter]
public RenderFragment? ContentSection { get; set; }

/// <summary>
/// Gets or sets the CSS class for content section.
/// <para>
/// Default value is <see langword="null"/>.
/// </para>
/// </summary>
[AddedVersion("3.2.0")]
[DefaultValue(null)]
[Description("Gets or sets the CSS class for content section.")]
[Parameter]
public string? ContentSectionCssClass { get; set; }

protected string? ContentSectionCssClassNames => BuildClassNames(ContentSectionCssClass, ("p-4", true));

[Parameter] public RenderFragment? FooterSection { get; set; }
[Parameter] public string? FooterSectionCssClass { get; set; } = "bg-body-tertiary";
/// <summary>
/// Gets or sets the footer section.
/// <para>
/// Default value is <see langword="null"/>.
/// </para>
/// </summary>
[AddedVersion("3.2.0")]
[DefaultValue(null)]
[Description("Gets or sets the footer section.")]
[Parameter]
public RenderFragment? FooterSection { get; set; }

/// <summary>
/// Gets or sets the CSS class applied to the footer section of the component.
/// <para>
/// Default value is <see langword="null"/>.
/// </para>
/// </summary>
[AddedVersion("3.2.0")]
[DefaultValue("bg-body-tertiary")]
[Description("Gets or sets the CSS class applied to the footer section of the component.")]
[Parameter]
public string FooterSectionCssClass { get; set; } = "bg-body-tertiary";

protected string? FooterSectionCssClassNames => BuildClassNames(FooterSectionCssClass, ("bb-footer p-4", true));

[Parameter] public RenderFragment? HeaderSection { get; set; }
[Parameter] public string? HeaderSectionCssClass { get; set; } = "d-flex justify-content-end";
/// <summary>
/// Gets or sets the header section.
/// <para>
/// Default value is <see langword="null"/>.
/// </para>
/// </summary>
[AddedVersion("3.2.0")]
[DefaultValue(null)]
[Description("Gets or sets the header section.")]
[Parameter]
public RenderFragment? HeaderSection { get; set; }

/// <summary>
/// Gets or sets the CSS class applied to the header section of the component.
/// <para>
/// Default value is <see langword="null"/>.
/// </para>
/// </summary>
[AddedVersion("3.2.0")]
[DefaultValue("d-flex justify-content-end")]
[Description("Gets or sets the CSS class applied to the header section of the component.")]
[Parameter]
public string HeaderSectionCssClass { get; set; } = "d-flex justify-content-end";

protected string? HeaderSectionCssClassNames =>
BuildClassNames(
Expand All @@ -25,9 +90,29 @@ public partial class BlazorBootstrapLayout : BlazorBootstrapLayoutComponentBase
("px-4", true)
);

[Parameter] public bool StickyHeader { get; set; }
/// <summary>
/// Gets or sets a value indicating whether the header section is sticky.
/// <para>
/// Default value is <see langword="false"/>.
/// </para>
/// </summary>
[AddedVersion("3.2.0")]
[DefaultValue(false)]
[Description("Gets or sets a value indicating whether the header section is sticky.")]
[Parameter]
public bool StickyHeader { get; set; }

[Parameter] public RenderFragment? SidebarSection { get; set; }
/// <summary>
/// Gets or sets the sidebar section.
/// <para>
/// Default value is <see langword="null"/>.
/// </para>
/// </summary>
[AddedVersion("3.2.0")]
[DefaultValue(null)]
[Description("Gets or sets the sidebar section.")]
[Parameter]
public RenderFragment? SidebarSection { get; set; }

#endregion
}
Loading