Compare commits
3 Commits
bd3827bb41
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| b7c75716e8 | |||
| 398d22169d | |||
| a8b13d1120 |
@@ -17,7 +17,6 @@
|
||||
</script>
|
||||
<link rel="stylesheet" href="_content/Enciphered.Blazor.UIComponents/css/app.css" />
|
||||
<link rel="stylesheet" href="@Assets["css/app.css"]" />
|
||||
<link rel="stylesheet" href="@Assets["Enciphered.Blazor.UIComponents.Demo.styles.css"]" />
|
||||
<ImportMap />
|
||||
<link rel="icon" type="image/svg+xml" href="enci_white.svg" />
|
||||
<HeadOutlet />
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
@page "/weather"
|
||||
@using Enciphered.Blazor.UIComponents
|
||||
@attribute [StreamRendering]
|
||||
|
||||
<PageTitle>Weather</PageTitle>
|
||||
@@ -13,27 +14,20 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<th aria-label="Temperature in Celsius">Temp. (C)</th>
|
||||
<th aria-label="Temperature in Farenheit">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>
|
||||
<Table Items="forecasts">
|
||||
<Columns>
|
||||
<th>Date</th>
|
||||
<th aria-label="Temperature in Celsius">Temp. (C)</th>
|
||||
<th aria-label="Temperature in Farenheit">Temp. (F)</th>
|
||||
<th>Summary</th>
|
||||
</Columns>
|
||||
<RowTemplate Context="forecast">
|
||||
<td>@forecast.Date.ToShortDateString()</td>
|
||||
<td>@forecast.TemperatureC</td>
|
||||
<td>@forecast.TemperatureF</td>
|
||||
<td>@forecast.Summary</td>
|
||||
</RowTemplate>
|
||||
</Table>
|
||||
}
|
||||
|
||||
@code {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -5,6 +5,18 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<PublishAot>true</PublishAot>
|
||||
|
||||
<IsPackable>true</IsPackable>
|
||||
<PackageId>Enciphered.Blazor.UIComponents</PackageId>
|
||||
<Version>0.0.1</Version>
|
||||
<Authors>shaamilahmed</Authors>
|
||||
<Company>nciphered</Company>
|
||||
<Description>Pure static SSR Blazor component library styled with Tailwind CSS v4 and shadcn/ui. All interactivity powered by vanilla JS. htmx-powered form validation.</Description>
|
||||
<PackageTags>blazor;ui;components;tailwind;htmx;ssr;static</PackageTags>
|
||||
<RepositoryUrl>https://git.nciphered.com/shaamilahmed/Enciphered.Blazor.UIComponents</RepositoryUrl>
|
||||
<PackageLicenseExpression></PackageLicenseExpression>
|
||||
<PackageProjectUrl>https://git.nciphered.com/shaamilahmed/Enciphered.Blazor.UIComponents</PackageProjectUrl>
|
||||
<PackageIcon>enci_white.png</PackageIcon>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="TailwindBuild" BeforeTargets="Build">
|
||||
@@ -16,4 +28,8 @@
|
||||
<FrameworkReference Include="Microsoft.AspNetCore.App" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="./Logo/enci_white.png" Pack="true" PackagePath="\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 4.5 KiB |
@@ -0,0 +1,26 @@
|
||||
@namespace Enciphered.Blazor.UIComponents
|
||||
@typeparam TItem
|
||||
|
||||
<div class="w-full overflow-auto rounded-md border border-zinc-800">
|
||||
<table class="w-full caption-bottom text-sm">
|
||||
<thead class="bg-zinc-900/50">
|
||||
<tr class="border-b border-zinc-800 transition-colors">
|
||||
@Columns
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="[&_tr:last-child]:border-0">
|
||||
@foreach (TItem item in Items)
|
||||
{
|
||||
<tr class="border-b border-zinc-800 transition-colors hover:bg-zinc-900/50 text-center">
|
||||
@RowTemplate(item)
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@code {
|
||||
[Parameter] public required IReadOnlyList<TItem> Items { get; set; }
|
||||
[Parameter] public required RenderFragment Columns { get; set; }
|
||||
[Parameter] public required RenderFragment<TItem> RowTemplate { get; set; }
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user