-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added bootstrap sample
- Loading branch information
Stavros Kasidis
committed
Dec 24, 2018
1 parent
2d11b87
commit 382ee54
Showing
33 changed files
with
1,262 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -261,3 +261,6 @@ __pycache__/ | |
*.pyc | ||
*.min.css | ||
*.min.js | ||
|
||
|
||
/Artifacts/ |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 15 | ||
VisualStudioVersion = 15.0.26124.0 | ||
MinimumVisualStudioVersion = 15.0.26124.0 | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorDialog", "BlazorDialog\BlazorDialog.csproj", "{D6A05A5B-2A9D-43A8-B949-272147D62E52}" | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{4B0AEE66-03C7-46A3-AC4C-A18CCE52376C}" | ||
ProjectSection(SolutionItems) = preProject | ||
README.md = README.md | ||
EndProjectSection | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{DA8334A6-0B04-44CD-925C-7710EDECF4D2}" | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TestApps", "TestApps", "{99A35E68-10F9-4BDB-AB82-DEEEBAFA5581}" | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Blazor", "Blazor", "{7E1980A3-6F6D-4073-8AA8-88860C0F8B57}" | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorDialog.BlazorTestApp.Client", "TestApps\Blazor\BlazorDialog.BlazorTestApp.Client\BlazorDialog.BlazorTestApp.Client.csproj", "{1A4C24B7-8B7D-4C3A-8D1D-71CC23669721}" | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorDialog.BlazorTestApp.Server", "TestApps\Blazor\BlazorDialog.BlazorTestApp.Server\BlazorDialog.BlazorTestApp.Server.csproj", "{D5494F0E-1D2B-4FA3-BAC4-96A2695DC8A8}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Debug|x64 = Debug|x64 | ||
Debug|x86 = Debug|x86 | ||
Release|Any CPU = Release|Any CPU | ||
Release|x64 = Release|x64 | ||
Release|x86 = Release|x86 | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{D6A05A5B-2A9D-43A8-B949-272147D62E52}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{D6A05A5B-2A9D-43A8-B949-272147D62E52}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{D6A05A5B-2A9D-43A8-B949-272147D62E52}.Debug|x64.ActiveCfg = Debug|Any CPU | ||
{D6A05A5B-2A9D-43A8-B949-272147D62E52}.Debug|x64.Build.0 = Debug|Any CPU | ||
{D6A05A5B-2A9D-43A8-B949-272147D62E52}.Debug|x86.ActiveCfg = Debug|Any CPU | ||
{D6A05A5B-2A9D-43A8-B949-272147D62E52}.Debug|x86.Build.0 = Debug|Any CPU | ||
{D6A05A5B-2A9D-43A8-B949-272147D62E52}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{D6A05A5B-2A9D-43A8-B949-272147D62E52}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{D6A05A5B-2A9D-43A8-B949-272147D62E52}.Release|x64.ActiveCfg = Release|Any CPU | ||
{D6A05A5B-2A9D-43A8-B949-272147D62E52}.Release|x64.Build.0 = Release|Any CPU | ||
{D6A05A5B-2A9D-43A8-B949-272147D62E52}.Release|x86.ActiveCfg = Release|Any CPU | ||
{D6A05A5B-2A9D-43A8-B949-272147D62E52}.Release|x86.Build.0 = Release|Any CPU | ||
{1A4C24B7-8B7D-4C3A-8D1D-71CC23669721}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{1A4C24B7-8B7D-4C3A-8D1D-71CC23669721}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{1A4C24B7-8B7D-4C3A-8D1D-71CC23669721}.Debug|x64.ActiveCfg = Debug|Any CPU | ||
{1A4C24B7-8B7D-4C3A-8D1D-71CC23669721}.Debug|x64.Build.0 = Debug|Any CPU | ||
{1A4C24B7-8B7D-4C3A-8D1D-71CC23669721}.Debug|x86.ActiveCfg = Debug|Any CPU | ||
{1A4C24B7-8B7D-4C3A-8D1D-71CC23669721}.Debug|x86.Build.0 = Debug|Any CPU | ||
{1A4C24B7-8B7D-4C3A-8D1D-71CC23669721}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{1A4C24B7-8B7D-4C3A-8D1D-71CC23669721}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{1A4C24B7-8B7D-4C3A-8D1D-71CC23669721}.Release|x64.ActiveCfg = Release|Any CPU | ||
{1A4C24B7-8B7D-4C3A-8D1D-71CC23669721}.Release|x64.Build.0 = Release|Any CPU | ||
{1A4C24B7-8B7D-4C3A-8D1D-71CC23669721}.Release|x86.ActiveCfg = Release|Any CPU | ||
{1A4C24B7-8B7D-4C3A-8D1D-71CC23669721}.Release|x86.Build.0 = Release|Any CPU | ||
{D5494F0E-1D2B-4FA3-BAC4-96A2695DC8A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{D5494F0E-1D2B-4FA3-BAC4-96A2695DC8A8}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{D5494F0E-1D2B-4FA3-BAC4-96A2695DC8A8}.Debug|x64.ActiveCfg = Debug|Any CPU | ||
{D5494F0E-1D2B-4FA3-BAC4-96A2695DC8A8}.Debug|x64.Build.0 = Debug|Any CPU | ||
{D5494F0E-1D2B-4FA3-BAC4-96A2695DC8A8}.Debug|x86.ActiveCfg = Debug|Any CPU | ||
{D5494F0E-1D2B-4FA3-BAC4-96A2695DC8A8}.Debug|x86.Build.0 = Debug|Any CPU | ||
{D5494F0E-1D2B-4FA3-BAC4-96A2695DC8A8}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{D5494F0E-1D2B-4FA3-BAC4-96A2695DC8A8}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{D5494F0E-1D2B-4FA3-BAC4-96A2695DC8A8}.Release|x64.ActiveCfg = Release|Any CPU | ||
{D5494F0E-1D2B-4FA3-BAC4-96A2695DC8A8}.Release|x64.Build.0 = Release|Any CPU | ||
{D5494F0E-1D2B-4FA3-BAC4-96A2695DC8A8}.Release|x86.ActiveCfg = Release|Any CPU | ||
{D5494F0E-1D2B-4FA3-BAC4-96A2695DC8A8}.Release|x86.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(NestedProjects) = preSolution | ||
{7E1980A3-6F6D-4073-8AA8-88860C0F8B57} = {99A35E68-10F9-4BDB-AB82-DEEEBAFA5581} | ||
{1A4C24B7-8B7D-4C3A-8D1D-71CC23669721} = {7E1980A3-6F6D-4073-8AA8-88860C0F8B57} | ||
{D5494F0E-1D2B-4FA3-BAC4-96A2695DC8A8} = {7E1980A3-6F6D-4073-8AA8-88860C0F8B57} | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {F6D16D50-B899-4FB4-BB9C-1ECDD5D38570} | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<!-- | ||
Configuring this here is temporary. Later we'll move the app config | ||
into Program.cs, and it won't be necessary to specify AppAssembly. | ||
--> | ||
<Router AppAssembly=typeof(Program).Assembly /> |
19 changes: 19 additions & 0 deletions
19
TestApps/Blazor/BlazorDialog.BlazorTestApp.Client/BlazorDialog.BlazorTestApp.Client.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.Web"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
<OutputType>Exe</OutputType> | ||
<LangVersion>7.3</LangVersion> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.AspNetCore.Blazor.Browser" Version="0.7.0" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Blazor.Build" Version="0.7.0" PrivateAssets="all" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\..\BlazorDialog\BlazorDialog.csproj" /> | ||
</ItemGroup> | ||
|
||
|
||
</Project> |
22 changes: 22 additions & 0 deletions
22
TestApps/Blazor/BlazorDialog.BlazorTestApp.Client/Pages/Index.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
@page "/" | ||
@inject BlazorDialogService dialogService | ||
<h2>Hello, Blazor Dialog!</h2> | ||
|
||
<p>Click the buttons to show the corresponding dialog</p> | ||
|
||
<button onclick="@OnClick">Bootstrap Dialog</button> | ||
@if (dialogResult != null) | ||
{ | ||
<div>DialogResult: @dialogResult</div> | ||
} | ||
|
||
@functions{ | ||
string dialogResult = null; | ||
|
||
async Task OnClick() | ||
{ | ||
var resultTask = dialogService.ShowDialog<string>("bootstrap-dialog", "Are you sure?"); | ||
await JSRuntime.Current.InvokeAsync<object>("ShowBootstrapModal", "bootstrap-dialog"); //Trigger bootstrap's modal | ||
dialogResult = await resultTask; | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
TestApps/Blazor/BlazorDialog.BlazorTestApp.Client/Pages/_ViewImports.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@layout MainLayout |
16 changes: 16 additions & 0 deletions
16
TestApps/Blazor/BlazorDialog.BlazorTestApp.Client/Program.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using Microsoft.AspNetCore.Blazor.Hosting; | ||
|
||
namespace BlazorDialog.BlazorTestApp.Client | ||
{ | ||
public class Program | ||
{ | ||
public static void Main(string[] args) | ||
{ | ||
CreateHostBuilder(args).Build().Run(); | ||
} | ||
|
||
public static IWebAssemblyHostBuilder CreateHostBuilder(string[] args) => | ||
BlazorWebAssemblyHost.CreateDefaultBuilder() | ||
.UseBlazorStartup<Startup>(); | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
TestApps/Blazor/BlazorDialog.BlazorTestApp.Client/Properties/launchSettings.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"iisSettings": { | ||
"windowsAuthentication": false, | ||
"anonymousAuthentication": true, | ||
"iisExpress": { | ||
"applicationUrl": "http://localhost:57871/", | ||
"sslPort": 0 | ||
} | ||
}, | ||
"profiles": { | ||
"IIS Express": { | ||
"commandName": "IISExpress", | ||
"launchBrowser": true, | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "Development" | ||
} | ||
}, | ||
"BlazorDialog.BlazorTestApp.Client": { | ||
"commandName": "Project", | ||
"launchBrowser": true, | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "Development" | ||
}, | ||
"applicationUrl": "http://localhost:57872/" | ||
} | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
TestApps/Blazor/BlazorDialog.BlazorTestApp.Client/Shared/MainLayout.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
@inherits BlazorLayoutComponent | ||
@inject BlazorDialogService dialogService | ||
|
||
<div class="main"> | ||
<div class="content px-4"> | ||
<BlazorDialog Id="bootstrap-dialog" ContextType="string" Context="message"> | ||
<div id="bootstrap-dialog" class="modal" tabindex="-1" role="dialog"> | ||
<div class="modal-dialog" role="document"> | ||
<div class="modal-content"> | ||
<div class="modal-body"> | ||
<p>@message</p> | ||
</div> | ||
<div class="modal-footer"> | ||
<button type="button" class="btn btn-primary" data-dismiss="modal" onclick="@(()=> dialogService.HideDialog("bootstrap-dialog", "yes"))">Yes</button> | ||
<button type="button" class="btn btn-secondary" data-dismiss="modal" onclick="@(()=> dialogService.HideDialog("bootstrap-dialog", "no"))">No</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</BlazorDialog> | ||
|
||
@Body | ||
</div> | ||
</div> |
18 changes: 18 additions & 0 deletions
18
TestApps/Blazor/BlazorDialog.BlazorTestApp.Client/Startup.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using Microsoft.AspNetCore.Blazor.Builder; | ||
using Microsoft.Extensions.DependencyInjection; | ||
|
||
namespace BlazorDialog.BlazorTestApp.Client | ||
{ | ||
public class Startup | ||
{ | ||
public void ConfigureServices(IServiceCollection services) | ||
{ | ||
services.AddBlazorDialog(); | ||
} | ||
|
||
public void Configure(IBlazorApplicationBuilder app) | ||
{ | ||
app.AddComponent<App>("app"); | ||
} | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
TestApps/Blazor/BlazorDialog.BlazorTestApp.Client/_ViewImports.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
@using System.Net.Http | ||
@using Microsoft.AspNetCore.Blazor.Layouts | ||
@using Microsoft.AspNetCore.Blazor.Routing | ||
@using Microsoft.JSInterop | ||
@using BlazorDialog.BlazorTestApp.Client | ||
@using BlazorDialog.BlazorTestApp.Client.Shared | ||
|
||
|
||
@addTagHelper *,BlazorDialog |
1 change: 1 addition & 0 deletions
1
...Apps/Blazor/BlazorDialog.BlazorTestApp.Client/wwwroot/css/bootstrap/bootstrap.min.css.map
Large diffs are not rendered by default.
Oops, something went wrong.
86 changes: 86 additions & 0 deletions
86
TestApps/Blazor/BlazorDialog.BlazorTestApp.Client/wwwroot/css/open-iconic/FONT-LICENSE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
SIL OPEN FONT LICENSE Version 1.1 | ||
|
||
Copyright (c) 2014 Waybury | ||
|
||
PREAMBLE | ||
The goals of the Open Font License (OFL) are to stimulate worldwide | ||
development of collaborative font projects, to support the font creation | ||
efforts of academic and linguistic communities, and to provide a free and | ||
open framework in which fonts may be shared and improved in partnership | ||
with others. | ||
|
||
The OFL allows the licensed fonts to be used, studied, modified and | ||
redistributed freely as long as they are not sold by themselves. The | ||
fonts, including any derivative works, can be bundled, embedded, | ||
redistributed and/or sold with any software provided that any reserved | ||
names are not used by derivative works. The fonts and derivatives, | ||
however, cannot be released under any other type of license. The | ||
requirement for fonts to remain under this license does not apply | ||
to any document created using the fonts or their derivatives. | ||
|
||
DEFINITIONS | ||
"Font Software" refers to the set of files released by the Copyright | ||
Holder(s) under this license and clearly marked as such. This may | ||
include source files, build scripts and documentation. | ||
|
||
"Reserved Font Name" refers to any names specified as such after the | ||
copyright statement(s). | ||
|
||
"Original Version" refers to the collection of Font Software components as | ||
distributed by the Copyright Holder(s). | ||
|
||
"Modified Version" refers to any derivative made by adding to, deleting, | ||
or substituting -- in part or in whole -- any of the components of the | ||
Original Version, by changing formats or by porting the Font Software to a | ||
new environment. | ||
|
||
"Author" refers to any designer, engineer, programmer, technical | ||
writer or other person who contributed to the Font Software. | ||
|
||
PERMISSION & CONDITIONS | ||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of the Font Software, to use, study, copy, merge, embed, modify, | ||
redistribute, and sell modified and unmodified copies of the Font | ||
Software, subject to the following conditions: | ||
|
||
1) Neither the Font Software nor any of its individual components, | ||
in Original or Modified Versions, may be sold by itself. | ||
|
||
2) Original or Modified Versions of the Font Software may be bundled, | ||
redistributed and/or sold with any software, provided that each copy | ||
contains the above copyright notice and this license. These can be | ||
included either as stand-alone text files, human-readable headers or | ||
in the appropriate machine-readable metadata fields within text or | ||
binary files as long as those fields can be easily viewed by the user. | ||
|
||
3) No Modified Version of the Font Software may use the Reserved Font | ||
Name(s) unless explicit written permission is granted by the corresponding | ||
Copyright Holder. This restriction only applies to the primary font name as | ||
presented to the users. | ||
|
||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font | ||
Software shall not be used to promote, endorse or advertise any | ||
Modified Version, except to acknowledge the contribution(s) of the | ||
Copyright Holder(s) and the Author(s) or with their explicit written | ||
permission. | ||
|
||
5) The Font Software, modified or unmodified, in part or in whole, | ||
must be distributed entirely under this license, and must not be | ||
distributed under any other license. The requirement for fonts to | ||
remain under this license does not apply to any document created | ||
using the Font Software. | ||
|
||
TERMINATION | ||
This license becomes null and void if any of the above conditions are | ||
not met. | ||
|
||
DISCLAIMER | ||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT | ||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE | ||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL | ||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM | ||
OTHER DEALINGS IN THE FONT SOFTWARE. |
Oops, something went wrong.