Skip to content

Commit

Permalink
tailwind with play
Browse files Browse the repository at this point in the history
  • Loading branch information
tesar-tech committed Sep 30, 2024
1 parent 5cccdd2 commit dcc44d5
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 1,860 deletions.
61 changes: 38 additions & 23 deletions BlazorStaticMinimalBlog.csproj
Original file line number Diff line number Diff line change
@@ -1,31 +1,46 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BlazorStatic" Version="1.0.0-beta.11" />
</ItemGroup>
<ItemGroup>
<!-- <ProjectReference Include="..\src\BlazorStatic.csproj" />-->
</ItemGroup>


<ItemGroup>
<None Update="Content/**/*">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>


<!-- to make hot reload work on .md files -->
<ItemGroup>
<Watch Include="Content/**/*" />
</ItemGroup>
<PropertyGroup>
<!-- Serve for Conditional logic for template instantiation -->
<!-- You can put the version inside the PackageReference -->
<BlazorStaticVersion>1.0.0-beta.12</BlazorStaticVersion>
</PropertyGroup>

<!--#if (UseInTemplate)-->
<ItemGroup>
<PackageReference Include="BlazorStatic" Version="$(BlazorStaticVersion)"/>
</ItemGroup>
<!--#else-->
<ItemGroup Condition="'$(Configuration)' == 'Debug'">
<!-- for debugging when running from BlazorStaticWebsite.sln-->
<ProjectReference Include="../../../../src/BlazorStatic.csproj"/>
</ItemGroup>

<ItemGroup Condition="'$(Configuration)' == 'Release'">
<!--When building the page on ci/cd-->
<PackageReference Include="BlazorStatic" Version="$(BlazorStaticVersion)"/>
</ItemGroup>
<!--#endif-->


<ItemGroup>
<None Update="Content/**/*">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>


<!-- to make hot reload work on .md files -->
<ItemGroup>
<Watch Include="Content/**/*"/>
</ItemGroup>


</Project>
15 changes: 14 additions & 1 deletion Components/App.razor
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,20 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<base href="/" />
<link rel="stylesheet" href="app.min.css" />
<script src="https://cdn.tailwindcss.com?plugins=typography"></script>
<script>
tailwind.config = {
theme: {
extend: {
colors: {
primary: tailwind.colors.violet
},
},},
}
</script>


<HeadOutlet />
</head>

Expand Down
3 changes: 1 addition & 2 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
builder.WebHost.UseStaticWebAssets();

builder.Services.AddBlazorStaticService(opt => {
opt.HotReloadEnabled = true;
opt.IgnoredPathsOnContentCopy.Add("app.css");//pre-build version for tailwind
//opt. //check to change the defaults
}
).AddBlazorStaticContentService<BlogFrontMatter>();

Expand Down
19 changes: 0 additions & 19 deletions tailwind.config.js

This file was deleted.

3 changes: 0 additions & 3 deletions wwwroot/app.css

This file was deleted.

Loading

0 comments on commit dcc44d5

Please sign in to comment.