Skip to content

Commit

Permalink
update tamb stack
Browse files Browse the repository at this point in the history
  • Loading branch information
judescripts committed Jan 19, 2024
1 parent 2eddbde commit 1c9bdd2
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 29 deletions.
10 changes: 3 additions & 7 deletions working/content/tab/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# [DevToys.io](https://devtoys.io)

## DotNet Tab Stack Template

## DotNet TAB Stack Template

## Installation

Expand All @@ -12,7 +11,6 @@ This is a **T**ailwindCSS, **A**zure, **B**lazor (**TAB**) stack template to get
- Run ``` npm i -D ```
- ``` dotnet watch run ``` (vscode) or ``` F5 ``` run the project (vs)


## Features

When opening the project in VS or VScode ./run-tailwind.ps1 task will run automatically and close automatically when the project closes. You can change this behavior with updating the tasks.json (vscode) or package.json (visual studio). For automatic script runs in visual studio you need to install [NPM Task runner](https://marketplace.visualstudio.com/items?itemName=MadsKristensen.NPMTaskRunner)
Expand All @@ -26,10 +24,8 @@ When opening the project in VS or VScode ./run-tailwind.ps1 task will run automa
| EF Core SQL | <https://www.nuget.org/packages/Microsoft.EntityFrameworkCore/8.0.1> | 8.0.1
___

*Project starts with a sample dashboard utilizing tailwindcss like below*

![Dashboard Sample](./sample_dashboard.png "Dashboard Sample")

**Project starts with a sample dashboard utilizing tailwindcss like below**
![Dashboard Sample](./sample_dashboard.png "Dashboard Sample")

## Development

Expand Down
8 changes: 3 additions & 5 deletions working/content/tamb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

## DotNet TAMB Stack Template


## Installation

This is a **T**ailwindCSS, **A**zure, **M**aui **B**lazor (**TAMB**) stack template to get you started on your dev journey fast!
Expand All @@ -12,7 +11,6 @@ This is a **T**ailwindCSS, **A**zure, **M**aui **B**lazor (**TAMB**) stack templ
- Run ``` npm i -D ```
- ``` dotnet watch run ``` (vscode) or ``` F5 ``` run the project (vs)


## Features

When opening the project in VS or VScode ./run-tailwind.ps1 task will run automatically and close automatically when the project closes. You can change this behavior with updating the tasks.json (vscode) or package.json (visual studio). For automatic script runs in visual studio you need to install [NPM Task runner](https://marketplace.visualstudio.com/items?itemName=MadsKristensen.NPMTaskRunner)
Expand All @@ -22,12 +20,12 @@ When opening the project in VS or VScode ./run-tailwind.ps1 task will run automa
| TailwindCss | <https://tailwindcss.com/> | 3.4.1
| Azure Identity | <https://www.nuget.org/packages/Azure.Identity> | 8.0.1
| Azure Key Vault | <https://www.nuget.org/packages/Azure.Security.KeyVault.Secrets> | 8.0.1
| MAUI Blazor (.NET 8) | <https://dotnet.microsoft.com/en-us/apps/aspnet/web-apps/blazor> | 8.0.1
| EF Core SQL | <https://www.nuget.org/packages/Microsoft.EntityFrameworkCore/8.0.1> | 8.0.1
| MAUI Blazor (.NET 8) | <https://dotnet.microsoft.com/en-us/apps/maui> | 8.0.1
| EF Core SQLite | <https://www.nuget.org/packages/Microsoft.EntityFrameworkCore/8.0.1> | 8.0.1
___

**Project starts with a sample screen utilizing tailwindcss like below**

![sample view](./sample_view.png "Sample View")

## Development

Expand Down
Binary file added working/content/tamb/sample_view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions working/content/tamb/tamb/Data/AppDbContext.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
using Microsoft.EntityFrameworkCore;

namespace tamb.Data
{
public class AppDbContext(DbContextOptions options) : DbContext(options)
{
}
}
10 changes: 9 additions & 1 deletion working/content/tamb/tamb/MauiProgram.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
using System.Reflection;
using Microsoft.AspNetCore.Components.Authorization;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
using tamb.Data;

#pragma warning disable CA1416
namespace tamb
{
public static class MauiProgram
Expand All @@ -18,7 +21,11 @@ public static MauiApp CreateMauiApp()
.UseMauiApp<App>()
.ConfigureFonts(fonts => { fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); });
builder.Configuration.AddConfiguration(config);
builder.Services.AddDbContext<AppDbContext>(options =>
{
options.UseSqlite(config.GetConnectionString("DefaultConnection"));

});
builder.Services.AddMauiBlazorWebView();
builder.Services.AddAuthorizationCore();
builder.Services.AddSingleton<AuthenticationStateProvider, ExternalAuthStateProvider>();
Expand All @@ -31,4 +38,5 @@ public static MauiApp CreateMauiApp()
return builder.Build();
}
}
}
}
#pragma warning restore CA1416
3 changes: 3 additions & 0 deletions working/content/tamb/tamb/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"ConnectionStrings": {
"DefaultConnection": "Data Source=app.db"
}

}
28 changes: 12 additions & 16 deletions working/content/tamb/tamb/tamb.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,36 +36,29 @@
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>

<SupportedOSPlatformVersion
Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">
14.2
</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion
Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">
14.0
</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion
Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">
24.0
</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion
Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">
10.0.17763.0
</SupportedOSPlatformVersion>
<TargetPlatformMinVersion
Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">
10.0.17763.0
</TargetPlatformMinVersion>
<SupportedOSPlatformVersion
Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">
6.5
</SupportedOSPlatformVersion>
</PropertyGroup>

<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.svg"
ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />

<!-- Splash Screen -->
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" />
Expand All @@ -84,8 +77,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui"
Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />


Expand Down Expand Up @@ -119,4 +111,8 @@
</None>
</ItemGroup>

<ItemGroup>
<Folder Include="Data\" />
</ItemGroup>

</Project>

0 comments on commit 1c9bdd2

Please sign in to comment.