Skip to content

Commit

Permalink
[docs] Responsive on this page navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
Harvey1214 committed Sep 21, 2022
1 parent 85a299b commit e3b65ee
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
See also <a href="https://getbootstrap.com/docs/5.2/forms/overview/">Bootstrap Forms</a>.
</p>

<ResponsiveOnThisPageNavigation />

<DocAlert Type="DocAlertType.Info">
Most of our input-components do not require <code>&lt;EditForm&gt;</code> and can be used as standalone inputs (if you don't need the validation).
</DocAlert>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
<p class="lead">@((MarkupString)model.Class.Comments.Summary)</p>
}

<ResponsiveOnThisPageNavigation />

@ChildContent
@MainContent

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<OnThisPageNavigation CssClass="d-none d-md-block d-lg-none my-4">
<h6 class="mt-3 pb-1 border-bottom">On this page</h6>
</OnThisPageNavigation>

<div class="my-4 d-md-none">
<HxCollapseToggleButton Text="On this page" Icon="BootstrapIcon.ChevronExpand" Outline="true" Color="ThemeColor.Primary" CollapseTarget="#on-this-page-navigation-collapse" />
<HxCollapse Id="on-this-page-navigation-collapse" CssClass="mt-2">
<HxCard>
<BodyTemplate>
<OnThisPageNavigation />
</BodyTemplate>
</HxCard>
</HxCollapse>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace Havit.Blazor.Components.Web.Bootstrap.Documentation.Shared.Components;

/// <summary>
/// On this page navigation is handled automatically for pages where the <see cref="ComponentApiDoc"/> component is used.
/// <see cref="ResponsiveOnThisPageNavigation"/> component should be placed on pages where we aren't using <see cref="ComponentApiDoc"/> and want on this page navigation.
/// </summary>
public partial class ResponsiveOnThisPageNavigation
{

}

0 comments on commit e3b65ee

Please sign in to comment.