Removed Cached GitIgnore Files
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" class="dark">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<base href="/" />
|
||||
<ResourcePreloader />
|
||||
<link rel="stylesheet" href="@Assets["css/output.css"]" />
|
||||
<ImportMap />
|
||||
<link rel="icon" type="image/svg+xml" href="enci_white.svg" />
|
||||
<HeadOutlet />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<Routes @rendermode="RenderMode.InteractiveServer" />
|
||||
<script src="@Assets["_framework/blazor.web.js"]"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -1,77 +0,0 @@
|
||||
@inherits LayoutComponentBase
|
||||
|
||||
<div class="flex min-h-screen">
|
||||
|
||||
@* Desktop sidebar — collapsible *@
|
||||
<aside class="@($"hidden shrink-0 border-r border-sidebar-border bg-sidebar transition-all duration-300 ease-in-out md:block {(sidebarCollapsed ? "w-16" : "w-64")}")">
|
||||
<NavMenu Collapsed="sidebarCollapsed" OnToggleSidebar="ToggleSidebar" />
|
||||
</aside>
|
||||
|
||||
@* Mobile overlay *@
|
||||
@if (mobileOpen)
|
||||
{
|
||||
<div class="fixed inset-0 z-40 flex md:hidden">
|
||||
@* Backdrop *@
|
||||
<div class="fixed inset-0 bg-black/60 backdrop-blur-sm" @onclick="CloseMobile"></div>
|
||||
|
||||
@* Drawer *@
|
||||
<aside class="relative z-50 flex w-72 flex-col bg-sidebar shadow-xl">
|
||||
@* Close button *@
|
||||
<button class="absolute right-3 top-3 rounded-md p-1 text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-sidebar-foreground"
|
||||
@onclick="CloseMobile">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M18 6 6 18" /><path d="m6 6 12 12" />
|
||||
</svg>
|
||||
</button>
|
||||
<NavMenu OnNavigated="CloseMobile" />
|
||||
</aside>
|
||||
</div>
|
||||
}
|
||||
|
||||
@* Main content *@
|
||||
<div class="flex flex-1 flex-col overflow-hidden">
|
||||
@* Top bar *@
|
||||
<header class="sticky top-0 z-10 flex h-14 items-center gap-4 border-b border-border bg-background/80 px-4 backdrop-blur-sm md:px-6">
|
||||
@* Mobile menu button *@
|
||||
<button class="rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground md:hidden"
|
||||
@onclick="OpenMobile">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<line x1="4" x2="20" y1="12" y2="12" /><line x1="4" x2="20" y1="6" y2="6" /><line x1="4" x2="20" y1="18" y2="18" />
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
@* Desktop collapse toggle *@
|
||||
<button class="hidden rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground md:inline-flex"
|
||||
@onclick="ToggleSidebar"
|
||||
title="@(sidebarCollapsed ? "Expand sidebar" : "Collapse sidebar")">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<rect width="18" height="18" x="3" y="3" rx="2" />
|
||||
<path d="M9 3v18" />
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<div class="flex-1 text-sm font-medium text-muted-foreground">
|
||||
Enciphered UI Components
|
||||
</div>
|
||||
<a href="https://learn.microsoft.com/aspnet/core/"
|
||||
target="_blank"
|
||||
class="text-sm text-muted-foreground transition-colors hover:text-foreground">
|
||||
About
|
||||
</a>
|
||||
</header>
|
||||
|
||||
@* Page content *@
|
||||
<main class="flex-1 overflow-auto p-4 md:p-6">
|
||||
@Body
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@code {
|
||||
private bool sidebarCollapsed;
|
||||
private bool mobileOpen;
|
||||
|
||||
private void ToggleSidebar() => sidebarCollapsed = !sidebarCollapsed;
|
||||
private void OpenMobile() => mobileOpen = true;
|
||||
private void CloseMobile() => mobileOpen = false;
|
||||
}
|
||||
@@ -1,73 +0,0 @@
|
||||
@* Sidebar header *@
|
||||
<div class="flex h-14 items-center border-b border-sidebar-border px-4">
|
||||
<button type="button"
|
||||
class="flex items-center gap-2 font-semibold text-sidebar-foreground rounded-md transition-colors hover:bg-sidebar-accent px-1 py-1"
|
||||
title="Toggle sidebar"
|
||||
@onclick="HandleToggle">
|
||||
<img src="enci_white.svg" alt="Logo" class="h-6 w-6 shrink-0 transition-transform duration-300" />
|
||||
@if (!Collapsed)
|
||||
{
|
||||
<span class="text-sm tracking-tight">Enciphered</span>
|
||||
}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@* Navigation *@
|
||||
<div class="flex flex-col gap-1 p-3">
|
||||
@if (!Collapsed)
|
||||
{
|
||||
<p class="mb-1 px-2 text-xs font-medium uppercase tracking-wider text-muted-foreground">
|
||||
Navigation
|
||||
</p>
|
||||
}
|
||||
|
||||
<NavLink class="@NavLinkClass" href="" Match="NavLinkMatch.All"
|
||||
ActiveClass="bg-sidebar-accent text-accent-foreground"
|
||||
@onclick="HandleNav"
|
||||
title="Home">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 shrink-0" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8" />
|
||||
<path d="M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" />
|
||||
</svg>
|
||||
@if (!Collapsed)
|
||||
{
|
||||
<span>Home</span>
|
||||
}
|
||||
</NavLink>
|
||||
|
||||
<NavLink class="@NavLinkClass" href="weather"
|
||||
ActiveClass="bg-sidebar-accent text-accent-foreground"
|
||||
@onclick="HandleNav"
|
||||
title="Weather">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 shrink-0" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z" />
|
||||
</svg>
|
||||
@if (!Collapsed)
|
||||
{
|
||||
<span>Weather</span>
|
||||
}
|
||||
</NavLink>
|
||||
</div>
|
||||
|
||||
@code {
|
||||
[Parameter] public bool Collapsed { get; set; }
|
||||
[Parameter] public EventCallback OnToggleSidebar { get; set; }
|
||||
[Parameter] public EventCallback OnNavigated { get; set; }
|
||||
|
||||
private string NavLinkClass => Collapsed
|
||||
? "nav-link group flex items-center justify-center rounded-md p-2 text-sm font-medium text-sidebar-foreground transition-colors hover:bg-sidebar-accent"
|
||||
: "nav-link group flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium text-sidebar-foreground transition-colors hover:bg-sidebar-accent";
|
||||
|
||||
private async Task HandleToggle()
|
||||
{
|
||||
if (OnToggleSidebar.HasDelegate)
|
||||
await OnToggleSidebar.InvokeAsync();
|
||||
}
|
||||
|
||||
private async Task HandleNav()
|
||||
{
|
||||
if (OnNavigated.HasDelegate)
|
||||
await OnNavigated.InvokeAsync();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
@page "/Error"
|
||||
@using System.Diagnostics
|
||||
|
||||
<PageTitle>Error</PageTitle>
|
||||
|
||||
<h1 class="text-danger">Error.</h1>
|
||||
<h2 class="text-danger">An error occurred while processing your request.</h2>
|
||||
|
||||
@if (ShowRequestId)
|
||||
{
|
||||
<p>
|
||||
<strong>Request ID:</strong> <code>@RequestId</code>
|
||||
</p>
|
||||
}
|
||||
|
||||
<h3>Development Mode</h3>
|
||||
<p>
|
||||
Swapping to <strong>Development</strong> environment will display more detailed information about the error that occurred.
|
||||
</p>
|
||||
<p>
|
||||
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
|
||||
It can result in displaying sensitive information from exceptions to end users.
|
||||
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
|
||||
and restarting the app.
|
||||
</p>
|
||||
|
||||
@code{
|
||||
[CascadingParameter]
|
||||
private HttpContext? HttpContext { get; set; }
|
||||
|
||||
private string? RequestId { get; set; }
|
||||
private bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
|
||||
|
||||
protected override void OnInitialized() =>
|
||||
RequestId = Activity.Current?.Id ?? HttpContext?.TraceIdentifier;
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
@page "/"
|
||||
|
||||
<PageTitle>Home</PageTitle>
|
||||
|
||||
<h1>Hello, world!</h1>
|
||||
|
||||
Welcome to your new app.
|
||||
@@ -1,5 +0,0 @@
|
||||
@page "/not-found"
|
||||
@layout MainLayout
|
||||
|
||||
<h3>Not Found</h3>
|
||||
<p>Sorry, the content you are looking for does not exist.</p>
|
||||
@@ -1,64 +0,0 @@
|
||||
@page "/weather"
|
||||
@attribute [StreamRendering]
|
||||
|
||||
<PageTitle>Weather</PageTitle>
|
||||
|
||||
<h1>Weather</h1>
|
||||
|
||||
<p>This component demonstrates showing data.</p>
|
||||
|
||||
@if (forecasts == null)
|
||||
{
|
||||
<p><em>Loading...</em></p>
|
||||
}
|
||||
else
|
||||
{
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<th aria-label="Temperature in Celsius">Temp. (C)</th>
|
||||
<th aria-label="Temperature in Fahrenheit">Temp. (F)</th>
|
||||
<th>Summary</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var forecast in forecasts)
|
||||
{
|
||||
<tr>
|
||||
<td>@forecast.Date.ToShortDateString()</td>
|
||||
<td>@forecast.TemperatureC</td>
|
||||
<td>@forecast.TemperatureF</td>
|
||||
<td>@forecast.Summary</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
|
||||
@code {
|
||||
private WeatherForecast[]? forecasts;
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
// Simulate asynchronous loading to demonstrate streaming rendering
|
||||
await Task.Delay(500);
|
||||
|
||||
var startDate = DateOnly.FromDateTime(DateTime.Now);
|
||||
var summaries = new[] { "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" };
|
||||
forecasts = Enumerable.Range(1, 5).Select(index => new WeatherForecast
|
||||
{
|
||||
Date = startDate.AddDays(index),
|
||||
TemperatureC = Random.Shared.Next(-20, 55),
|
||||
Summary = summaries[Random.Shared.Next(summaries.Length)]
|
||||
}).ToArray();
|
||||
}
|
||||
|
||||
private class WeatherForecast
|
||||
{
|
||||
public DateOnly Date { get; set; }
|
||||
public int TemperatureC { get; set; }
|
||||
public string? Summary { get; set; }
|
||||
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
<Router AppAssembly="typeof(Program).Assembly" NotFoundPage="typeof(Pages.NotFound)">
|
||||
<Found Context="routeData">
|
||||
<RouteView RouteData="routeData" DefaultLayout="typeof(Layout.MainLayout)" />
|
||||
</Found>
|
||||
</Router>
|
||||
@@ -1,11 +0,0 @@
|
||||
@using System.Net.Http
|
||||
@using System.Net.Http.Json
|
||||
@using Microsoft.AspNetCore.Components.Forms
|
||||
@using Microsoft.AspNetCore.Components.Routing
|
||||
@using Microsoft.AspNetCore.Components.Web
|
||||
@using static Microsoft.AspNetCore.Components.Web.RenderMode
|
||||
@using Microsoft.AspNetCore.Components.Web.Virtualization
|
||||
@using Microsoft.JSInterop
|
||||
@using Enciphered.Blazor.UIComponents
|
||||
@using Enciphered.Blazor.UIComponents.Components
|
||||
@using Enciphered.Blazor.UIComponents.Components.Layout
|
||||
Reference in New Issue
Block a user