Browse Source

Installed abp blazorise package for test purpose.

pull/8074/head
Halil İbrahim Kalkan 6 years ago
parent
commit
aa7d9c176b
  1. 6
      test/BlazorServerSide/AbpBlazorServerDemo/AbpBlazorServerDemo.csproj
  2. 14
      test/BlazorServerSide/AbpBlazorServerDemo/AbpBlazorServerDemoModule.cs
  3. 13
      test/BlazorServerSide/AbpBlazorServerDemo/Pages/Index.razor
  4. 8
      test/BlazorServerSide/AbpBlazorServerDemo/Pages/_Host.cshtml
  5. 3
      test/BlazorServerSide/AbpBlazorServerDemo/_Imports.razor

6
test/BlazorServerSide/AbpBlazorServerDemo/AbpBlazorServerDemo.csproj

@ -4,10 +4,16 @@
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Blazorise.Bootstrap" Version="0.9.3-preview8" />
<PackageReference Include="Blazorise.Icons.FontAwesome" Version="0.9.3-preview8" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\framework\src\Volo.Abp.AspNetCore.Mvc\Volo.Abp.AspNetCore.Mvc.csproj" />
<ProjectReference Include="..\..\..\framework\src\Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic\Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.csproj" />
<ProjectReference Include="..\..\..\framework\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" />
<ProjectReference Include="..\..\..\framework\src\Volo.Abp.BlazoriseUI\Volo.Abp.BlazoriseUI.csproj" />
</ItemGroup>

14
test/BlazorServerSide/AbpBlazorServerDemo/AbpBlazorServerDemoModule.cs

@ -1,4 +1,6 @@
using AbpBlazorServerDemo.Data;
using Blazorise.Bootstrap;
using Blazorise.Icons.FontAwesome;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
@ -6,6 +8,7 @@ using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic;
using Volo.Abp.Autofac;
using Volo.Abp.BlazoriseUI;
using Volo.Abp.Modularity;
namespace AbpBlazorServerDemo
@ -13,15 +16,24 @@ namespace AbpBlazorServerDemo
[DependsOn(
typeof(AbpAutofacModule),
typeof(AbpAspNetCoreMvcModule),
typeof(AbpAspNetCoreMvcUiBasicThemeModule)
typeof(AbpAspNetCoreMvcUiBasicThemeModule),
typeof(AbpBlazoriseUIModule)
)]
public class AbpBlazorServerDemoModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
ConfigureBlazorise(context);
context.Services.AddServerSideBlazor();
context.Services.AddSingleton<WeatherForecastService>();
}
private void ConfigureBlazorise(ServiceConfigurationContext context)
{
context.Services
.AddBootstrapProviders()
.AddFontAwesomeIcons();
}
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{

13
test/BlazorServerSide/AbpBlazorServerDemo/Pages/Index.razor

@ -1,7 +1,16 @@
@page "/"
@using Volo.Abp.AspNetCore.Components.Messages
@inject IUiMessageService UiMessageService
<h1>Hello, world!</h1>
Welcome to your new app.
<Button Color="Color.Primary" Clicked="ShowMessage">Show message</Button>
<SurveyPrompt Title="How is Blazor working for you?" />
<UiMessageAlert />
@code{
private async Task ShowMessage()
{
await UiMessageService.Success("Blazorize is properly working :)");
}
}

8
test/BlazorServerSide/AbpBlazorServerDemo/Pages/_Host.cshtml

@ -13,6 +13,9 @@
<title>AbpBlazorServerDemo</title>
<base href="~/" />
<link rel="stylesheet" href="css/bootstrap/bootstrap.min.css" />
<link href="_content/Blazorise/blazorise.css" rel="stylesheet" />
<link href="_content/Blazorise.Bootstrap/blazorise.bootstrap.css" rel="stylesheet" />
<link href="_content/Blazorise.Snackbar/blazorise.snackbar.css" rel="stylesheet" />
<link href="css/site.css" rel="stylesheet" />
<link href="AbpBlazorServerDemo.styles.css" rel="stylesheet" />
</head>
@ -30,6 +33,9 @@
<a class="dismiss">🗙</a>
</div>
<script src="_framework/blazor.server.js"></script>
<script src="_framework/blazor.server.js"></script>
<script src="_content/Blazorise/blazorise.js"></script>
<script src="_content/Blazorise.Bootstrap/blazorise.bootstrap.js"></script>
</body>
</html>

3
test/BlazorServerSide/AbpBlazorServerDemo/_Imports.razor

@ -8,3 +8,6 @@
@using Microsoft.JSInterop
@using AbpBlazorServerDemo
@using AbpBlazorServerDemo.Shared
@using Blazorise
@using Volo.Abp.BlazoriseUI
@using Volo.Abp.BlazoriseUI.Components
Loading…
Cancel
Save