Merge branch 'merge/release/2.2-to-master'
This commit is contained in:
commit
5f5524a477
|
|
@ -1,4 +1,8 @@
|
|||
package.json
|
||||
package-lock.json
|
||||
tmp/
|
||||
CustomHive/
|
||||
angular/
|
||||
mvc/
|
||||
razor/
|
||||
react/
|
||||
reactredux/
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
$customHive = "$PSScriptRoot/CustomHive"
|
||||
|
||||
function Test-Template($templateName, $templateNupkg, $isSPA) {
|
||||
$tmpDir = "$PSScriptRoot/tmp"
|
||||
function Test-Template($templateName, $templateArgs, $templateNupkg, $isSPA) {
|
||||
$tmpDir = "$PSScriptRoot/$templateName"
|
||||
Remove-Item -Path $tmpDir -Recurse -ErrorAction Ignore
|
||||
|
||||
Create-Hive
|
||||
|
|
@ -12,10 +12,10 @@ function Test-Template($templateName, $templateNupkg, $isSPA) {
|
|||
New-Item -ErrorAction Ignore -Path $tmpDir -ItemType Directory
|
||||
Push-Location $tmpDir
|
||||
try {
|
||||
Run-DotnetNew $templateName, "--no-restore"
|
||||
$csproj = "$tmpDir/tmp.csproj"
|
||||
Run-DotnetNew $templateArgs, "--no-restore"
|
||||
$csproj = "$tmpDir/$templateName.csproj"
|
||||
$csprojContent = Get-Content -Path $csproj -Raw
|
||||
$csprojContent = $csprojContent -replace ('<Project Sdk="Microsoft.NET.Sdk.Web">', "<Project Sdk=""Microsoft.NET.Sdk.Web"">`n<Import Project=""$PSScriptRoot/../test/Templates.Test/bin/Release/netcoreapp2.2/TemplateTests.props"" />")
|
||||
$csprojContent = $csprojContent -replace ('<Project Sdk="Microsoft.NET.Sdk.Web">', "<Project Sdk=""Microsoft.NET.Sdk.Web"">`n<Import Project=""$PSScriptRoot/../test/Templates.Test/bin/Debug/netcoreapp2.2/TemplateTests.props"" />")
|
||||
$csprojContent | Set-Content $csproj
|
||||
|
||||
dotnet publish
|
||||
|
|
@ -49,5 +49,6 @@ function Clean-Hive() {
|
|||
}
|
||||
|
||||
function Run-DotnetNew($arguments) {
|
||||
dotnet new $arguments --debug:custom-hive $customHive
|
||||
$expression = "dotnet new $arguments --debug:custom-hive $customHive"
|
||||
Invoke-Expression $expression
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,13 +26,13 @@ foreach ($contentDir in $contentDirs) {
|
|||
$siteCss = Join-Path $cssFolder "site.css"
|
||||
$siteMinCss = Join-Path $cssFolder "site.min.css"
|
||||
if (Test-Path $siteCss) {
|
||||
uglifycss $siteCss > $siteMinCss
|
||||
npm uglifycss $siteCss > $siteMinCss
|
||||
}
|
||||
|
||||
$jsFolder = Join-Path $wwwRoot "js"
|
||||
$siteJs = Join-Path $jsFolder "site.js"
|
||||
$siteMinJs = Join-Path $jsFolder "site.min.js"
|
||||
if (Test-Path $siteJs) {
|
||||
uglifyjs $siteJs --output $siteMinJs
|
||||
npm uglifyjs $siteJs --output $siteMinJs
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,4 +9,4 @@ $ErrorActionPreference = 'Stop'
|
|||
|
||||
. $PSScriptRoot\Custom-Hive.ps1
|
||||
|
||||
Test-Template "angular" "Microsoft.DotNet.Web.Spa.ProjectTemplates.2.2.0-preview1-t000.nupkg" $true
|
||||
Test-Template "angular" "angular" "Microsoft.DotNet.Web.Spa.ProjectTemplates.2.2.0-preview2-t000.nupkg" $true
|
||||
|
|
|
|||
|
|
@ -6,4 +6,4 @@ param()
|
|||
|
||||
. $PSScriptRoot\Custom-Hive.ps1
|
||||
|
||||
Test-Template "razor" "Microsoft.DotNet.Web.ProjectTemplates.2.2.2.2.0-preview1-t000.nupkg" $false
|
||||
Test-Template "razor" "razor -au Individual" "Microsoft.DotNet.Web.ProjectTemplates.2.2.2.2.0-preview2-t000.nupkg" $false
|
||||
|
|
|
|||
|
|
@ -9,4 +9,4 @@ $ErrorActionPreference = 'Stop'
|
|||
|
||||
. $PSScriptRoot\Custom-Hive.ps1
|
||||
|
||||
Test-Template "react" "Microsoft.DotNet.Web.Spa.ProjectTemplates.2.2.0-preview1-t000.nupkg" $true
|
||||
Test-Template "react" "react" "Microsoft.DotNet.Web.Spa.ProjectTemplates.2.2.0-preview2-t000.nupkg" $true
|
||||
|
|
|
|||
|
|
@ -9,4 +9,4 @@ $ErrorActionPreference = 'Stop'
|
|||
|
||||
. $PSScriptRoot\Custom-Hive.ps1
|
||||
|
||||
Test-Template "reactredux" "Microsoft.DotNet.Web.Spa.ProjectTemplates.2.2.0-preview1-t000.nupkg" $true
|
||||
Test-Template "reactredux" "reactredux" "Microsoft.DotNet.Web.Spa.ProjectTemplates.2.2.0-preview2-t000.nupkg" $true
|
||||
|
|
|
|||
|
|
@ -9,4 +9,4 @@ $ErrorActionPreference = 'Stop'
|
|||
|
||||
. $PSScriptRoot\Custom-Hive.ps1
|
||||
|
||||
Test-Template "mvc", "-au", "Individual" "Microsoft.DotNet.Web.ProjectTemplates.2.2.2.2.0-preview1-t000.nupkg" $false
|
||||
Test-Template "mvc" "mvc -au Individual" "Microsoft.DotNet.Web.ProjectTemplates.2.2.2.2.0-preview2-t000.nupkg" $false
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"name": "scripts",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"dependencies": {
|
||||
"uglify-js": "~3.4.7",
|
||||
"uglifycss": "~0.0.29"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC"
|
||||
}
|
||||
|
|
@ -3,6 +3,8 @@
|
|||
<PropertyGroup>
|
||||
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">netcoreapp3.0</TargetFramework>
|
||||
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">TargetFrameworkOverride</TargetFramework>
|
||||
<NoDefaultLaunchSettingsFile Condition="'$(ExcludeLaunchSettings)' == 'True'">True</NoDefaultLaunchSettingsFile>
|
||||
<AspNetCoreHostingModel>inprocess</AspNetCoreHostingModel>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
@ -11,6 +13,7 @@
|
|||
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' == ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="${MicrosoftAspNetCoreRazorDesignPackageVersion}" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' != ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="${MicrosoftAspNetCorePackageVersion}" />
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
<PropertyGroup>
|
||||
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">netcoreapp3.0</TargetFramework>
|
||||
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">TargetFrameworkOverride</TargetFramework>
|
||||
<NoDefaultLaunchSettingsFile Condition="'$(ExcludeLaunchSettings)' == 'True'">True</NoDefaultLaunchSettingsFile>
|
||||
<AspNetCoreHostingModel>inprocess</AspNetCoreHostingModel>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@
|
|||
MicrosoftAspNetCoreHttpsPolicyPackageVersion=$(MicrosoftAspNetCoreHttpsPolicyPackageVersion);
|
||||
MicrosoftAspNetCoreIdentityEntityFrameworkCorePackageVersion=$(MicrosoftAspNetCoreIdentityEntityFrameworkCorePackageVersion);
|
||||
MicrosoftAspNetCoreMvcPackageVersion=$(MicrosoftAspNetCoreMvcPackageVersion);
|
||||
MicrosoftAspNetCoreMvcRazorViewCompilationPackageVersion=$(MicrosoftAspNetCoreMvcRazorViewCompilationPackageVersion);
|
||||
MicrosoftAspNetCoreRazorDesignPackageVersion=$(MicrosoftAspNetCoreRazorDesignPackageVersion);
|
||||
MicrosoftAspNetCorePackageVersion=$(MicrosoftAspNetCorePackageVersion);
|
||||
MicrosoftAspNetCoreStaticFilesPackageVersion=$(MicrosoftAspNetCoreStaticFilesPackageVersion);
|
||||
MicrosoftEntityFrameworkCoreDesignPackageVersion=$(MicrosoftEntityFrameworkCoreDesignPackageVersion);
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@
|
|||
<DebugType Condition="'$(TargetFrameworkOverride)' != ''">full</DebugType>
|
||||
<WebProject_DirectoryAccessLevelKey Condition="'$(OrganizationalAuth)' == 'True' AND '$(OrgReadAccess)' != 'True'">0</WebProject_DirectoryAccessLevelKey>
|
||||
<WebProject_DirectoryAccessLevelKey Condition="'$(OrganizationalAuth)' == 'True' AND '$(OrgReadAccess)' == 'True'">1</WebProject_DirectoryAccessLevelKey>
|
||||
<NoDefaultLaunchSettingsFile Condition="'$(ExcludeLaunchSettings)' == 'True'">True</NoDefaultLaunchSettingsFile>
|
||||
<AspNetCoreHostingModel>inprocess</AspNetCoreHostingModel>
|
||||
</PropertyGroup>
|
||||
|
||||
<!--#if (IndividualLocalAuth && !UseLocalDB) -->
|
||||
|
|
@ -20,6 +22,7 @@
|
|||
<PackageReference Include="Microsoft.AspNetCore.App"/>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.AzureAD.UI" Version="${MicrosoftAspNetCoreAuthenticationAzureADUIPackageVersion}" Condition="'$(OrganizationalAuth)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.AzureADB2C.UI" Version="${MicrosoftAspNetCoreAuthenticationAzureADB2CUIPackageVersion}" Condition="'$(IndividualB2CAuth)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="${MicrosoftAspNetCoreRazorDesignPackageVersion}" PrivateAssets="All" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="${MicrosoftEntityFrameworkCoreSqlitePackageVersion}" Condition=" '$(IndividualLocalAuth)' == 'True' AND '$(UseLocalDB)' != 'True'" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="${MicrosoftVisualStudioWebBrowserLinkPackageVersion}" Condition="'$(UseBrowserLink)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="${MicrosoftVisualStudioWebCodeGenerationDesignPackageVersion}" PrivateAssets="All" Condition="'$(IndividualAuth)' == 'True'" />
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@
|
|||
<UserSecretsId Condition="'$(IndividualAuth)' == 'True' OR '$(OrganizationalAuth)' == 'True'">aspnet-Company.WebApplication1-53bc9b9d-9d6a-45d4-8429-2a2761773502</UserSecretsId>
|
||||
<WebProject_DirectoryAccessLevelKey Condition="'$(OrganizationalAuth)' == 'True' AND '$(OrgReadAccess)' != 'True'">0</WebProject_DirectoryAccessLevelKey>
|
||||
<WebProject_DirectoryAccessLevelKey Condition="'$(OrganizationalAuth)' == 'True' AND '$(OrgReadAccess)' == 'True'">1</WebProject_DirectoryAccessLevelKey>
|
||||
<NoDefaultLaunchSettingsFile Condition="'$(ExcludeLaunchSettings)' == 'True'">True</NoDefaultLaunchSettingsFile>
|
||||
<AspNetCoreHostingModel>inprocess</AspNetCoreHostingModel>
|
||||
</PropertyGroup>
|
||||
|
||||
<!--#if (IndividualLocalAuth && !UseLocalDB) -->
|
||||
|
|
@ -20,6 +22,7 @@
|
|||
<PackageReference Include="Microsoft.AspNetCore.App" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.AzureAD.UI" Version="${MicrosoftAspNetCoreAuthenticationAzureADUIPackageVersion}" Condition="'$(OrganizationalAuth)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.AzureADB2C.UI" Version="${MicrosoftAspNetCoreAuthenticationAzureADB2CUIPackageVersion}" Condition="'$(IndividualB2CAuth)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="${MicrosoftAspNetCoreRazorDesignPackageVersion}" PrivateAssets="All" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="${MicrosoftEntityFrameworkCoreSqlitePackageVersion}" Condition=" '$(IndividualLocalAuth)' == 'True' AND '$(UseLocalDB)' != 'True'" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="${MicrosoftVisualStudioWebBrowserLinkPackageVersion}" Condition="'$(UseBrowserLink)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="${MicrosoftVisualStudioWebCodeGenerationDesignPackageVersion}" PrivateAssets="All" Condition="'$(IndividualAuth)' == 'True'" />
|
||||
|
|
|
|||
|
|
@ -3,6 +3,9 @@
|
|||
<PropertyGroup>
|
||||
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">netcoreapp3.0</TargetFramework>
|
||||
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">TargetFrameworkOverride</TargetFramework>
|
||||
<MvcRazorCompileOnPublish>true</MvcRazorCompileOnPublish>
|
||||
<NoDefaultLaunchSettingsFile Condition="'$(ExcludeLaunchSettings)' == 'True'">True</NoDefaultLaunchSettingsFile>
|
||||
<AspNetCoreHostingModel>inprocess</AspNetCoreHostingModel>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
<UserSecretsId Condition="'$(IndividualAuth)' == 'True' OR '$(OrganizationalAuth)' == 'True'">aspnet-Company.WebApplication1-53bc9b9d-9d6a-45d4-8429-2a2761773502</UserSecretsId>
|
||||
<WebProject_DirectoryAccessLevelKey Condition="'$(OrganizationalAuth)' == 'True' AND '$(OrgReadAccess)' != 'True'">0</WebProject_DirectoryAccessLevelKey>
|
||||
<WebProject_DirectoryAccessLevelKey Condition="'$(OrganizationalAuth)' == 'True' AND '$(OrgReadAccess)' == 'True'">1</WebProject_DirectoryAccessLevelKey>
|
||||
<NoDefaultLaunchSettingsFile Condition="'$(ExcludeLaunchSettings)' == 'True'">True</NoDefaultLaunchSettingsFile>
|
||||
<AspNetCoreHostingModel>inprocess</AspNetCoreHostingModel>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
@ -16,6 +18,7 @@
|
|||
<PackageReference Include="Microsoft.AspNetCore.App" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.AzureAD.UI" Version="${MicrosoftAspNetCoreAuthenticationAzureADUIPackageVersion}" Condition="'$(OrganizationalAuth)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.AzureADB2C.UI" Version="${MicrosoftAspNetCoreAuthenticationAzureADB2CUIPackageVersion}" Condition="'$(IndividualB2CAuth)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="${MicrosoftAspNetCoreRazorDesignPackageVersion}" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' != ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="${MicrosoftAspNetCorePackageVersion}" />
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
<PropertyGroup>
|
||||
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">netcoreapp3.0</TargetFramework>
|
||||
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">TargetFrameworkOverride</TargetFramework>
|
||||
<NoDefaultLaunchSettingsFile Condition="'$(ExcludeLaunchSettings)' == 'True'">True</NoDefaultLaunchSettingsFile>
|
||||
<AspNetCoreHostingModel>inprocess</AspNetCoreHostingModel>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Debug",
|
||||
"System": "Information",
|
||||
"Microsoft": "Information"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Warning"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*"
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Debug",
|
||||
"System": "Information",
|
||||
"Microsoft": "Information"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Warning"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*"
|
||||
}
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
<header>
|
||||
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" asp-area="" asp-page="/">Company.WebApplication1</a>
|
||||
<a class="navbar-brand" asp-area="" asp-page="/Index">Company.WebApplication1</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target=".navbar-collapse" aria-controls="navbarSupportedContent"
|
||||
aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
|
|
@ -33,10 +33,10 @@
|
|||
#endif*@
|
||||
<ul class="navbar-nav flex-grow-1">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Index">Page1</a>
|
||||
<a class="nav-link text-dark" asp-area="" asp-page="/Index">Page1</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Index">Page2</a>
|
||||
<a class="nav-link text-dark" asp-area="" asp-page="/Index">Page2</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
@ -45,12 +45,12 @@
|
|||
</header>
|
||||
<div class="container">
|
||||
<partial name="_CookieConsentPartial" />
|
||||
<main role="main" class="pb-1">
|
||||
<main role="main" class="pb-3">
|
||||
@RenderBody()
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<footer class="border-top footer pl-3 text-muted">
|
||||
<footer class="border-top footer text-muted">
|
||||
<div class="container">
|
||||
© copyrightYear - Company.WebApplication1 - <a asp-area="" asp-page="/Privacy">Privacy</a>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
<a class="nav-link text-dark" asp-area="Identity" asp-page="/Account/Manage/Index" title="Manage">Hello @User.Identity.Name!</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<form class="form-inline" asp-area="Identity" asp-page="/Account/Logout" asp-route-returnUrl="@Url.Page("/", new { area = "" })">
|
||||
<form class="form-inline" asp-area="Identity" asp-page="/Account/Logout" asp-route-returnUrl="@Url.Page("/", new { area = "" })" method="post" >
|
||||
<button type="submit" class="nav-link btn btn-link text-dark">Logout</button>
|
||||
</form>
|
||||
</li>
|
||||
|
|
@ -23,4 +23,4 @@ else
|
|||
<a class="nav-link text-dark" asp-area="Identity" asp-page="/Account/Login">Login</a>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
</ul>
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -45,12 +45,12 @@
|
|||
</header>
|
||||
<div class="container">
|
||||
<partial name="_CookieConsentPartial" />
|
||||
<main role="main" class="pb-1">
|
||||
<main role="main" class="pb-3">
|
||||
@RenderBody()
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<footer class="border-top footer pl-3 text-muted">
|
||||
<footer class="border-top footer text-muted">
|
||||
<div class="container">
|
||||
© copyrightYear - Company.WebApplication1 - <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
|
||||
</div>
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
|
|
@ -8,6 +8,7 @@
|
|||
<IsPackable>false</IsPackable>
|
||||
<SpaRoot>ClientApp\</SpaRoot>
|
||||
<DefaultItemExcludes>$(DefaultItemExcludes);$(SpaRoot)node_modules\**</DefaultItemExcludes>
|
||||
<NoDefaultLaunchSettingsFile Condition="'$(ExcludeLaunchSettings)' == 'True'">True</NoDefaultLaunchSettingsFile>
|
||||
|
||||
<!-- Set this to true if you enable server-side prerendering -->
|
||||
<BuildServerSideRenderer>false</BuildServerSideRenderer>
|
||||
|
|
@ -15,11 +16,13 @@
|
|||
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' == ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="${MicrosoftAspNetCoreRazorDesignPackageVersion}" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' != ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="${MicrosoftAspNetCorePackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.HttpsPolicy" Version="${MicrosoftAspNetCoreHttpsPolicyPackageVersion}" Condition="'$(NoHttps)' != 'True'"/>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="${MicrosoftAspNetCoreMvcPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="${MicrosoftAspNetCoreRazorDesignPackageVersion}" PrivateAssets="All" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SpaServices" Version="${MicrosoftAspNetCoreSpaServicesPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="${MicrosoftAspNetCoreSpaServicesExtensionsPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="${MicrosoftAspNetCoreStaticFilesPackageVersion}" />
|
||||
|
|
@ -28,6 +31,7 @@
|
|||
<ItemGroup>
|
||||
<!-- Don't publish the SPA source files, but do show them in the project files list -->
|
||||
<Content Remove="$(SpaRoot)**" />
|
||||
<None Remove="$(SpaRoot)**" />
|
||||
<None Include="$(SpaRoot)**" Exclude="$(SpaRoot)node_modules\**" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
MicrosoftAspNetCoreAppPackageVersion=$(MicrosoftAspNetCoreAppPackageVersion);
|
||||
MicrosoftAspNetCoreHttpsPolicyPackageVersion=$(MicrosoftAspNetCoreHttpsPolicyPackageVersion);
|
||||
MicrosoftAspNetCoreMvcPackageVersion=$(MicrosoftAspNetCoreMvcPackageVersion);
|
||||
MicrosoftAspNetCoreRazorDesignPackageVersion=$(MicrosoftAspNetCoreRazorDesignPackageVersion);
|
||||
MicrosoftAspNetCoreSpaServicesPackageVersion=$(MicrosoftAspNetCoreSpaServicesPackageVersion);
|
||||
MicrosoftAspNetCoreSpaServicesExtensionsPackageVersion=$(MicrosoftAspNetCoreSpaServicesExtensionsPackageVersion);
|
||||
MicrosoftAspNetCoreStaticFilesPackageVersion=$(MicrosoftAspNetCoreStaticFilesPackageVersion);
|
||||
|
|
|
|||
|
|
@ -8,15 +8,18 @@
|
|||
<IsPackable>false</IsPackable>
|
||||
<SpaRoot>ClientApp\</SpaRoot>
|
||||
<DefaultItemExcludes>$(DefaultItemExcludes);$(SpaRoot)node_modules\**</DefaultItemExcludes>
|
||||
<NoDefaultLaunchSettingsFile Condition="'$(ExcludeLaunchSettings)' == 'True'">True</NoDefaultLaunchSettingsFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' == ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="${MicrosoftAspNetCoreRazorDesignPackageVersion}" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' != ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="${MicrosoftAspNetCorePackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.HttpsPolicy" Version="${MicrosoftAspNetCoreHttpsPolicyPackageVersion}" Condition="'$(NoHttps)' != 'True'"/>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="${MicrosoftAspNetCoreMvcPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="${MicrosoftAspNetCoreRazorDesignPackageVersion}" PrivateAssets="All" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SpaServices" Version="${MicrosoftAspNetCoreSpaServicesPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="${MicrosoftAspNetCoreSpaServicesExtensionsPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="${MicrosoftAspNetCoreStaticFilesPackageVersion}" />
|
||||
|
|
@ -25,6 +28,7 @@
|
|||
<ItemGroup>
|
||||
<!-- Don't publish the SPA source files, but do show them in the project files list -->
|
||||
<Content Remove="$(SpaRoot)**" />
|
||||
<None Remove="$(SpaRoot)**" />
|
||||
<None Include="$(SpaRoot)**" Exclude="$(SpaRoot)node_modules\**" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -8,15 +8,18 @@
|
|||
<IsPackable>false</IsPackable>
|
||||
<SpaRoot>ClientApp\</SpaRoot>
|
||||
<DefaultItemExcludes>$(DefaultItemExcludes);$(SpaRoot)node_modules\**</DefaultItemExcludes>
|
||||
<NoDefaultLaunchSettingsFile Condition="'$(ExcludeLaunchSettings)' == 'True'">True</NoDefaultLaunchSettingsFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' == ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="${MicrosoftAspNetCoreRazorDesignPackageVersion}" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' != ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="${MicrosoftAspNetCorePackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.HttpsPolicy" Version="${MicrosoftAspNetCoreHttpsPolicyPackageVersion}" Condition="'$(NoHttps)' != 'True'"/>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="${MicrosoftAspNetCoreMvcPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="${MicrosoftAspNetCoreRazorDesignPackageVersion}" PrivateAssets="All" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SpaServices" Version="${MicrosoftAspNetCoreSpaServicesPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="${MicrosoftAspNetCoreSpaServicesExtensionsPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="${MicrosoftAspNetCoreStaticFilesPackageVersion}" />
|
||||
|
|
@ -25,6 +28,7 @@
|
|||
<ItemGroup>
|
||||
<!-- Don't publish the SPA source files, but do show them in the project files list -->
|
||||
<Content Remove="$(SpaRoot)**" />
|
||||
<None Remove="$(SpaRoot)**" />
|
||||
<None Include="$(SpaRoot)**" Exclude="$(SpaRoot)node_modules\**" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -4,4 +4,4 @@
|
|||
|
||||
<p>Current count: <strong>{{ currentCount }}</strong></p>
|
||||
|
||||
<button (click)="incrementCounter()">Increment</button>
|
||||
<button class="btn btn-primary" (click)="incrementCounter()">Increment</button>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<p *ngIf="!forecasts"><em>Loading...</em></p>
|
||||
|
||||
<table class='table' *ngIf="forecasts">
|
||||
<table class='table table-striped' *ngIf="forecasts">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
|
|
|
|||
|
|
@ -1,56 +1,18 @@
|
|||
.navbar li .glyphicon {
|
||||
margin-right: 10px;
|
||||
a.navbar-brand {
|
||||
white-space: normal;
|
||||
text-align: center;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
/* Highlighting rules for nav menu items */
|
||||
.navbar .navbar-nav .active a,
|
||||
.navbar .navbar-nav .active a:hover,
|
||||
.navbar .navbar-nav .active a:focus {
|
||||
background-image: none;
|
||||
background-color: #4189C7;
|
||||
color: white;
|
||||
html {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
/* On large screens, convert the nav menu to a vertical sidebar */
|
||||
.navbar {
|
||||
height: 100%;
|
||||
}
|
||||
.navbar {
|
||||
border-radius: 0;
|
||||
border-width: 0;
|
||||
height: 100%;
|
||||
}
|
||||
.navbar-header {
|
||||
float: none;
|
||||
}
|
||||
.navbar .navbar-collapse {
|
||||
padding: 0;
|
||||
}
|
||||
.navbar .container-fluid {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
.navbar .container-fluid .navbar-brand {
|
||||
margin: 0;
|
||||
}
|
||||
.navbar ul {
|
||||
float: none;
|
||||
}
|
||||
.navbar li {
|
||||
float: none;
|
||||
font-size: 15px;
|
||||
margin: 6px;
|
||||
}
|
||||
.navbar li a {
|
||||
padding: 10px 16px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.navbar a {
|
||||
/* If a menu item's text is too long, truncate it */
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
html {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.box-shadow {
|
||||
box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,22 +1,24 @@
|
|||
<header>
|
||||
<nav class='navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3'>
|
||||
<a class="navbar-brand" href="~/">Company.WebApplication1</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target=".navbar-collapse" aria-label="Toggle navigation"
|
||||
[attr.aria-expanded]="isExpanded" (click)="toggle()">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="navbar-collapse collapse d-sm-inline-flex flex-sm-row-reverse" [ngClass]='{"show": isExpanded}'>
|
||||
<ul class="navbar-nav flex-grow-1">
|
||||
<li class="nav-item" [routerLinkActive]='["link-active"]' [routerLinkActiveOptions]='{ exact: true }'>
|
||||
<a class="nav-link text-dark" [routerLink]='["/"]'>Home</a>
|
||||
</li>
|
||||
<li class="nav-item" [routerLinkActive]='["link-active"]'>
|
||||
<a class="nav-link text-dark" [routerLink]='["/counter"]'>Counter</a>
|
||||
</li>
|
||||
<li class="nav-item" [routerLinkActive]='["link-active"]'>
|
||||
<a class="nav-link text-dark" [routerLink]='["/fetch-data"]'>Fetch data</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="container">
|
||||
<a class="navbar-brand" [routerLink]='["/"]'>Company.WebApplication1</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target=".navbar-collapse" aria-label="Toggle navigation"
|
||||
[attr.aria-expanded]="isExpanded" (click)="toggle()">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="navbar-collapse collapse d-sm-inline-flex flex-sm-row-reverse" [ngClass]='{"show": isExpanded}'>
|
||||
<ul class="navbar-nav flex-grow">
|
||||
<li class="nav-item" [routerLinkActive]='["link-active"]' [routerLinkActiveOptions]='{ exact: true }'>
|
||||
<a class="nav-link text-dark" [routerLink]='["/"]'>Home</a>
|
||||
</li>
|
||||
<li class="nav-item" [routerLinkActive]='["link-active"]'>
|
||||
<a class="nav-link text-dark" [routerLink]='["/counter"]'>Counter</a>
|
||||
</li>
|
||||
<li class="nav-item" [routerLinkActive]='["link-active"]'>
|
||||
<a class="nav-link text-dark" [routerLink]='["/fetch-data"]'>Fetch data</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ export class Counter extends Component {
|
|||
|
||||
<p>Current count: <strong>{this.state.currentCount}</strong></p>
|
||||
|
||||
<button onClick={this.incrementCounter}>Increment</button>
|
||||
<button className="btn btn-primary" onClick={this.incrementCounter}>Increment</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ export class FetchData extends Component {
|
|||
|
||||
static renderForecastsTable(forecasts) {
|
||||
return (
|
||||
<table className='table'>
|
||||
<table className='table table-striped'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import React, { Component } from 'react';
|
||||
import { Col, Container, Row } from 'reactstrap';
|
||||
import { Container } from 'reactstrap';
|
||||
import { NavMenu } from './NavMenu';
|
||||
|
||||
export class Layout extends Component {
|
||||
|
|
@ -7,16 +7,12 @@ export class Layout extends Component {
|
|||
|
||||
render() {
|
||||
return (
|
||||
<Container className="mw-100" >
|
||||
<Row>
|
||||
<Col sm={3}>
|
||||
<NavMenu />
|
||||
</Col>
|
||||
<Col sm={9}>
|
||||
{this.props.children}
|
||||
</Col>
|
||||
</Row>
|
||||
</Container>
|
||||
<div>
|
||||
<NavMenu />
|
||||
<Container>
|
||||
{this.props.children}
|
||||
</Container>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,57 +1,18 @@
|
|||
.navbar li .glyphicon {
|
||||
margin-right: 10px;
|
||||
a.navbar-brand {
|
||||
white-space: normal;
|
||||
text-align: center;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
/* Highlighting rules for nav menu items */
|
||||
.navbar .navbar-nav .active a,
|
||||
.navbar .navbar-nav .active a:hover,
|
||||
.navbar .navbar-nav .active a:focus {
|
||||
background-image: none;
|
||||
background-color: #4189C7;
|
||||
color: white;
|
||||
html {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
/* On large screens, convert the nav menu to a vertical sidebar */
|
||||
.navbar {
|
||||
height: 100%;
|
||||
}
|
||||
.navbar {
|
||||
border-radius: 0;
|
||||
border-width: 0;
|
||||
height: 100%;
|
||||
}
|
||||
.navbar-header {
|
||||
float: none;
|
||||
}
|
||||
.navbar .navbar-collapse {
|
||||
border-top: 1px solid #444;
|
||||
padding: 0;
|
||||
}
|
||||
.navbar .container-fluid {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
.navbar .container-fluid .navbar-brand {
|
||||
margin: 0;
|
||||
}
|
||||
.navbar ul {
|
||||
float: none;
|
||||
}
|
||||
.navbar li {
|
||||
float: none;
|
||||
font-size: 15px;
|
||||
margin: 6px;
|
||||
}
|
||||
.navbar li a {
|
||||
padding: 10px 16px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.navbar a {
|
||||
/* If a menu item's text is too long, truncate it */
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
html {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.box-shadow {
|
||||
box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import React, { Component } from 'react';
|
||||
import { Collapse, Nav, Navbar, NavbarBrand, NavbarToggler, NavItem, NavLink } from 'reactstrap';
|
||||
import { Collapse, Container, Navbar, NavbarBrand, NavbarToggler, NavItem, NavLink } from 'reactstrap';
|
||||
import './NavMenu.css';
|
||||
|
||||
export class NavMenu extends Component {
|
||||
|
|
@ -10,7 +10,7 @@ export class NavMenu extends Component {
|
|||
|
||||
this.toggleNavbar = this.toggleNavbar.bind(this);
|
||||
this.state = {
|
||||
collapsed: false
|
||||
collapsed: true
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -22,25 +22,27 @@ export class NavMenu extends Component {
|
|||
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
<Navbar color="faded" light>
|
||||
<NavbarBrand href="/" className="mr-auto">Company.WebApplication1</NavbarBrand>
|
||||
<NavbarToggler onClick={this.toggleNavbar} className="mr-2" />
|
||||
<Collapse isOpen={!this.state.collapsed} navbar>
|
||||
<Nav navbar>
|
||||
<NavItem>
|
||||
<NavLink href="/">Home</NavLink>
|
||||
</NavItem>
|
||||
<NavItem>
|
||||
<NavLink href="/counter">Counter</NavLink>
|
||||
</NavItem>
|
||||
<NavItem>
|
||||
<NavLink href="/fetch-data">Fetch data</NavLink>
|
||||
</NavItem>
|
||||
</Nav>
|
||||
</Collapse>
|
||||
<header>
|
||||
<Navbar className="navbar-expand-sm navbar-toggleable-sm ng-white border-bottom box-shadow mb-3" light>
|
||||
<Container>
|
||||
<NavbarBrand href="/">Company.WebApplication1</NavbarBrand>
|
||||
<NavbarToggler onClick={this.toggleNavbar} className="mr-2" />
|
||||
<Collapse className="d-sm-inline-flex flex-sm-row-reverse" isOpen={!this.state.collapsed} navbar>
|
||||
<ul className="navbar-nav flex-grow">
|
||||
<NavItem>
|
||||
<NavLink className="text-dark" href="/">Home</NavLink>
|
||||
</NavItem>
|
||||
<NavItem>
|
||||
<NavLink className="text-dark" href="/counter">Counter</NavLink>
|
||||
</NavItem>
|
||||
<NavItem>
|
||||
<NavLink className="text-dark" href="/fetch-data">Fetch data</NavLink>
|
||||
</NavItem>
|
||||
</ul>
|
||||
</Collapse>
|
||||
</Container>
|
||||
</Navbar>
|
||||
</div >
|
||||
</header>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
@media (max-width: 767px) {
|
||||
/* On small screens, the nav menu spans the full width of the screen. Leave a space for it. */
|
||||
body {
|
||||
padding-top: 50px;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
import 'bootstrap/dist/css/bootstrap.css';
|
||||
import './index.css';
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import { BrowserRouter } from 'react-router-dom';
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ const Counter = props => (
|
|||
|
||||
<p>Current count: <strong>{props.count}</strong></p>
|
||||
|
||||
<button onClick={props.increment}>Increment</button>
|
||||
<button className="btn btn-primary" onClick={props.increment}>Increment</button>
|
||||
</div>
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class FetchData extends Component {
|
|||
|
||||
function renderForecastsTable(props) {
|
||||
return (
|
||||
<table className='table'>
|
||||
<table className='table table-striped'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
|
|
|
|||
|
|
@ -1,16 +1,12 @@
|
|||
import React from 'react';
|
||||
import { Col, Container, Row } from 'reactstrap';
|
||||
import { Container } from 'reactstrap';
|
||||
import NavMenu from './NavMenu';
|
||||
|
||||
export default props => (
|
||||
<Container fluid>
|
||||
<Row>
|
||||
<Col sm={3}>
|
||||
<NavMenu />
|
||||
</Col>
|
||||
<Col sm={9}>
|
||||
{props.children}
|
||||
</Col>
|
||||
</Row>
|
||||
</Container>
|
||||
<div>
|
||||
<NavMenu />
|
||||
<Container>
|
||||
{props.children}
|
||||
</Container>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,58 +1,20 @@
|
|||
.navbar li .glyphicon {
|
||||
margin-right: 10px;
|
||||
a.navbar-brand {
|
||||
white-space: normal;
|
||||
text-align: center;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
/* Highlighting rules for nav menu items */
|
||||
.navbar .navbar-nav .active a,
|
||||
.navbar .navbar-nav .active a:hover,
|
||||
.navbar .navbar-nav .active a:focus {
|
||||
background-image: none;
|
||||
background-color: #4189C7;
|
||||
color: white;
|
||||
html {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
/* On large screens, convert the nav menu to a vertical sidebar */
|
||||
.navbar {
|
||||
height: 100%;
|
||||
width: calc(25% - 20px);
|
||||
}
|
||||
.navbar {
|
||||
border-radius: 0;
|
||||
border-width: 0;
|
||||
height: 100%;
|
||||
}
|
||||
.navbar-header {
|
||||
float: none;
|
||||
}
|
||||
.navbar .navbar-collapse {
|
||||
border-top: 1px solid #444;
|
||||
padding: 0;
|
||||
}
|
||||
.navbar .container-fluid {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
.navbar .container-fluid .navbar-brand {
|
||||
margin: 0;
|
||||
}
|
||||
.navbar ul {
|
||||
float: none;
|
||||
}
|
||||
.navbar li {
|
||||
float: none;
|
||||
font-size: 15px;
|
||||
margin: 6px;
|
||||
}
|
||||
.navbar li a {
|
||||
padding: 10px 16px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.navbar a {
|
||||
/* If a menu item's text is too long, truncate it */
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
html {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.box-shadow {
|
||||
box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import React from 'react';
|
||||
import { Collapse, Nav, Navbar, NavbarBrand, NavbarToggler, NavItem, NavLink } from 'reactstrap';
|
||||
import { Collapse, Container, Navbar, NavbarBrand, NavbarToggler, NavItem, NavLink } from 'reactstrap';
|
||||
import './NavMenu.css';
|
||||
|
||||
export default class NavMenu extends React.Component {
|
||||
|
|
@ -8,7 +8,7 @@ export default class NavMenu extends React.Component {
|
|||
|
||||
this.toggle = this.toggle.bind(this);
|
||||
this.state = {
|
||||
isOpen: true
|
||||
isOpen: false
|
||||
};
|
||||
}
|
||||
toggle() {
|
||||
|
|
@ -18,23 +18,27 @@ export default class NavMenu extends React.Component {
|
|||
}
|
||||
render() {
|
||||
return (
|
||||
<Navbar fixed="top" className="navbar-fixed-top navbar-dark" expand color="dark" >
|
||||
<NavbarBrand href="/">Company.WebApplication1</NavbarBrand>
|
||||
<NavbarToggler onClick={this.toggle} className="mr-2" />
|
||||
<Collapse isOpen={this.state.isOpen} navbar>
|
||||
<Nav className="ml-auto" navbar>
|
||||
<NavItem>
|
||||
<NavLink href="/">Home</NavLink>
|
||||
</NavItem>
|
||||
<NavItem>
|
||||
<NavLink href="/counter">Counter</NavLink>
|
||||
</NavItem>
|
||||
<NavItem>
|
||||
<NavLink href="/fetch-data">Fetch data</NavLink>
|
||||
</NavItem>
|
||||
</Nav>
|
||||
</Collapse>
|
||||
</Navbar >
|
||||
<header>
|
||||
<Navbar className="navbar-expand-sm navbar-toggleable-sm border-bottom box-shadow mb-3" light >
|
||||
<Container>
|
||||
<NavbarBrand href="/">Company.WebApplication1</NavbarBrand>
|
||||
<NavbarToggler onClick={this.toggle} className="mr-2" />
|
||||
<Collapse className="d-sm-inline-flex flex-sm-row-reverse" isOpen={this.state.isOpen} navbar>
|
||||
<ul className="navbar-nav flex-grow">
|
||||
<NavItem>
|
||||
<NavLink className="text-dark" href="/">Home</NavLink>
|
||||
</NavItem>
|
||||
<NavItem>
|
||||
<NavLink className="text-dark" href="/counter">Counter</NavLink>
|
||||
</NavItem>
|
||||
<NavItem>
|
||||
<NavLink className="text-dark" href="/fetch-data">Fetch data</NavLink>
|
||||
</NavItem>
|
||||
</ul>
|
||||
</Collapse>
|
||||
</Container>
|
||||
</Navbar>
|
||||
</header>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
@media (max-width: 767px) {
|
||||
/* On small screens, the nav menu spans the full width of the screen. Leave a space for it. */
|
||||
body {
|
||||
padding-top: 50px;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
import 'bootstrap/dist/css/bootstrap.css';
|
||||
import './index.css';
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import { Provider } from 'react-redux';
|
||||
|
|
|
|||
|
|
@ -411,6 +411,20 @@
|
|||
"AuthOption": "MultiOrg"
|
||||
}
|
||||
},
|
||||
"web": {
|
||||
"None": {
|
||||
"Template": "web",
|
||||
"Arguments": "new web",
|
||||
"Files": [
|
||||
"appsettings.Development.json",
|
||||
"appsettings.json",
|
||||
"Program.cs",
|
||||
"Startup.cs",
|
||||
"Properties/launchSettings.json"
|
||||
],
|
||||
"AuthOption": "None"
|
||||
}
|
||||
},
|
||||
"webapi": {
|
||||
"IndividualB2C": {
|
||||
"Template": "webapi",
|
||||
|
|
|
|||
Loading…
Reference in New Issue