Skip to content

Commit 80b1ba3

Browse files
committed
Add project files.
1 parent 6c236a2 commit 80b1ba3

70 files changed

Lines changed: 60217 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CodeBeam.Website.slnx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<Solution>
2+
<Project Path="CodeBeam.Website/CodeBeam.Website.Client/CodeBeam.Website.Client.csproj" />
3+
<Project Path="CodeBeam.Website/CodeBeam.Website/CodeBeam.Website.csproj" />
4+
</Solution>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
@namespace CodeBeam.UltimateAuth.Sample
2+
@inherits ComponentBase
3+
4+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 240" width="@Size" height="@Size" style="@BuildStyle()" class="@Class">
5+
6+
@if (Variant == UAuthLogoVariant.Brand)
7+
{
8+
<path fill="@ShieldColor"
9+
d="M32.39,14.07H167.61c11.27,0,18,6.76,18,18V133.52c0,22.54-58.59,69.87-85.64,92.41-27-22.54-85.64-69.87-85.64-92.41V32.1C14.36,20.83,21.12,14.07,32.39,14.07Z" />
10+
11+
<path fill="@KeyColor" fill-rule="evenodd" d="@KeyPath" />
12+
}
13+
else
14+
{
15+
<path d="M32.39,14.07H167.61c11.27,0,18,6.76,18,18V133.52c0,22.54-58.59,69.87-85.64,92.41-27-22.54-85.64-69.87-85.64-92.41V32.1C14.36,20.83,21.12,14.07,32.39,14.07Z" />
16+
17+
<path fill-rule="evenodd" d="@KeyPath" />
18+
}
19+
</svg>
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
using Microsoft.AspNetCore.Components;
2+
using Microsoft.AspNetCore.Components.Web;
3+
4+
namespace CodeBeam.UltimateAuth.Sample;
5+
6+
public partial class UAuthLogo : ComponentBase
7+
{
8+
[Parameter] public UAuthLogoVariant Variant { get; set; } = UAuthLogoVariant.Brand;
9+
10+
[Parameter] public int Size { get; set; } = 32;
11+
12+
[Parameter] public string? ShieldColor { get; set; } = "#00072d";
13+
[Parameter] public string? KeyColor { get; set; } = "#f6f5ae";
14+
15+
[Parameter] public string? Class { get; set; }
16+
[Parameter] public string? Style { get; set; }
17+
18+
private string BuildStyle()
19+
{
20+
if (Variant == UAuthLogoVariant.Mono)
21+
return $"color: {KeyColor}; {Style}";
22+
23+
return Style ?? "";
24+
}
25+
26+
protected string KeyPath => @"
27+
M120.43,39.44H79.57A11.67,11.67,0,0,0,67.9,51.11V77.37
28+
A11.67,11.67,0,0,0,79.57,89H90.51l3.89,3.9v5.32l-3.8,3.81v81.41H99
29+
v-5.33h13.69V169H108.1v-3.8H99C99,150.76,111.9,153,111.9,153
30+
V99.79h-8V93.32L108.19,89h12.24
31+
A11.67,11.67,0,0,0,132.1,77.37V51.11
32+
A11.67,11.67,0,0,0,120.43,39.44Z
33+
34+
M79.57,48.19h5.84a2.92,2.92 0 0 1 2.92,2.92
35+
v5.84a2.92,2.92 0 0 1 -2.92,2.92
36+
h-5.84a2.91,2.91 0 0 1 -2.91,-2.92
37+
v-5.84a2.91,2.91 0 0 1 2.91,-2.92Z
38+
39+
M79.57,68.62h5.84a2.92,2.92 0 0 1 2.92,2.92
40+
v5.83a2.92,2.92 0 0 1 -2.92,2.92
41+
h-5.84a2.91,2.91 0 0 1 -2.91,-2.92
42+
v-5.83a2.91,2.91 0 0 1 2.91,-2.92Z
43+
44+
M114.59,48.19h5.84a2.92,2.92 0 0 1 2.91,2.92
45+
v5.84a2.91,2.91 0 0 1 -2.91,2.91
46+
h-5.84a2.92,2.92 0 0 1 -2.92,-2.91
47+
v-5.84a2.92,2.92 0 0 1 2.92,-2.92Z
48+
49+
M114.59,68.62h5.84a2.92,2.92 0 0 1 2.91,2.92
50+
v5.83a2.91,2.91 0 0 1 -2.91,2.92
51+
h-5.84a2.92,2.92 0 0 1 -2.92,-2.92
52+
v-5.83a2.92,2.92 0 0 1 2.92,-2.92Z
53+
";
54+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
namespace CodeBeam.UltimateAuth.Sample;
2+
3+
public enum UAuthLogoVariant
4+
{
5+
Brand,
6+
Mono
7+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net10.0</TargetFramework>
5+
<ImplicitUsings>enable</ImplicitUsings>
6+
<Nullable>enable</Nullable>
7+
<NoDefaultLaunchSettingsFile>true</NoDefaultLaunchSettingsFile>
8+
<StaticWebAssetProjectMode>Default</StaticWebAssetProjectMode>
9+
<BlazorDisableThrowNavigationException>true</BlazorDisableThrowNavigationException>
10+
</PropertyGroup>
11+
12+
<ItemGroup>
13+
<PackageReference Include="CodeBeam.MudBlazor.Extensions" Version="9.0.3" />
14+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="10.0.5" />
15+
<PackageReference Include="MudBlazor" Version="9.2.0" />
16+
</ItemGroup>
17+
18+
</Project>
Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
@inherits LayoutComponentBase
2+
3+
<MudThemeProvider @ref="@_mudThemeProvider" Theme="_codeBeamTheme" @bind-IsDarkMode="@_isDarkMode" />
4+
<MudPopoverProvider />
5+
<MudDialogProvider />
6+
<MudSnackbarProvider />
7+
8+
<MudLayout Style="@(_isDarkMode ? "background: radial-gradient(circle at top, #2E2D4D, #1e1d35)" : null)">
9+
<MudAppBar Class="cb-blur" Color="Color.Transparent" Dense="true" Elevation="0">
10+
<div class="cb-mobile">
11+
<MudIconButton Icon="@Icons.Material.Filled.Menu" Color="Color.Primary" Edge="Edge.Start" OnClick="@(() => _isOpen = !_isOpen)" />
12+
</div>
13+
<MudIcon Icon="@_codeBeamSvg" Color="Color.Primary" />
14+
<MudText Class="ml-2" Typo="Typo.h6" Color="Color.Primary" Align="Align.Center">CodeBeam</MudText>
15+
<MudSpacer />
16+
<div class="cb-desktop">
17+
<MudStack Row="true" AlignItems="AlignItems.Center" Justify="Justify.Center" Spacing="6">
18+
<MudMenu ActivationEvent="MouseEvent.MouseOver" Dense="true" PopoverClass="mud-theme-primary" RelativeWidth="DropdownWidth.Relative">
19+
<ActivatorContent>
20+
<MudText Class="pa-2" Color="Color.Primary">Vision</MudText>
21+
</ActivatorContent>
22+
</MudMenu>
23+
<MudMenu ActivationEvent="MouseEvent.MouseOver" Dense="true" PopoverClass="mud-theme-primary" AnchorOrigin="Origin.BottomCenter" TransformOrigin="Origin.TopCenter">
24+
<ActivatorContent>
25+
<MudText Class="cb-primary-hover cb-transition pa-2" Color="Color.Primary">Products</MudText>
26+
</ActivatorContent>
27+
<ChildContent>
28+
<MudMenuItem Class="cb-menu-item">
29+
<MudStack Class="mud-width-full" Row="true" AlignItems="AlignItems.Center">
30+
<MudIcon Icon="@_uauth" />
31+
<MudStack Spacing="0">
32+
<MudText><b>UltimateAuth</b></MudText>
33+
<MudText Typo="Typo.subtitle2">Modern & Unified Auth Framework for .NET</MudText>
34+
</MudStack>
35+
</MudStack>
36+
</MudMenuItem>
37+
<MudMenuItem Class="cb-menu-item mt-4">
38+
<MudStack Class="mud-width-full" Row="true" AlignItems="AlignItems.Center">
39+
<MudIcon Icon="@Icons.Custom.Brands.MudBlazor" />
40+
<MudStack Spacing="0">
41+
<MudText><b>MudBlazor Extensions</b></MudText>
42+
<MudText Typo="Typo.subtitle2">30+ Extension Component for MudBlazor</MudText>
43+
</MudStack>
44+
</MudStack>
45+
</MudMenuItem>
46+
<MudMenuItem Class="cb-menu-item mt-4">
47+
<MudStack Class="mud-width-full" Row="true" AlignItems="AlignItems.Center">
48+
<MudImage Src="BCSS.jpg" Style="width: 24px" Fluid="true" />
49+
<MudStack Spacing="0">
50+
<MudText><b>BCSS</b></MudText>
51+
<MudText Typo="Typo.subtitle2">Revolutionary Runtime CSS Generator for Blazor</MudText>
52+
</MudStack>
53+
</MudStack>
54+
</MudMenuItem>
55+
<MudMenuItem Class="cb-menu-item mt-4">
56+
<MudStack Class="mud-width-full" Row="true" AlignItems="AlignItems.Center">
57+
<MudIcon Icon="@Icons.Material.Filled.Api" />
58+
<MudStack Spacing="0">
59+
<MudText><b>GoogleApis</b></MudText>
60+
<MudText Typo="Typo.subtitle2">Google Api Integration for Blazor</MudText>
61+
</MudStack>
62+
</MudStack>
63+
</MudMenuItem>
64+
</ChildContent>
65+
</MudMenu>
66+
<MudMenu ActivationEvent="MouseEvent.MouseOver" Dense="true" PopoverClass="mud-theme-primary" RelativeWidth="DropdownWidth.Relative">
67+
<ActivatorContent>
68+
<MudText Class="antbar-primary-hover antbar-transition pa-2" Color="Color.Primary">Donate</MudText>
69+
</ActivatorContent>
70+
</MudMenu>
71+
</MudStack>
72+
</div>
73+
<MudSpacer />
74+
<MudIconButton Icon="@Icons.Custom.Brands.GitHub" Color="Color.Primary" Href="https://github.com/CodeBeamOrg" Target="_blank" />
75+
<MudToggleIconButton @bind-Toggled="@_isDarkMode" Icon="@Icons.Material.Filled.DarkMode" ToggledIcon="@Icons.Material.Filled.LightMode" Color="Color.Primary" ToggledColor="Color.Primary" />
76+
</MudAppBar>
77+
78+
<MudDrawer @bind-Open="_isOpen">
79+
<MudNavMenu>
80+
<MudNavLink Href="/">Home</MudNavLink>
81+
<MudNavLink Href="/#vision">Vision</MudNavLink>
82+
<MudNavLink Href="/#ultimateauth">Products</MudNavLink>
83+
<MudNavLink Href="/#donate">Donate</MudNavLink>
84+
</MudNavMenu>
85+
</MudDrawer>
86+
<MudMainContent>
87+
@Body
88+
</MudMainContent>
89+
</MudLayout>
90+
91+
<div id="blazor-error-ui" data-nosnippet>
92+
An unhandled error has occurred.
93+
<a href="." class="reload">Reload</a>
94+
<span class="dismiss">🗙</span>
95+
</div>
96+
97+
@code {
98+
private bool _isDarkMode = true;
99+
private MudThemeProvider _mudThemeProvider = null!;
100+
private bool _isOpen;
101+
102+
const string _codeBeamSvg = @"<svg style=""width:36px;height:36px"" viewBox=""0 0 24 24"">
103+
<path d=""M15.13,13.17,15.88,12l-1.54-.34,7.88-2.83A9.24,9.24,0,0,0,18.09,5a7.52,7.52,0,1,0,4.33,9.72,9.07,9.07,0,0,0,0-5.36Z""/><path d=""M.22,12a12,12,0,0,0,23.56,3.24,9.17,9.17,0,1,1-.21-7.15A12,12,0,0,0,.22,12""/></svg>";
104+
105+
const string _uauth = @"<svg viewBox=""0 0 200 240"" xmlns=""http://www.w3.org/2000/svg"">
106+
<path fill=""#00072d""
107+
d=""M32.39,14.07H167.61c11.27,0,18,6.76,18,18V133.52c0,22.54-58.59,69.87-85.64,92.41-27-22.54-85.64-69.87-85.64-92.41V32.1C14.36,20.83,21.12,14.07,32.39,14.07Z""/>
108+
109+
<path fill=""#f6f5ae"" fill-rule=""evenodd""
110+
d=""M120.43,39.44H79.57A11.67,11.67,0,0,0,67.9,51.11V77.37
111+
A11.67,11.67,0,0,0,79.57,89H90.51l3.89,3.9v5.32l-3.8,3.81v81.41H99
112+
v-5.33h13.69V169H108.1v-3.8H99C99,150.76,111.9,153,111.9,153
113+
V99.79h-8V93.32L108.19,89h12.24
114+
A11.67,11.67,0,0,0,132.1,77.37V51.11
115+
A11.67,11.67,0,0,0,120.43,39.44Z
116+
117+
M79.57,48.19h5.84a2.92,2.92 0 0 1 2.92,2.92
118+
v5.84a2.92,2.92 0 0 1 -2.92,2.92
119+
h-5.84a2.91,2.91 0 0 1 -2.91,-2.92
120+
v-5.84a2.91,2.91 0 0 1 2.91,-2.92Z
121+
122+
M79.57,68.62h5.84a2.92,2.92 0 0 1 2.92,2.92
123+
v5.83a2.92,2.92 0 0 1 -2.92,2.92
124+
h-5.84a2.91,2.91 0 0 1 -2.91,-2.92
125+
v-5.83a2.91,2.91 0 0 1 2.91,-2.92Z
126+
127+
M114.59,48.19h5.84a2.92,2.92 0 0 1 2.91,2.92
128+
v5.84a2.91,2.91 0 0 1 -2.91,2.91
129+
h-5.84a2.92,2.92 0 0 1 -2.92,-2.91
130+
v-5.84a2.92,2.92 0 0 1 2.92,-2.92Z
131+
132+
M114.59,68.62h5.84a2.92,2.92 0 0 1 2.91,2.92
133+
v5.83a2.91,2.91 0 0 1 -2.91,2.92
134+
h-5.84a2.92,2.92 0 0 1 -2.92,-2.92
135+
v-5.83a2.92,2.92 0 0 1 2.92,-2.92Z""/>
136+
</svg>";
137+
138+
MudTheme _codeBeamTheme = new MudTheme()
139+
{
140+
PaletteLight = new PaletteLight()
141+
{
142+
Primary = "#2E2D4D",
143+
PrimaryContrastText = "#FEEE88",
144+
145+
Secondary = "#FEEE88",
146+
},
147+
148+
PaletteDark = new PaletteDark()
149+
{
150+
Primary = "#FEEE88",
151+
PrimaryContrastText = "#2E2D4D",
152+
153+
Secondary = "#2E2D4D",
154+
155+
Background = "#2E2D4D"
156+
},
157+
};
158+
159+
protected internal bool IsDarkMode => _isDarkMode;
160+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#blazor-error-ui {
2+
color-scheme: light only;
3+
background: lightyellow;
4+
bottom: 0;
5+
box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
6+
box-sizing: border-box;
7+
display: none;
8+
left: 0;
9+
padding: 0.6rem 1.25rem 0.7rem 1.25rem;
10+
position: fixed;
11+
width: 100%;
12+
z-index: 1000;
13+
}
14+
15+
#blazor-error-ui .dismiss {
16+
cursor: pointer;
17+
position: absolute;
18+
right: 0.75rem;
19+
top: 0.5rem;
20+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
@page "/counter"
2+
3+
<PageTitle>Counter</PageTitle>
4+
5+
<h1>Counter</h1>
6+
7+
<p role="status">Current count: @currentCount</p>
8+
9+
<button class="btn btn-primary" @onclick="IncrementCount">Click me</button>
10+
11+
@code {
12+
private int currentCount = 0;
13+
14+
private void IncrementCount()
15+
{
16+
currentCount++;
17+
}
18+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
@page "/"
2+
3+
<MudPage FullScreen="FullScreen.FullWithoutAppbar" Row="1" Column="1">
4+
<MudContainer MaxWidth="MaxWidth.Medium" Class="mud-height-full d-flex align-center justify-center">
5+
<MudStack>
6+
<MudText Typo="Typo.h4" Color="Color.Primary">CodeBeam</MudText>
7+
<MudText Class="mt-n4" Typo="Typo.h6">Where a Code becomes useful</MudText>
8+
<MudDivider Class="my-4" Style="width: 120px" />
9+
<MudText>Powered by its simplicity. Focused on real-world problems. OpenSource.</MudText>
10+
<MudText>We create practical systems and tools for modern .NET applications.</MudText>
11+
</MudStack>
12+
</MudContainer>
13+
</MudPage>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@page "/not-found"
2+
@layout MainLayout
3+
4+
<h3>Not Found</h3>
5+
<p>Sorry, the content you are looking for does not exist.</p>

0 commit comments

Comments
 (0)