Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>


<ItemGroup>
<_ContentIncludedByDefault Remove="wwwroot\codeBlockJsInterop.js" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Blazor.AdaptiveCards\AdaptiveCards.Blazor.csproj" />
<PackageReference Include="BlazorStrap" Version="1.1.101"></PackageReference>
<PackageReference Include="BlazorStrap" Version="5.0.105.4262022"></PackageReference>
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion samples/AdaptiveCards.Blazor.Samples/CodeBlock.razor
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="mt-5">
<BSButton Color="Color.Primary" OnClick="onclick">Source Code</BSButton>
<BSButton Color="BSColor.Light" OnClick="onclick">Source Code</BSButton>
<div class="mb-3"></div>
<BSCollapse IsOpen="@IsOpen">
<BSCard CardType="CardType.Card">
Expand Down
4 changes: 3 additions & 1 deletion samples/AdaptiveCards.Blazor.Samples/Pages/_Host.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<title>AdaptiveCards for Blazor Samples</title>
<base href="~/" />

<link href="AdaptiveCards.Blazor.Samples.styles.css" rel="stylesheet" integrity="if_needed">
<link href="bootstrap.min.css" rel="stylesheet">
<link href="docs.min.css" rel="stylesheet">
<link href="prism.css" rel="stylesheet">
Expand Down Expand Up @@ -56,6 +56,8 @@
</app>

<script src="_framework/blazor.server.js"></script>
<script src="_content/BlazorStrap/popper.min.js"></script>
<script src="_content/BlazorStrap/blazorstrap.js"></script>

<script>
AOS.init({
Expand Down
6 changes: 6 additions & 0 deletions samples/AdaptiveCards.Blazor.Samples/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using Microsoft.Extensions.Hosting;
using AdaptiveCards.Blazor.Samples.Data;
using AdaptiveCards.Blazor.Extensions;
using BlazorStrap;

namespace AdaptiveCards.Blazor.Samples
{
Expand All @@ -20,17 +21,22 @@ public class Startup
// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
public void ConfigureServices(IServiceCollection services)
{
//services.AddSingleton<BlazorStrap.IBlazorStrap>();
services.AddBlazorStrap();

services.AddRazorPages();
services.AddServerSideBlazor();
services.AddSingleton<WeatherForecastService>();
services.AddHttpClient("samples", x => {
x.BaseAddress = new System.Uri("https://raw.githubusercontent.com/mikoskinen/Blazor.AdaptiveCards/master/samples/AdaptiveCards.Blazor.Samples/Pages/");

});

services.AddBlazorAdaptiveCards()
.AddTemplate<WeatherForecast>(Schemas.WeatherTemplated)
.AddTemplate<Customer>(Schemas.CustomerTemplated)
.AddFileTemplate("Alternative", "AlternativeTemplatedAdaptiveCard.json");
;
}

// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
Expand Down
3 changes: 2 additions & 1 deletion samples/AdaptiveCards.Blazor.Samples/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*"
"AllowedHosts": "*",
"DetailedErrors": true
}
15 changes: 9 additions & 6 deletions src/Blazor.AdaptiveCards/AdaptiveCards.Blazor.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RazorLangVersion>3.0</RazorLangVersion>
<IsPackable>true</IsPackable>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
Expand All @@ -24,14 +24,17 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AdaptiveCards.Rendering.Html" Version="1.2.4" />
<PackageReference Include="Scriban" Version="2.0.1" />
<PackageReference Include="MinVer" Version="2.0.0" />
<PackageReference Include="AdaptiveCards.Rendering.Html" Version="2.7.3" />
<PackageReference Include="Scriban" Version="5.4.6" />
<PackageReference Include="MinVer" Version="4.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components" Version="3.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="3.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Components" Version="6.0.6" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.0.6" />
</ItemGroup>

<ItemGroup>
Expand Down