Skip to content

Commit 2e777a3

Browse files
committed
Refactor Accordion docs and add dedicated reference page
- Replaced meta/header components in AccordionDocumentation.razor with DemosPageHeadSection for improved structure and SEO. - Removed PageHero and CarbonAds sections; added DocsLink to main docs. - Created Accordion_Doc_01_Documentation.razor as a dedicated reference page with meta tags, screenshot, parameter/method/event tables, and demo link. - Improved separation between demo and documentation for clarity and maintainability.
1 parent 1ffe3d6 commit 2e777a3

2 files changed

Lines changed: 47 additions & 9 deletions

File tree

BlazorBootstrap.Demo.RCL/Components/Pages/Demos/Accordion/AccordionDocumentation.razor

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
@attribute [Route(pageUrl)]
22

3-
<PageMetaTags PageUrl="@pageUrl"
4-
Title="@metaTitle"
5-
Description="@metaDescription"
6-
ImageUrl="@imageUrl" />
3+
<DemosPageHeadSection PageUrl="@pageUrl"
4+
PageTitle="@pageTitle"
5+
PageDescription="@pageDescription"
6+
MetaTitle="@metaTitle"
7+
MetaDescription="@metaDescription"
8+
ImageUrl="@imageUrl" />
79

8-
<PageHero Heading="@pageTitle">
9-
<LeadSection>@pageDescription</LeadSection>
10-
</PageHero>
11-
12-
<CarbonAds />
10+
<DocsLink Href="@DemoRouteConstants.Docs_URL_Accordion" />
1311

1412
<Section Class="p-0" Size="HeadingSize.H2" Name="How it works" PageUrl="@pageUrl" Link="how-it-works">
1513
<div class="mb-3">
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
@attribute [Route(pageUrl)]
2+
3+
<DocsPageHeadSection PageUrl="@pageUrl"
4+
PageTitle="@pageTitle"
5+
PageDescription="@pageDescription"
6+
MetaTitle="@metaTitle"
7+
MetaDescription="@metaDescription"
8+
ImageUrl="@imageUrl" />
9+
10+
<DemoLink Href="@DemoRouteConstants.Demos_URL_Accordion" />
11+
12+
<Section Class="p-0" Size="HeadingSize.H3" Name="Screenshot" PageUrl="@pageUrl" Link="screenshot">
13+
<img src="@imageUrl" class="img-fluid" alt="@metaTitle" />
14+
</Section>
15+
16+
<Section Class="p-0" Size="HeadingSize.H3" Name="Accordion Parameters" PageUrl="@pageUrl" Link="accordion-parameters">
17+
<DocxTable TItem="Accordion" DocType="DocType.Parameters" />
18+
</Section>
19+
20+
<Section Class="p-0" Size="HeadingSize.H3" Name="AccordionItem Parameters" PageUrl="@pageUrl" Link="accordion-item-parameters">
21+
<DocxTable TItem="AccordionItem" DocType="DocType.Parameters" />
22+
</Section>
23+
24+
<Section Class="p-0" Size="HeadingSize.H3" Name="Accordion Methods" PageUrl="@pageUrl" Link="accordion-methods">
25+
<DocxTable TItem="Accordion" DocType="DocType.Methods" />
26+
</Section>
27+
28+
<Section Class="p-0" Size="HeadingSize.H3" Name="Accordion Events" PageUrl="@pageUrl" Link="accordion-events">
29+
<DocxTable TItem="Accordion" DocType="DocType.Events" />
30+
</Section>
31+
32+
@code {
33+
private const string componentName = nameof(Accordion);
34+
private const string pageUrl = DemoRouteConstants.Docs_URL_Accordion;
35+
private const string pageTitle = componentName;
36+
private const string pageDescription = $"This documentation provides a comprehensive reference for the <code>{componentName}</code> component, guiding you through its configuration options.";
37+
private const string metaTitle = $"Blazor {componentName} Component";
38+
private const string metaDescription = $"This documentation provides a comprehensive reference for the {componentName} component, guiding you through its configuration options.";
39+
private const string imageUrl = "https://i.imgur.com/FGgEMp6.jpg";
40+
}

0 commit comments

Comments
 (0)