Skip to content

Commit dcc44d5

Browse files
committed
tailwind with play
1 parent 5cccdd2 commit dcc44d5

File tree

6 files changed

+53
-1860
lines changed

6 files changed

+53
-1860
lines changed

BlazorStaticMinimalBlog.csproj

+38-23
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,46 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

3-
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
5-
<Nullable>enable</Nullable>
6-
<ImplicitUsings>enable</ImplicitUsings>
7-
</PropertyGroup>
8-
9-
<ItemGroup>
10-
<PackageReference Include="BlazorStatic" Version="1.0.0-beta.11" />
11-
</ItemGroup>
12-
<ItemGroup>
13-
<!-- <ProjectReference Include="..\src\BlazorStatic.csproj" />-->
14-
</ItemGroup>
15-
16-
17-
<ItemGroup>
18-
<None Update="Content/**/*">
19-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
20-
</None>
21-
</ItemGroup>
3+
<PropertyGroup>
4+
<TargetFramework>net8.0</TargetFramework>
5+
<Nullable>enable</Nullable>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
</PropertyGroup>
228

239

24-
<!-- to make hot reload work on .md files -->
25-
<ItemGroup>
26-
<Watch Include="Content/**/*" />
27-
</ItemGroup>
10+
<PropertyGroup>
11+
<!-- Serve for Conditional logic for template instantiation -->
12+
<!-- You can put the version inside the PackageReference -->
13+
<BlazorStaticVersion>1.0.0-beta.12</BlazorStaticVersion>
14+
</PropertyGroup>
2815

16+
<!--#if (UseInTemplate)-->
17+
<ItemGroup>
18+
<PackageReference Include="BlazorStatic" Version="$(BlazorStaticVersion)"/>
19+
</ItemGroup>
20+
<!--#else-->
21+
<ItemGroup Condition="'$(Configuration)' == 'Debug'">
22+
<!-- for debugging when running from BlazorStaticWebsite.sln-->
23+
<ProjectReference Include="../../../../src/BlazorStatic.csproj"/>
24+
</ItemGroup>
2925

26+
<ItemGroup Condition="'$(Configuration)' == 'Release'">
27+
<!--When building the page on ci/cd-->
28+
<PackageReference Include="BlazorStatic" Version="$(BlazorStaticVersion)"/>
29+
</ItemGroup>
30+
<!--#endif-->
31+
32+
33+
<ItemGroup>
34+
<None Update="Content/**/*">
35+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
36+
</None>
37+
</ItemGroup>
38+
39+
40+
<!-- to make hot reload work on .md files -->
41+
<ItemGroup>
42+
<Watch Include="Content/**/*"/>
43+
</ItemGroup>
44+
3045

3146
</Project>

Components/App.razor

+14-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,20 @@
55
<meta charset="utf-8" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
77
<base href="/" />
8-
<link rel="stylesheet" href="app.min.css" />
8+
<script src="https://cdn.tailwindcss.com?plugins=typography"></script>
9+
<script>
10+
tailwind.config = {
11+
theme: {
12+
extend: {
13+
14+
colors: {
15+
primary: tailwind.colors.violet
16+
},
17+
},},
18+
}
19+
</script>
20+
21+
922
<HeadOutlet />
1023
</head>
1124

Program.cs

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
builder.WebHost.UseStaticWebAssets();
77

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

tailwind.config.js

-19
This file was deleted.

wwwroot/app.css

-3
This file was deleted.

0 commit comments

Comments
 (0)