-
-
Notifications
You must be signed in to change notification settings - Fork 532
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* RouterTabs ongoing * RouterTabs | Able to set PageAttribute with title, cssclass, etc | Handle closing | Handle navigation on tab change * RouterTabs | Null checks * Adjust naming, regions, etc * Rename Title to Name * Router Tabs Demo example * Docs & ReleaseNotes | RouterTabs * Component Name in sidebar * Formating * Optimize examples and docs * Prefer to use just the DocsLayout to avoid layout refresh | Make Installation a Section for side nav detection * Add margin to close button --------- Co-authored-by: Mladen Macanovic <[email protected]>
- Loading branch information
1 parent
2c2379d
commit f279562
Showing
34 changed files
with
797 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
@inherits MainLayout | ||
|
||
@if ( layoutType == "fixed-header" ) | ||
{ | ||
<Layout Sider> | ||
<LayoutSider> | ||
<LayoutSiderContent> | ||
<SideMenu /> | ||
</LayoutSiderContent> | ||
</LayoutSider> | ||
<Layout> | ||
<LayoutHeader Fixed> | ||
<TopMenu ThemeEnabledChanged="@OnThemeEnabledChanged" | ||
ThemeGradientChanged="@OnThemeGradientChanged" | ||
ThemeRoundedChanged="@OnThemeRoundedChanged" | ||
ThemeColorChanged="@OnThemeColorChanged" | ||
@bind-LayoutType="@layoutType" /> | ||
</LayoutHeader> | ||
<LayoutContent Padding="Padding.Is4.OnX"> | ||
<RouterTabs /> | ||
</LayoutContent> | ||
</Layout> | ||
</Layout> | ||
} | ||
else if ( layoutType == "fixed-header-footer-only" ) | ||
{ | ||
<Layout> | ||
<LayoutHeader Fixed> | ||
<TopMenu ThemeEnabledChanged="@OnThemeEnabledChanged" | ||
ThemeGradientChanged="@OnThemeGradientChanged" | ||
ThemeRoundedChanged="@OnThemeRoundedChanged" | ||
ThemeColorChanged="@OnThemeColorChanged" | ||
@bind-LayoutType="@layoutType" /> | ||
</LayoutHeader> | ||
<LayoutContent Padding="Padding.Is4.OnX"> | ||
<RouterTabs /> | ||
</LayoutContent> | ||
<LayoutFooter Fixed> | ||
<FooterMenu></FooterMenu> | ||
</LayoutFooter> | ||
</Layout> | ||
} | ||
else if ( layoutType == "sider-with-header-on-top" ) | ||
{ | ||
<Layout> | ||
<LayoutHeader Fixed> | ||
<TopMenu ThemeEnabledChanged="@OnThemeEnabledChanged" | ||
ThemeGradientChanged="@OnThemeGradientChanged" | ||
ThemeRoundedChanged="@OnThemeRoundedChanged" | ||
ThemeColorChanged="@OnThemeColorChanged" | ||
@bind-LayoutType="@layoutType" /> | ||
</LayoutHeader> | ||
<Layout Sider> | ||
<LayoutSider> | ||
<LayoutSiderContent> | ||
<SideMenu /> | ||
</LayoutSiderContent> | ||
</LayoutSider> | ||
<Layout> | ||
<LayoutContent Padding="Padding.Is4.OnX"> | ||
<RouterTabs /> | ||
</LayoutContent> | ||
</Layout> | ||
</Layout> | ||
</Layout> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
using System.Threading.Tasks; | ||
using Blazorise.Localization; | ||
using Microsoft.AspNetCore.Components; | ||
|
||
namespace Blazorise.Demo.Layouts; | ||
|
||
public partial class RouterTabsLayout : MainLayout | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
@layout RouterTabsLayout | ||
@page "/tests/routertabs" | ||
@attribute [RouterTabsPageAttribute( Name: "Router Tabs", Closeable: false )] | ||
|
||
<Row> | ||
<Column ColumnSize="ColumnSize.IsFull"> | ||
<Paragraph> | ||
This example uses a custom layout that replaces the body render with the RouterTabs component. | ||
Each navigation using this custom layout will render a new tab with the content of the page. | ||
</Paragraph> | ||
<Paragraph> | ||
Use the navigation links below to see the RouterTabs in action. | ||
</Paragraph> | ||
<UnorderedList> | ||
<UnorderedListItem><Anchor To="/tests/routertabs">Router Tabs Page 1</Anchor></UnorderedListItem> | ||
<UnorderedListItem><Anchor To="/tests/routertabs2">Router Tabs Page 2</Anchor></UnorderedListItem> | ||
<UnorderedListItem><Anchor To="/tests/routertabs3">Router Tabs Page 3</Anchor></UnorderedListItem> | ||
</UnorderedList> | ||
</Column> | ||
</Row> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
@layout RouterTabsLayout | ||
@page "/tests/routertabs2" | ||
@attribute [RouterTabsPageAttribute( Name: "Router Tabs 2", Closeable: true )] | ||
|
||
<Row> | ||
<Column ColumnSize="ColumnSize.IsFull"> | ||
<Paragraph> | ||
The Router tabs example page 2 | ||
</Paragraph> | ||
<UnorderedList> | ||
<UnorderedListItem><Anchor To="/tests/routertabs">Router Tabs Page 1</Anchor></UnorderedListItem> | ||
<UnorderedListItem><Anchor To="/tests/routertabs2">Router Tabs Page 2</Anchor></UnorderedListItem> | ||
<UnorderedListItem><Anchor To="/tests/routertabs3">Router Tabs Page 3</Anchor></UnorderedListItem> | ||
</UnorderedList> | ||
</Column> | ||
</Row> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
@layout RouterTabsLayout | ||
@page "/tests/routertabs3" | ||
@attribute [RouterTabsPageAttribute( Name: "Router Tabs 3", Closeable: true )] | ||
|
||
<Row> | ||
<Column ColumnSize="ColumnSize.IsFull"> | ||
<Paragraph> | ||
The Router tabs example page 3 | ||
</Paragraph> | ||
<UnorderedList> | ||
<UnorderedListItem><Anchor To="/tests/routertabs">Router Tabs Page 1</Anchor></UnorderedListItem> | ||
<UnorderedListItem><Anchor To="/tests/routertabs2">Router Tabs Page 2</Anchor></UnorderedListItem> | ||
<UnorderedListItem><Anchor To="/tests/routertabs3">Router Tabs Page 3</Anchor></UnorderedListItem> | ||
</UnorderedList> | ||
</Column> | ||
</Row> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
...Blazorise.Docs/Pages/Docs/Extensions/RouterTabs/Code/RouterTabsAppExample - CopyCode.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<div class="blazorise-codeblock"> | ||
<div class="html"><pre> | ||
<span class="htmlTagDelimiter"><</span><span class="htmlElementName">Router</span> <span class="htmlAttributeName">AppAssembly</span><span class="htmlOperator">=</span><span class="quot">"</span><span class="htmlAttributeValue">typeof(App).Assembly</span><span class="quot">"</span><span class="htmlTagDelimiter">></span> | ||
<span class="htmlTagDelimiter"><</span><span class="htmlElementName">Found</span> <span class="htmlAttributeName">Context</span><span class="htmlOperator">=</span><span class="quot">"</span><span class="htmlAttributeValue">routeData</span><span class="quot">"</span><span class="htmlTagDelimiter">></span> | ||
<span class="htmlTagDelimiter"><</span><span class="htmlElementName">CascadingValue</span> <span class="htmlAttributeName">Value</span><span class="htmlOperator">=</span><span class="quot">"</span><span class="htmlAttributeValue">routeData</span><span class="quot">"</span><span class="htmlTagDelimiter">></span> | ||
<span class="htmlTagDelimiter"><</span><span class="htmlElementName">RouteView</span> <span class="htmlAttributeName">RouteData</span><span class="htmlOperator">=</span><span class="quot">"</span><span class="htmlAttributeValue">routeData</span><span class="quot">"</span> <span class="htmlAttributeName">DefaultLayout</span><span class="htmlOperator">=</span><span class="quot">"</span><span class="htmlAttributeValue">typeof(MainLayout)</span><span class="quot">"</span> <span class="htmlTagDelimiter">/></span> | ||
<span class="htmlTagDelimiter"></</span><span class="htmlElementName">CascadingValue</span><span class="htmlTagDelimiter">></span> | ||
<span class="htmlTagDelimiter"></</span><span class="htmlElementName">Found</span><span class="htmlTagDelimiter">></span> | ||
<span class="htmlTagDelimiter"><</span><span class="htmlElementName">NotFound</span><span class="htmlTagDelimiter">></span> | ||
<span class="htmlTagDelimiter"><</span><span class="htmlElementName">p</span><span class="htmlTagDelimiter">></span>Sorry, there's nothing at this address.<span class="htmlTagDelimiter"></</span><span class="htmlElementName">p</span><span class="htmlTagDelimiter">></span> | ||
<span class="htmlTagDelimiter"></</span><span class="htmlElementName">NotFound</span><span class="htmlTagDelimiter">></span> | ||
<span class="htmlTagDelimiter"></</span><span class="htmlElementName">Router</span><span class="htmlTagDelimiter">></span> | ||
</pre></div> | ||
</div> |
14 changes: 14 additions & 0 deletions
14
...tation/Blazorise.Docs/Pages/Docs/Extensions/RouterTabs/Code/RouterTabsAppExampleCode.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<div class="blazorise-codeblock"> | ||
<div class="html"><pre> | ||
<span class="htmlTagDelimiter"><</span><span class="htmlElementName">Router</span> <span class="htmlAttributeName">AppAssembly</span><span class="htmlOperator">=</span><span class="quot">"</span><span class="htmlAttributeValue">typeof(App).Assembly</span><span class="quot">"</span><span class="htmlTagDelimiter">></span> | ||
<span class="htmlTagDelimiter"><</span><span class="htmlElementName">Found</span> <span class="htmlAttributeName">Context</span><span class="htmlOperator">=</span><span class="quot">"</span><span class="htmlAttributeValue">routeData</span><span class="quot">"</span><span class="htmlTagDelimiter">></span> | ||
<span class="htmlTagDelimiter"><</span><span class="htmlElementName">CascadingValue</span> <span class="htmlAttributeName">Value</span><span class="htmlOperator">=</span><span class="quot">"</span><span class="htmlAttributeValue">routeData</span><span class="quot">"</span><span class="htmlTagDelimiter">></span> | ||
<span class="htmlTagDelimiter"><</span><span class="htmlElementName">RouteView</span> <span class="htmlAttributeName">RouteData</span><span class="htmlOperator">=</span><span class="quot">"</span><span class="htmlAttributeValue">routeData</span><span class="quot">"</span> <span class="htmlAttributeName">DefaultLayout</span><span class="htmlOperator">=</span><span class="quot">"</span><span class="htmlAttributeValue">typeof(MainLayout)</span><span class="quot">"</span> <span class="htmlTagDelimiter">/></span> | ||
<span class="htmlTagDelimiter"></</span><span class="htmlElementName">CascadingValue</span><span class="htmlTagDelimiter">></span> | ||
<span class="htmlTagDelimiter"></</span><span class="htmlElementName">Found</span><span class="htmlTagDelimiter">></span> | ||
<span class="htmlTagDelimiter"><</span><span class="htmlElementName">NotFound</span><span class="htmlTagDelimiter">></span> | ||
<span class="htmlTagDelimiter"><</span><span class="htmlElementName">p</span><span class="htmlTagDelimiter">></span>Sorry, there's nothing at this address.<span class="htmlTagDelimiter"></</span><span class="htmlElementName">p</span><span class="htmlTagDelimiter">></span> | ||
<span class="htmlTagDelimiter"></</span><span class="htmlElementName">NotFound</span><span class="htmlTagDelimiter">></span> | ||
<span class="htmlTagDelimiter"></</span><span class="htmlElementName">Router</span><span class="htmlTagDelimiter">></span> | ||
</pre></div> | ||
</div> |
9 changes: 9 additions & 0 deletions
9
...ion/Blazorise.Docs/Pages/Docs/Extensions/RouterTabs/Code/RouterTabsLayoutExampleCode.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<div class="blazorise-codeblock"> | ||
<div class="html"><pre> | ||
<span class="atSign">@</span>inherits LayoutComponentBase | ||
|
||
<span class="htmlTagDelimiter"><</span><span class="htmlElementName">Div</span> <span class="htmlAttributeName">Class</span><span class="htmlOperator">=</span><span class="quot">"</span><span class="htmlAttributeValue">layout</span><span class="quot">"</span><span class="htmlTagDelimiter">></span> | ||
<span class="htmlTagDelimiter"><</span><span class="htmlElementName">RouterTabs</span> <span class="htmlTagDelimiter">/></span> | ||
<span class="htmlTagDelimiter"></</span><span class="htmlElementName">Div</span><span class="htmlTagDelimiter">></span> | ||
</pre></div> | ||
</div> |
5 changes: 5 additions & 0 deletions
5
...zorise.Docs/Pages/Docs/Extensions/RouterTabs/Code/RouterTabsPageAttributeExampleCode.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<div class="blazorise-codeblock"> | ||
<div class="html"><pre> | ||
<span class="atSign">@</span>attribute [RouterTabsPageAttribute( Name: "Example", Closeable: true )] | ||
</pre></div> | ||
</div> |
9 changes: 9 additions & 0 deletions
9
...ise.Docs/Pages/Docs/Extensions/RouterTabs/Code/RouterTabsRegisterServicesExampleCode.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<div class="blazorise-codeblock"> | ||
<div class="html"><pre> | ||
using Blazorise.Components; | ||
|
||
builder.Services | ||
.AddBlazorise() | ||
.AddBlazoriseRouterTabs(); | ||
</pre></div> | ||
</div> |
10 changes: 10 additions & 0 deletions
10
...ion/Blazorise.Docs/Pages/Docs/Extensions/RouterTabs/Examples/RouterTabsAppExample.snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<Router AppAssembly="typeof(App).Assembly"> | ||
<Found Context="routeData"> | ||
<CascadingValue Value="routeData"> | ||
<RouteView RouteData="routeData" DefaultLayout="typeof(MainLayout)" /> | ||
</CascadingValue> | ||
</Found> | ||
<NotFound> | ||
<p>Sorry, there's nothing at this address.</p> | ||
</NotFound> | ||
</Router> |
Oops, something went wrong.