Skip to content

Commit

Permalink
New Docs: Seperate Server and Wasm Docs (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
mckaragoz authored Nov 5, 2022
1 parent b59bf63 commit b544f07
Show file tree
Hide file tree
Showing 65 changed files with 109 additions and 1,425 deletions.
6 changes: 6 additions & 0 deletions CodeBeamMudExtensions.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComponentViewer", "Componen
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComponentViewer.Wasm", "ComponentViewer.Wasm\ComponentViewer.Wasm.csproj", "{924E72FF-1B0D-4465-9805-AB7B9D114113}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComponentViewer.Docs", "ComponentViewer.Docs\ComponentViewer.Docs.csproj", "{D4DCAB94-89CB-414A-A153-B32830C42682}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -27,6 +29,10 @@ Global
{924E72FF-1B0D-4465-9805-AB7B9D114113}.Debug|Any CPU.Build.0 = Debug|Any CPU
{924E72FF-1B0D-4465-9805-AB7B9D114113}.Release|Any CPU.ActiveCfg = Release|Any CPU
{924E72FF-1B0D-4465-9805-AB7B9D114113}.Release|Any CPU.Build.0 = Release|Any CPU
{D4DCAB94-89CB-414A-A153-B32830C42682}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D4DCAB94-89CB-414A-A153-B32830C42682}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D4DCAB94-89CB-414A-A153-B32830C42682}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D4DCAB94-89CB-414A-A153-B32830C42682}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
29 changes: 29 additions & 0 deletions ComponentViewer.Docs/ComponentViewer.Docs.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>disable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>


<ItemGroup>
<SupportedPlatform Include="browser" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.0.10" />
<PackageReference Include="MudBlazor" Version="6.0.17" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\CodeBeam.MudExtensions\CodeBeam.MudExtensions.csproj" />
</ItemGroup>

<ItemGroup>
<Content Update="Pages\Index.razor">
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
</Content>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@inherits MudComponentBase
@namespace ComponentViewer.Docs.Components

<MudCard Class="component-card pa-2" Elevation="4" @onclick="NavigateComponentPage">
<MudCardHeader>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Microsoft.AspNetCore.Components;

namespace ComponentViewer.Components
namespace ComponentViewer.Docs.Components
{
public partial class ComponentCard
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
@if (HasExpansionPanel)
@namespace ComponentViewer.Docs.Components

@if (HasExpansionPanel)
{
<MudExpansionPanel Text="@Title">
<MudCard Class="component-card mx-2 my-8 pa-2 example-card" Elevation="4">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@inject NavigationManager NavigationManager
@namespace ComponentViewer.Docs.Components

<MudContainer Class="pa-6">
<div class="py-6 d-flex gap-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,12 @@
}
</MudSelect>
<MudSwitch @bind-Checked="_wheel" Color="Color.Primary" Label="Wheel" />
<MudSwitch @bind-Checked="_showHour" Color="Color.Primary" Label="Show Hour" />
<MudSwitch @bind-Checked="_showMinute" Color="Color.Primary" Label="Show Minute" />
<MudSwitch @bind-Checked="_showSecond" Color="Color.Primary" Label="Show Second" />
<MudSwitch @bind-Checked="_showMillisecond" Color="Color.Primary" Label="Show Millisecond" />
<div class="d-flex flex-wrap">
<MudSwitch @bind-Checked="_showHour" Color="Color.Primary" Label="Show Hour" />
<MudSwitch @bind-Checked="_showMinute" Color="Color.Primary" Label="Show Minute" />
<MudSwitch @bind-Checked="_showSecond" Color="Color.Primary" Label="Show Second" />
<MudSwitch @bind-Checked="_showMillisecond" Color="Color.Primary" Label="Show Millisecond" />
</div>
<MudTextField @bind-Value="_delimiter" Variant="Variant.Outlined" Label="Delimiter" />
<MudSelect @bind-Value="_typo" Variant="Variant.Outlined" Label="Typo">
@foreach (Typo item in Enum.GetValues<Typo>())
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@page "/"
@namespace ComponentViewer.Docs.Pages
@using MudExtensions.Enums

<MudScrollbar Width="2" HoverWidth="8" Color="primary" />
Expand Down Expand Up @@ -80,13 +81,14 @@
</MudItem>

<MudItem xs="12" sm="6" md="4" lg="3" xl="2">
<ComponentCard Title="MudWheel"
Description="Smoothly changes values in a wheel within defined ItemCollection." />
<ComponentCard Title="MudWatch"
Description="A performance optimized watch to show current time or show stopwatch or countdown." />
</MudItem>

<MudItem xs="12" sm="6" md="4" lg="3" xl="2">
<ComponentCard Title="MudWatch"
Description="A performance optimized watch to show current time or show stopwatch or countdown." />
<ComponentCard Title="MudWheel"
Description="Smoothly changes values in a wheel within defined ItemCollection." />
</MudItem>

</MudGrid>
</MudContainer>
6 changes: 6 additions & 0 deletions ComponentViewer.Docs/Pages/Index.razor.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.my-component {
border: 2px dashed red;
padding: 1em;
margin: 1em 0;
background-image: url('background.png');
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@inherits LayoutComponentBase
@namespace ComponentViewer.Docs.Shared
@inherits LayoutComponentBase

<style>
@(_fontPicker?.ImportFontStyleText(font))
Expand Down
File renamed without changes.
13 changes: 13 additions & 0 deletions ComponentViewer.Docs/_Imports.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
@using System.Net.Http
@using Microsoft.AspNetCore.Authorization
@using Microsoft.AspNetCore.Components.Forms
@using Microsoft.AspNetCore.Components.Routing
@using Microsoft.AspNetCore.Components.Web
@using Microsoft.AspNetCore.Components.Web.Virtualization
@using Microsoft.JSInterop
@using ComponentViewer
@using ComponentViewer.Docs
@using ComponentViewer.Docs.Components

@using MudBlazor
@using MudExtensions
Binary file added ComponentViewer.Docs/wwwroot/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 3 additions & 7 deletions ComponentViewer.Wasm/App.razor
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
<Router AppAssembly="@typeof(App).Assembly">
<Router AppAssembly="@typeof(ComponentViewer.Docs.Pages.Index).Assembly">
<Found Context="routeData">
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
<RouteView RouteData="@routeData" DefaultLayout="@typeof(ComponentViewer.Docs.Shared.MainLayout)" />
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
</Found>
<NotFound>
<PageTitle>Not found</PageTitle>
<LayoutView Layout="@typeof(MainLayout)">
<LayoutView Layout="@typeof(ComponentViewer.Docs.Shared.MainLayout)">
<p role="alert">Sorry, there's nothing at this address.</p>
</LayoutView>
</NotFound>
</Router>

<MudThemeProvider/>
<MudDialogProvider/>
<MudSnackbarProvider/>
8 changes: 8 additions & 0 deletions ComponentViewer.Wasm/ComponentViewer.Wasm.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@

<ItemGroup>
<ProjectReference Include="..\CodeBeam.MudExtensions\CodeBeam.MudExtensions.csproj" />
<ProjectReference Include="..\ComponentViewer.Docs\ComponentViewer.Docs.csproj" />
</ItemGroup>

<ItemGroup>
<Content Update="wwwroot\favicon.ico">
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</Content>
</ItemGroup>

</Project>
28 changes: 0 additions & 28 deletions ComponentViewer.Wasm/Components/ComponentCard.razor

This file was deleted.

20 changes: 0 additions & 20 deletions ComponentViewer.Wasm/Components/ComponentCard.razor.cs

This file was deleted.

18 changes: 0 additions & 18 deletions ComponentViewer.Wasm/Pages/Counter.razor

This file was deleted.

57 changes: 0 additions & 57 deletions ComponentViewer.Wasm/Pages/FetchData.razor

This file was deleted.

19 changes: 0 additions & 19 deletions ComponentViewer.Wasm/Pages/Index.razor

This file was deleted.

17 changes: 0 additions & 17 deletions ComponentViewer.Wasm/Shared/MainLayout.razor

This file was deleted.

Loading

0 comments on commit b544f07

Please sign in to comment.