aspnet-core-starter directory structureASP.NET Core project is integrated with Webpack and Gulp (see available tasks):
All .scss files within wwwroot/ directory
are processed by node-sass. Output files will have the next
filename format: {filename}.dist.css. Example:
wwwroot/css/site.scss
body {
background: #fff;
}
AspnetCoreStarter/Pages/Layouts/_Application.cshtml
<environment include="Development"><link rel="stylesheet" href="~/css/site.dist.css" /></environment>
<environment exclude="Development"><link rel="stylesheet" href="~/css/site.dist.css" asp-append-version="true" /></environment>
All .js files within wwwroot/ directory
are processed by Webpack. Output files will have the next
filename format: {filename}.dist.js. Example:
wwwroot/js/site.js
$(() => {
alert('Content loaded!')
})
AspnetCoreStarter/Pages/Layouts/_Application.cshtml
<environment include="Development"><script src="~/js/site.dist.js"></script></environment>
<environment exclude="Development"><script src="~/js/site.dist.js" asp-append-version="true"></script></environment>
_ prefix to the file name. For example,
_partial.scss, _partial.js
The starter project by default includes all third-party plugins.
Optionally you can remove unwanted plugins to reduce output assets size and compile time:
dependencies section in the AspnetCoreStarter/package.json file.AspnetCoreStarter/wwwroot/vendor/libs directory.@imports and @includes in the AspnetCoreStarter/wwwroot/vendor/css/_theme/_libs.scss file.For example, if you want to exclude plyr plugin, you will need to:
plyr dependency in the AspnetCoreStarter/package.json file.AspnetCoreStarter/wwwroot/vendor/libs/plyr directory.@import "../../libs/plyr/mixins"; and @include plyr-theme($background, $color);
lines in the AspnetCoreStarter/wwwroot/vendor/css/_theme/_libs.scss file.
cmd.exe as an administrator and run command npm install --add-python-to-path='true' --global --production windows-build-tools.If you're using Visual Studio:
Make your Node.js install prioritized. You can do it in two ways:
Tools -> Options -> Projects and solutions -> Web Package Management. Move $(PATH) string to the top of the list using the arrows.Tools -> Options -> Projects and solutions -> Web Package Management. Click Add button and paste path to node.exe directory. Then move added path to the top of the list using the arrows.package.json and select Restore Packages. Wait while packages restored.View -> Other Windows -> Task Runner Explorer.watch task. After installing this task will be executed automatically after the project opened.Build -> Build AspnetCoreStarter.If you're using Visual Studio Code:
C# and npm VS Code extensions.AspnetCoreStarter folder in editor and wait while dependencies installed.package.json and select Install Dependencies.Ctrl + Shift + p and select Tasks: Run Task -> Build.Ctrl + Shift + p and select npm: Run Script -> watch.sudo apt-get update && sudo apt-get upgrade.sudo apt-get install curl.sudo npm i -g gulp.C# and npm VS Code extensions.AspnetCoreStarter folder in editor and wait while dependencies installed.package.json and select Install Dependencies.Ctrl + Shift + p and select Tasks: Run Task -> Build.Ctrl + Shift + p and select npm: Run Script -> watch.sudo npm i -g gulp.C# and npm VS Code extensions.AspnetCoreStarter folder in editor and wait while dependencies installed.package.json and select Install Dependencies.Cmd + Shift + p and select Tasks: Run Task -> Build.Cmd + Shift + p and select npm: Run Script -> watch.Main layoutAspnetCoreStarter/Pages/Layouts/_Application.cshtml
<!DOCTYPE html>
<html lang="en" class="light-style">
<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="IE=edge,chrome=1" />
<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" />
<title>@ViewData["Title"] - Asp.Net Core Starter</title>
<!-- Main font -->
<link href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,500,500i,700,700i,900" rel="stylesheet" crossorigin="anonymous" />
<!-- Icons. Uncomment required icon fonts -->
<environment include="Development">
<!-- <link rel="stylesheet" href="~/vendor/fonts/fontawesome.dist.css" /> -->
<link rel="stylesheet" href="~/vendor/fonts/ionicons.dist.css" />
<!-- <link rel="stylesheet" href="~/vendor/fonts/linearicons.dist.css" /> -->
<!-- <link rel="stylesheet" href="~/vendor/fonts/open-iconic.dist.css" /> -->
<!-- <link rel="stylesheet" href="~/vendor/fonts/pe-icon-7-stroke.dist.css" /> -->
</environment>
<environment exclude="Development">
<!-- <link rel="stylesheet" href="~/vendor/fonts/fontawesome.dist.css" asp-append-version="true" /> -->
<link rel="stylesheet" href="~/vendor/fonts/ionicons.dist.css" asp-append-version="true" />
<!-- <link rel="stylesheet" href="~/vendor/fonts/linearicons.dist.css" asp-append-version="true" /> -->
<!-- <link rel="stylesheet" href="~/vendor/fonts/open-iconic.dist.css" asp-append-version="true" /> -->
<!-- <link rel="stylesheet" href="~/vendor/fonts/pe-icon-7-stroke.dist.css" asp-append-version="true" /> -->
</environment>
<!-- Core stylesheets -->
<environment include="Development">
<link rel="stylesheet" href="~/vendor/css/bootstrap.dist.css" />
<link rel="stylesheet" href="~/vendor/css/appwork.dist.css" />
<link rel="stylesheet" href="~/vendor/css/theme-corporate.dist.css" />
<link rel="stylesheet" href="~/vendor/css/colors.dist.css" />
<link rel="stylesheet" href="~/vendor/css/uikit.dist.css" />
</environment>
<environment exclude="Development">
<link rel="stylesheet" href="~/vendor/css/bootstrap.dist.css" asp-append-version="true" />
<link rel="stylesheet" href="~/vendor/css/appwork.dist.css" asp-append-version="true" />
<link rel="stylesheet" href="~/vendor/css/theme-corporate.dist.css" asp-append-version="true" />
<link rel="stylesheet" href="~/vendor/css/colors.dist.css" asp-append-version="true" />
<link rel="stylesheet" href="~/vendor/css/uikit.dist.css" asp-append-version="true" />
</environment>
<!-- Load polyfills -->
<environment include="Development"><script src="~/vendor/js/polyfills.dist.js"></script></environment>
<environment exclude="Development"><script src="~/vendor/js/polyfills.dist.js" asp-append-version="true"></script></environment>
<script>document['documentMode']===10&&document.write('<script src="https://polyfill.io/v3/polyfill.min.js?features=Intl.~locale.en"><\/script>')</script>
<!-- Layout helpers -->
<environment include="Development"><script src="~/vendor/js/layout-helpers.dist.js"></script></environment>
<environment exclude="Development"><script src="~/vendor/js/layout-helpers.dist.js" asp-append-version="true"></script></environment>
<!-- Libs -->
<!-- `perfect-scrollbar` library required by SideNav plugin -->
<environment include="Development"><link rel="stylesheet" href="~/vendor/libs/perfect-scrollbar/perfect-scrollbar.dist.css" /></environment>
<environment exclude="Development"><link rel="stylesheet" href="~/vendor/libs/perfect-scrollbar/perfect-scrollbar.dist.css" asp-append-version="true" /></environment>
<!-- Application stylesheets -->
<environment include="Development"><link rel="stylesheet" href="~/css/site.dist.css" /></environment>
<environment exclude="Development"><link rel="stylesheet" href="~/css/site.dist.css" asp-append-version="true" /></environment>
@RenderSection("Styles", required: false)
</head>
<body>
@RenderBody()
<!-- Core scripts -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js" crossorigin="anonymous"></script>
<!-- Uncomment the following line to enable unobtrusive validation -->
<!-- @await Html.PartialAsync("Shared/_ValidationScriptsPartial") -->
<environment include="Development">
<script src="~/vendor/libs/popper/popper.dist.js"></script>
<script src="~/vendor/js/bootstrap.dist.js"></script>
<script src="~/vendor/js/sidenav.dist.js"></script>
<!-- Libs -->
<!-- `perfect-scrollbar` library required by SideNav plugin -->
<script src="~/vendor/libs/perfect-scrollbar/perfect-scrollbar.dist.js"></script>
<!-- Application javascripts -->
<script src="~/js/site.dist.js"></script>
</environment>
<environment exclude="Development">
<script src="~/vendor/libs/popper/popper.dist.js" asp-append-version="true"></script>
<script src="~/vendor/js/bootstrap.dist.js" asp-append-version="true"></script>
<script src="~/vendor/js/sidenav.dist.js" asp-append-version="true"></script>
<!-- Libs -->
<!-- `perfect-scrollbar` library required by SideNav plugin -->
<script src="~/vendor/libs/perfect-scrollbar/perfect-scrollbar.dist.js" asp-append-version="true"></script>
<!-- Application javascripts -->
<script src="~/js/site.dist.js" asp-append-version="true"></script>
</environment>
@RenderSection("Scripts", required: false)
</body>
</html>
<!DOCTYPE html>
<html lang="en" class="light-style">
<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="IE=edge,chrome=1" />
<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" />
<title>@ViewData["Title"] - Asp.Net Core Starter</title>
<!-- Main font -->
<link href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,500,500i,700,700i,900" rel="stylesheet" crossorigin="anonymous" />
<!-- Icons. Uncomment required icon fonts -->
<environment include="Development">
<!-- <link rel="stylesheet" href="~/vendor/fonts/fontawesome.dist.css" /> -->
<link rel="stylesheet" href="~/vendor/fonts/ionicons.dist.css" />
<!-- <link rel="stylesheet" href="~/vendor/fonts/linearicons.dist.css" /> -->
<!-- <link rel="stylesheet" href="~/vendor/fonts/open-iconic.dist.css" /> -->
<!-- <link rel="stylesheet" href="~/vendor/fonts/pe-icon-7-stroke.dist.css" /> -->
</environment>
<environment exclude="Development">
<!-- <link rel="stylesheet" href="~/vendor/fonts/fontawesome.dist.css" asp-append-version="true" /> -->
<link rel="stylesheet" href="~/vendor/fonts/ionicons.dist.css" asp-append-version="true" />
<!-- <link rel="stylesheet" href="~/vendor/fonts/linearicons.dist.css" asp-append-version="true" /> -->
<!-- <link rel="stylesheet" href="~/vendor/fonts/open-iconic.dist.css" asp-append-version="true" /> -->
<!-- <link rel="stylesheet" href="~/vendor/fonts/pe-icon-7-stroke.dist.css" asp-append-version="true" /> -->
</environment>
<!-- Core stylesheets -->
<environment include="Development">
<link rel="stylesheet" href="~/vendor/css/bootstrap.dist.css" class="theme-settings-bootstrap-css" />
<link rel="stylesheet" href="~/vendor/css/appwork.dist.css" class="theme-settings-appwork-css" />
<link rel="stylesheet" href="~/vendor/css/theme-corporate.dist.css" class="theme-settings-theme-css" />
<link rel="stylesheet" href="~/vendor/css/colors.dist.css" class="theme-settings-colors-css" />
<link rel="stylesheet" href="~/vendor/css/uikit.dist.css" />
</environment>
<environment exclude="Development">
<link rel="stylesheet" href="~/vendor/css/bootstrap.dist.css" class="theme-settings-bootstrap-css" />
<link rel="stylesheet" href="~/vendor/css/appwork.dist.css" class="theme-settings-appwork-css" />
<link rel="stylesheet" href="~/vendor/css/theme-corporate.dist.css" class="theme-settings-theme-css" />
<link rel="stylesheet" href="~/vendor/css/colors.dist.css" class="theme-settings-colors-css" />
<link rel="stylesheet" href="~/vendor/css/uikit.dist.css" asp-append-version="true" />
</environment>
<!-- Load polyfills -->
<environment include="Development"><script src="~/vendor/js/polyfills.dist.js"></script></environment>
<environment exclude="Development"><script src="~/vendor/js/polyfills.dist.js" asp-append-version="true"></script></environment>
<script>document['documentMode']===10&&document.write('<script src="https://polyfill.io/v3/polyfill.min.js?features=Intl.~locale.en"><\/script>')</script>
<!-- Layout helpers -->
<environment include="Development"><script src="~/vendor/js/layout-helpers.dist.js"></script></environment>
<environment exclude="Development"><script src="~/vendor/js/layout-helpers.dist.js" asp-append-version="true"></script></environment>
<!-- Theme settings -->
<environment include="Development"><script src="~/vendor/js/theme-settings.dist.js"></script></environment>
<environment exclude="Development"><script src="~/vendor/js/theme-settings.dist.js" asp-append-version="true"></script></environment>
<script>
// Use settings panel generator to configure the plugin
window.themeSettings = new ThemeSettings({
cssPath: '',
themesPath: '',
pathResolver: function (path) {
var resolvedPaths = {
@foreach (string name in new string[] { "bootstrap", "appwork", "colors" })
{
<text>
'@(name).css': '@Url.Content("~/vendor/css/" + name + ".dist.css")',
'@(name)-material.css': '@Url.Content("~/vendor/css/" + name + "-material.dist.css")',
'@(name)-dark.css': '@Url.Content("~/vendor/css/" + name + "-dark.dist.css")',
</text>
}
// UI Kit
'uikit.css': '@Url.Content("~/vendor/css/uikit.dist.css"))',
@foreach (string name in new string[] { "air", "corporate", "cotton", "gradient", "paper", "shadow", "soft", "sunrise", "twitlight", "vibrant" })
{
<text>
'theme-@(name).css': '@Url.Content("~/vendor/css/theme-" + name + ".dist.css")',
'theme-@(name)-material.css': '@Url.Content("~/vendor/css/theme-" + name + "-material.dist.css")',
'theme-@(name)-dark.css': '@Url.Content("~/vendor/css/theme-" + name + "-dark.dist.css")',
</text>
}
};
return resolvedPaths[path] || path;
}
});
</script>
<!-- Libs -->
<!-- `perfect-scrollbar` library required by SideNav plugin -->
<environment include="Development"><link rel="stylesheet" href="~/vendor/libs/perfect-scrollbar/perfect-scrollbar.dist.css" /></environment>
<environment exclude="Development"><link rel="stylesheet" href="~/vendor/libs/perfect-scrollbar/perfect-scrollbar.dist.css" asp-append-version="true" /></environment>
<!-- Application stylesheets -->
<environment include="Development"><link rel="stylesheet" href="~/css/site.dist.css" /></environment>
<environment exclude="Development"><link rel="stylesheet" href="~/css/site.dist.css" asp-append-version="true" /></environment>
@RenderSection("Styles", required: false)
</head>
<body>
@RenderBody()
<!-- Core scripts -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js" crossorigin="anonymous"></script>
<!-- Uncomment the following line to enable unobtrusive validation -->
<!-- @await Html.PartialAsync("Shared/_ValidationScriptsPartial") -->
<environment include="Development">
<script src="~/vendor/libs/popper/popper.dist.js"></script>
<script src="~/vendor/js/bootstrap.dist.js"></script>
<script src="~/vendor/js/sidenav.dist.js"></script>
<!-- Libs -->
<!-- `perfect-scrollbar` library required by SideNav plugin -->
<script src="~/vendor/libs/perfect-scrollbar/perfect-scrollbar.dist.js"></script>
<!-- Application javascripts -->
<script src="~/js/site.dist.js"></script>
</environment>
<environment exclude="Development">
<script src="~/vendor/libs/popper/popper.dist.js" asp-append-version="true"></script>
<script src="~/vendor/js/bootstrap.dist.js" asp-append-version="true"></script>
<script src="~/vendor/js/sidenav.dist.js" asp-append-version="true"></script>
<!-- Libs -->
<!-- `perfect-scrollbar` library required by SideNav plugin -->
<script src="~/vendor/libs/perfect-scrollbar/perfect-scrollbar.dist.js" asp-append-version="true"></script>
<!-- Application javascripts -->
<script src="~/js/site.dist.js" asp-append-version="true"></script>
</environment>
@RenderSection("Scripts", required: false)
</body>
</html>
You can set the layout in two ways:
layout property in the AspnetCoreStarter/Pages/_ViewStart.cshtml file.layout property in the view's .cshtml file.
You can find navbar, sidenav and footer templates in the AspnetCoreStarter/Pages/Layouts/Partials directory.
AspnetCoreStarter/Pages/_ViewStart.cshtml
@{
Layout = "Layouts/_Layout1";
}
AspnetCoreStarter/Pages/_ViewStart.cshtml
@{
Layout = "Layouts/_Layout1Flex";
}
AspnetCoreStarter/Pages/_ViewStart.cshtml
@{
Layout = "Layouts/_Layout2";
}
AspnetCoreStarter/Pages/_ViewStart.cshtml
@{
Layout = "Layouts/_Layout2Flex";
}
AspnetCoreStarter/Pages/_ViewStart.cshtml
@{
Layout = "Layouts/_LayoutBlank";
}
To enable a theme just include the required theme stylesheet from the ~/vendor/css/ path.
AspnetCoreStarter/Pages/Layouts/_Application.cshtml
<!-- Core stylesheets -->
<environment include="Development">
...
<link rel="stylesheet" href="~/vendor/css/theme-air.dist.css" />
...
</environment>
<environment exclude="Development">
...
<link rel="stylesheet" href="~/vendor/css/theme-air.dist.css" asp-append-version="true" />
...
</environment>
<!-- Core stylesheets -->
<environment include="Development">
...
<link rel="stylesheet" href="~/vendor/css/theme-air.dist.css" class="theme-settings-theme-css" />
...
</environment>
<environment exclude="Development">
...
<link rel="stylesheet" href="~/vendor/css/theme-air.dist.css" class="theme-settings-theme-css" />
...
</environment>
To enable material styling you need to:
Set $enable-material-style variable to true.
AspnetCoreStarter/wwwroot/vendor/css/_custom-variables/_features.scss
...
$enable-material-style: true;
...
Set material-style class on the <html> element instead of light-style.
AspnetCoreStarter/Pages/Layouts/_Application.cshtml
<html class="material-style">
Add -material suffix to bootstrap.dist.css, appwork.dist.css, theme-*.dist.css and colors.dist.css stylesheets.
AspnetCoreStarter/Pages/Layouts/_Application.cshtml
<!-- Core stylesheets -->
<environment include="Development">
<link rel="stylesheet" href="~/vendor/css/bootstrap-material.dist.css" />
<link rel="stylesheet" href="~/vendor/css/appwork-material.dist.css" />
<link rel="stylesheet" href="~/vendor/css/theme-corporate-material.dist.css" />
<link rel="stylesheet" href="~/vendor/css/colors-material.dist.css" />
...
</environment>
<environment exclude="Development">
<link rel="stylesheet" href="~/vendor/css/bootstrap-material.dist.css" asp-append-version="true" />
<link rel="stylesheet" href="~/vendor/css/appwork-material.dist.css" asp-append-version="true" />
<link rel="stylesheet" href="~/vendor/css/theme-corporate-material.dist.css" asp-append-version="true" />
<link rel="stylesheet" href="~/vendor/css/colors-material.dist.css" asp-append-version="true" />
...
</environment>
<!-- Core stylesheets -->
<environment include="Development">
<link rel="stylesheet" href="~/vendor/css/bootstrap-material.dist.css" class="theme-settings-bootstrap-css" />
<link rel="stylesheet" href="~/vendor/css/appwork-material.dist.css" class="theme-settings-appwork-css" />
<link rel="stylesheet" href="~/vendor/css/theme-corporate-material.dist.css" class="theme-settings-theme-css" />
<link rel="stylesheet" href="~/vendor/css/colors-material.dist.css" class="theme-settings-colors-css" />
...
</environment>
<environment exclude="Development">
<link rel="stylesheet" href="~/vendor/css/bootstrap-material.dist.css" class="theme-settings-bootstrap-css" />
<link rel="stylesheet" href="~/vendor/css/appwork-material.dist.css" class="theme-settings-appwork-css" />
<link rel="stylesheet" href="~/vendor/css/theme-corporate-material.dist.css" class="theme-settings-theme-css" />
<link rel="stylesheet" href="~/vendor/css/colors-material.dist.css" class="theme-settings-colors-css" />
...
</environment>
Optionally you can enable material ripple. Just append material-ripple.js
script to the <head> section and call attachMaterialRippleOnLoad() function.
AspnetCoreStarter/Pages/Layouts/_Application.cshtml
<environment include="Development"><script src="~/vendor/js/material-ripple.dist.js"></script></environment>
<environment exclude="Development"><script src="~/vendor/js/material-ripple.dist.js" asp-append-version="true"></script></environment>
<script>
window.attachMaterialRippleOnLoad();
</script>
Optionally you can enable material ripple. Just append material-ripple.dist.js
script to the <head> section.
AspnetCoreStarter/Pages/Layouts/_Application.cshtml
<environment include="Development"><script src="~/vendor/js/material-ripple.dist.js"></script></environment>
<environment exclude="Development"><script src="~/vendor/js/material-ripple.dist.js" asp-append-version="true"></script></environment>
To enable dark styling you need to:
Set $enable-dark-style variable to true.
AspnetCoreStarter/wwwroot/vendor/css/_custom-variables/_features.scss
...
$enable-dark-style: true;
...
Set dark-style class on the <html> element instead of light-style.
AspnetCoreStarter/Pages/Layouts/_Application.cshtml
<html class="dark-style">
Add -dark suffix to bootstrap.dist.css, appwork.dist.css, theme-*.dist.css and colors.dist.css stylesheets.
AspnetCoreStarter/Pages/Layouts/_Application.cshtml
<!-- Core stylesheets -->
<environment include="Development">
<link rel="stylesheet" href="~/vendor/css/bootstrap-dark.dist.css" />
<link rel="stylesheet" href="~/vendor/css/appwork-dark.dist.css" />
<link rel="stylesheet" href="~/vendor/css/theme-corporate-dark.dist.css" />
<link rel="stylesheet" href="~/vendor/css/colors-dark.dist.css" />
...
</environment>
<environment exclude="Development">
<link rel="stylesheet" href="~/vendor/css/bootstrap-dark.dist.css" asp-append-version="true" />
<link rel="stylesheet" href="~/vendor/css/appwork-dark.dist.css" asp-append-version="true" />
<link rel="stylesheet" href="~/vendor/css/theme-corporate-dark.dist.css" asp-append-version="true" />
<link rel="stylesheet" href="~/vendor/css/colors-dark.dist.css" asp-append-version="true" />
...
</environment>
<!-- Core stylesheets -->
<environment include="Development">
<link rel="stylesheet" href="~/vendor/css/bootstrap-dark.dist.css" class="theme-settings-bootstrap-css" />
<link rel="stylesheet" href="~/vendor/css/appwork-dark.dist.css" class="theme-settings-appwork-css" />
<link rel="stylesheet" href="~/vendor/css/theme-corporate-dark.dist.css" class="theme-settings-theme-css" />
<link rel="stylesheet" href="~/vendor/css/colors-dark.dist.css" class="theme-settings-colors-css" />
...
</environment>
<environment exclude="Development">
<link rel="stylesheet" href="~/vendor/css/bootstrap-dark.dist.css" class="theme-settings-bootstrap-css" />
<link rel="stylesheet" href="~/vendor/css/appwork-dark.dist.css" class="theme-settings-appwork-css" />
<link rel="stylesheet" href="~/vendor/css/theme-corporate-dark.dist.css" class="theme-settings-theme-css" />
<link rel="stylesheet" href="~/vendor/css/colors-dark.dist.css" class="theme-settings-colors-css" />
...
</environment>
To enable RTL direction support, first of all, you need to set $enable-rtl-support variable to true.
AspnetCoreStarter/wwwroot/vendor/css/_custom-variables/_features.scss
$enable-rtl-support: true;
...
Then load Appwork's stylesheets from the ~/vendor/css/rtl/ path instead of ~/vendor/css/.
AspnetCoreStarter/Pages/Layouts/_Application.cshtml
<!-- Core stylesheets -->
<environment include="Development">
<link rel="stylesheet" href="~/vendor/css/rtl/bootstrap.dist.css" />
<link rel="stylesheet" href="~/vendor/css/rtl/appwork.dist.css" />
<link rel="stylesheet" href="~/vendor/css/rtl/theme-corporate.dist.css" />
<link rel="stylesheet" href="~/vendor/css/rtl/colors.dist.css" />
<link rel="stylesheet" href="~/vendor/css/rtl/uikit.dist.css" />
</environment>
<environment exclude="Development">
<link rel="stylesheet" href="~/vendor/css/rtl/bootstrap.dist.css" asp-append-version="true" />
<link rel="stylesheet" href="~/vendor/css/rtl/appwork.dist.css" asp-append-version="true" />
<link rel="stylesheet" href="~/vendor/css/rtl/theme-corporate.dist.css" asp-append-version="true" />
<link rel="stylesheet" href="~/vendor/css/rtl/colors.dist.css" asp-append-version="true" />
<link rel="stylesheet" href="~/vendor/css/rtl/uikit.dist.css" asp-append-version="true" />
</environment>
<!-- Core stylesheets -->
<environment include="Development">
<link rel="stylesheet" href="~/vendor/css/rtl/bootstrap.dist.css" class="theme-settings-bootstrap-css" />
<link rel="stylesheet" href="~/vendor/css/rtl/appwork.dist.css" class="theme-settings-appwork-css" />
<link rel="stylesheet" href="~/vendor/css/rtl/theme-corporate.dist.css" class="theme-settings-theme-css" />
<link rel="stylesheet" href="~/vendor/css/rtl/colors.dist.css" class="theme-settings-colors-css" />
<link rel="stylesheet" href="~/vendor/css/rtl/uikit.dist.css" />
</environment>
<environment exclude="Development">
<link rel="stylesheet" href="~/vendor/css/rtl/bootstrap.dist.css" class="theme-settings-bootstrap-css" />
<link rel="stylesheet" href="~/vendor/css/rtl/appwork.dist.css" class="theme-settings-appwork-css" />
<link rel="stylesheet" href="~/vendor/css/rtl/theme-corporate.dist.css" class="theme-settings-theme-css" />
<link rel="stylesheet" href="~/vendor/css/rtl/colors.dist.css" class="theme-settings-colors-css" />
<link rel="stylesheet" href="~/vendor/css/rtl/uikit.dist.css" asp-append-version="true" />
</environment>
To enable RTL direction, add dir="rtl" attribute to the <html> element.
AspnetCoreStarter/Pages/Layouts/_Application.cshtml
<html dir="rtl">
You can configure the initial layout by setting control classes to the <html> element.
AspnetCoreStarter/Pages/Layouts/_Application.cshtml
<html class="layout-fixed layout-collapsed">
| Control class | Description |
|---|---|
.layout-reversed |
Reverse layout direction without markup change. |
.layout-expanded |
Expand layout sidenav on small screens (< 992px). |
.layout-collapsed |
Collapse layout sidenav on large screens (>= 992px). |
.layout-offcanvas |
Make layout sidenav offcanvas. |
.layout-fixed |
Set layout position to fixed. |
.layout-fixed-offcanvas |
Set layout position to fixed with offcanvas sidenav. |
.layout-navbar-fixed |
Set layout navbar position to fixed. |
.layout-footer-fixed |
Set layout footer position to fixed. |
Optionally you can enable PACE.js progress bar:
Append pace.js script to the <head> section.
AspnetCoreStarter/Pages/Layouts/_Application.cshtml
<environment include="Development"><script src="~/vendor/js/pace.dist.js"></script></environment>
<environment exclude="Development"><script src="~/vendor/js/pace.dist.js" asp-append-version="true"></script></environment>
Append .page-loader element to the <body>.
AspnetCoreStarter/Pages/Layouts/_Application.cshtml
<div class="page-loader"><div class="bg-primary"></div></div>
Use starter template generator to simplify the initial setup. Just replace a content of appropriate files with the generated code within the aspnet-core-starter directory.
If you're using Visual Studio, then you can run tasks
in the Task Runner Explorer window: View -> Other Windows -> Task Runner Explorer.
If you're using Visual Studio Code, then you can run tasks
using command: npm: Run Script.
| Task | Description |
|---|---|
build |
Compile assets. |
build:js |
Compile .js files within the AspnetCoreStarter/wwwroot directory. |
build:css |
Compile .scss files within the AspnetCoreStarter/wwwroot directory. |
build:prod |
Compile assets in production mode with minification. |
build:prod:js |
Compile .js files within the AspnetCoreStarter/wwwroot directory in production mode with minification. |
build:prod:css |
Compile .scss files within the AspnetCoreStarter/wwwroot directory in production mode with minification. |
watch |
Watch files for changes and automatically recompile when changed. |
Build process is too slow
By default, assets compilation is performed before each build of the project. To disable this behaviour open *.csproj file and remove the following lines:
<Target Name="DebugPreCompileTarget" BeforeTargets="Build" Condition="'$(Configuration)'!='Release'">
<Exec Command="npm run build" />
</Target>
Upgrade .NET Core to .Net 5:
Official upgrade guide: https://docs.microsoft.com/en-us/aspnet/core/migration/31-to-50?view=aspnetcore-5.0&tabs=visual-studio
Upgrade Node.js to the latest LTS release (https://nodejs.org/en/)
_CookieConsentPartial.cshtml is removed:
Pages/Shared/_CookieConsentPartial.cshtml
Remove the next files and directories:
wwwroot/vendor/libs/vegas/
Since some extensions were removed from the bootstrap-table package, remove wwwroot/vendor/libs/bootstrap-table/ directory
and copy new appwork-v1_6_0/aspnet-core-starter/AspnetCoreStarter/wwwroot/vendor/libs/bootstrap-table/
Copy with replace all SCSS files within wwwroot/vendor/css/ and wwwroot/vendor/css/rtl/ directories:
wwwroot/vendor/css/*.scss wwwroot/vendor/css/rtl/*.scss
Copy with replace changed files and directories:
wwwroot/vendor/fonts/ wwwroot/vendor/css/_appwork/ wwwroot/vendor/css/_uikit/ wwwroot/vendor/libs/blueimp-gallery/ wwwroot/vendor/libs/bootstrap-slider/ wwwroot/vendor/libs/dropzone/ wwwroot/vendor/libs/fullcalendar/ wwwroot/vendor/libs/nouislider/ wwwroot/vendor/libs/minicolors/ wwwroot/vendor/libs/photoswipe/ wwwroot/vendor/libs/plyr/ wwwroot/vendor/libs/select2/ wwwroot/vendor/libs/smartwizard/ wwwroot/vendor/libs/sortablejs/ wwwroot/vendor/libs/swiper/ wwwroot/vendor/libs/timepicker/ wwwroot/vendor/libs/typeahead-js/
Update:
appsettings.Development.json. Diff
{PROJECT_NAME}.csproj. Diff
package.json. Diff
Startup.cs. Diff
Pages/Error.cshtml. Diff
Pages/Error.cshtml.cs. Diff
Properties/launchSettings.json. Diff
Reload the project and restore NuGet packages.
Remove node_modules directory and package-lock.json. Then restore NPM packages.
Rebuild assets:
Task Runner Explorer → Double click on "build" taskCtrl/Cmd + Shift + P → Tasks: Run task → gulp: buildRebuild the project
Changes in third-party components:
vegas plugin was excluded from the package.
fullcalendar changed its API and configuration object:
Before
var eventList = [{
...
className: 'fc-event-warning'
}, {
...
rendering: 'background'
}];
new Calendar($('#id')[0], {
...
defaultDate: ...,
eventLimit: ...,
defaultView: '...',
dir: 'rtl',
header: {
...
left: '...',
right: '...'
},
views: {
dayGrid: {
eventLimit: ...
}
},
});
After
var eventList = [{
...
classNames: 'fc-event-warning'
}, {
...
display: 'background'
}];
new Calendar($('#id')[0], {
...
initialDate: ...,
dayMaxEventRows: ...,
initialView: '...',
direction: 'rtl',
headerToolbar: {
...
start: '...',
end: '...'
},
views: {
dayGrid: {
dayMaxEventRows: ...
}
},
});
For more info see https://fullcalendar.io/docs/upgrading-from-v4
dropzone configuration is changed.
Before
$('#id').dropzone();
After
var previewTemplate =
'<div class="dz-preview dz-file-preview">' +
' <div class="dz-details">' +
' <div class="dz-thumbnail">' +
' <img data-dz-thumbnail>' +
' <span class="dz-nopreview">No preview</span>' +
' <div class="dz-success-mark"></div>' +
' <div class="dz-error-mark"></div>' +
' <div class="dz-error-message"><span data-dz-errormessage></span></div>' +
' <div class="progress"><div class="progress-bar progress-bar-primary" role="progressbar" aria-valuemin="0" aria-valuemax="100" data-dz-uploadprogress></div></div>' +
' </div>' +
' <div class="dz-filename" data-dz-name></div>' +
' <div class="dz-size" data-dz-size></div>' +
' </div>' +
'</div>';
$('#id').dropzone({
previewTemplate: previewTemplate
});
smartwizard markup and API are changed.
Before
<ul>
<li><a href="#" class="mb-3">...</a></li>
...
</ul>
<div class="mb-3">
<div id="smartwizard-1-step-1" class="card animated fadeIn">
...
</div>
</div>
After
<ul class="nav">
<li><a href="#" class="nav-link mb-3">...</a></li>
...
</ul>
<div class="tab-content mb-3">
<div id="#" class="tab-pane card" role="tabpanel">
...
</div>
</div>
Before
$el.smartWizard({
useURLhash: false,
showStepURLhash: false,
...
})
.on('leaveStep', function(e, anchorObject, stepNumber, stepDirection) {
if (stepDirection === 'forward'){ return $el.valid(); }
return true;
})
.on('showStep', function(e, anchorObject, stepNumber, stepDirection) {
var $btn = $el.find('.btn-finish');
if (stepNumber === 3) {
$btn.removeClass('hidden');
} else {
$btn.addClass('hidden');
}
});
After
$el.smartWizard({
enableURLhash: false,
...
})
.on('leaveStep', function(e, anchorObject, currentStepIndex, nextStepIndex, stepDirection) {
var $finishBtn = $el.find('.btn-finish');
if (stepDirection === 'forward'){
var isValid = $el.valid();
if (!isValid) {
anchorObject.addClass('danger');
} else {
anchorObject.removeClass('danger');
if (nextStepIndex === 3) {
$finishBtn.removeClass('d-none');
}
}
return isValid;
} else {
$finishBtn.addClass('d-none');
}
return true;
})
.find('> .toolbar .btn:not(.btn-primary)').addClass('btn-secondary');
For more info see http://techlaboratory.net/jquery-smartwizard
Copy with replace the next files and directories:
wwwroot/vendor/css/_appwork/_functions.scss wwwroot/vendor/libs/bootstrap-datepicker/ wwwroot/vendor/libs/bootstrap-daterangepicker/ wwwroot/vendor/libs/bootstrap-material-datetimepicker/ wwwroot/vendor/libs/bootstrap-select/ wwwroot/vendor/libs/flatpickr/ wwwroot/vendor/libs/growl/ wwwroot/vendor/libs/plyr/ wwwroot/vendor/libs/select2/ wwwroot/vendor/libs/sweetalert2/ wwwroot/vendor/libs/timepicker/ wwwroot/vendor/libs/typeahead-js/
Copy with replace the next file:
wwwroot/vendor/libs/flatpickr/flatpickr.scss
Upgrade .NET Core to 3.1:
Official upgrade guide: https://docs.microsoft.com/en-us/aspnet/core/migration/30-to-31?view=aspnetcore-3.1&tabs=visual-studio
Upgrade Node.js to the latest LTS release (https://nodejs.org/en/)
Note: Yarn package manager is not reqired anymore.
Remove the next files and directories:
wwwroot/vendor/css/migrate/
Copy new files and directories:
wwwroot/vendor/css/_custom-variables/_appwork-dark.scss wwwroot/vendor/css/_custom-variables/_features.scss
Since some extensions were removed from the bootstrap-table package, remove wwwroot/vendor/libs/bootstrap-table/ directory
and copy new appwork-v1_5_0/aspnet-core-starter/AspnetCoreStarter/wwwroot/vendor/libs/bootstrap-table/
Copy with replace all SCSS files within wwwroot/vendor/css/ and wwwroot/vendor/css/rtl/ directories:
wwwroot/vendor/css/*.scss wwwroot/vendor/css/rtl/*.scss
Copy with replace changed files and directories:
wwwroot/vendor/fonts/fontawesome/ wwwroot/vendor/fonts/fontawesome.dist.css wwwroot/vendor/js/bootstrap.js wwwroot/vendor/js/layout-helpers.js wwwroot/vendor/js/polyfills.js wwwroot/vendor/js/sidenav.js wwwroot/vendor/js/theme-settings.js wwwroot/vendor/js/_theme-settings/ wwwroot/vendor/css/_appwork/ wwwroot/vendor/css/_theme/ wwwroot/vendor/css/_uikit/ wwwroot/vendor/css/pages/ wwwroot/vendor/libs/autosize/ wwwroot/vendor/libs/block-ui/ wwwroot/vendor/libs/blueimp-gallery/ wwwroot/vendor/libs/bootbox/ wwwroot/vendor/libs/bootstrap-datepicker/ wwwroot/vendor/libs/bootstrap-daterangepicker/ wwwroot/vendor/libs/bootstrap-duallistbox/ wwwroot/vendor/libs/bootstrap-markdown/ wwwroot/vendor/libs/bootstrap-material-datetimepicker/ wwwroot/vendor/libs/bootstrap-maxlength/ wwwroot/vendor/libs/bootstrap-menu/ wwwroot/vendor/libs/bootstrap-select/ wwwroot/vendor/libs/bootstrap-slider/ wwwroot/vendor/libs/bootstrap-sortable/ wwwroot/vendor/libs/bootstrap-tagsinput/ wwwroot/vendor/libs/c3/ wwwroot/vendor/libs/chartist/ wwwroot/vendor/libs/chartjs/ wwwroot/vendor/libs/clipboard/ wwwroot/vendor/libs/cropper/ wwwroot/vendor/libs/d3/ wwwroot/vendor/libs/datatables/ wwwroot/vendor/libs/dragula/ wwwroot/vendor/libs/dropzone/ wwwroot/vendor/libs/eve/ wwwroot/vendor/libs/flatpickr/ wwwroot/vendor/libs/flot/ wwwroot/vendor/libs/flow-js/ wwwroot/vendor/libs/fullcalendar/ wwwroot/vendor/libs/gmaps/ wwwroot/vendor/libs/growl/ wwwroot/vendor/libs/jstree/ wwwroot/vendor/libs/knob/ wwwroot/vendor/libs/ladda/ wwwroot/vendor/libs/mapael/ wwwroot/vendor/libs/markdown/ wwwroot/vendor/libs/masonry/ wwwroot/vendor/libs/minicolors/ wwwroot/vendor/libs/moment/ wwwroot/vendor/libs/morris/ wwwroot/vendor/libs/nestable/ wwwroot/vendor/libs/nouislider/ wwwroot/vendor/libs/numeral/ wwwroot/vendor/libs/perfect-scrollbar/ wwwroot/vendor/libs/photoswipe/ wwwroot/vendor/libs/plyr/ wwwroot/vendor/libs/popper/ wwwroot/vendor/libs/pwstrength-bootstrap/ wwwroot/vendor/libs/quill/ wwwroot/vendor/libs/raphael/ wwwroot/vendor/libs/select2/ wwwroot/vendor/libs/shepherd/ wwwroot/vendor/libs/smartwizard/ wwwroot/vendor/libs/sortablejs/ wwwroot/vendor/libs/sparkline/ wwwroot/vendor/libs/spin/ wwwroot/vendor/libs/spinkit/ wwwroot/vendor/libs/sweetalert2/ wwwroot/vendor/libs/swiper/ wwwroot/vendor/libs/tableexport/ wwwroot/vendor/libs/timepicker/ wwwroot/vendor/libs/toastr/ wwwroot/vendor/libs/typeahead-js/ wwwroot/vendor/libs/validate/ wwwroot/vendor/libs/vanilla-text-mask/ wwwroot/vendor/libs/vegas/
Update:
{PROJECT_NAME}.csproj. Diff
Gulpfile.js. Diff
package.json. Diff
webpack.config.js. Diff
wwwroot/vendor/css/_custom-variables/_libs.scss. Diff
wwwroot/vendor/css/_custom-variables/_pages.scss. Diff
wwwroot/vendor/css/_custom-variables/_uikit.scss. Diff
Edit variables in the wwwroot/vendor/css/_custom-variables/_features.scss file according your setup.
| Variable | Feature |
|---|---|
$enable-rtl-support |
Set to true to enable RTL mode support, otherwise set to false. |
$enable-light-style |
Set to true to enable light (previously default) style support, otherwise set to false. |
$enable-material-style |
Set to true to enable material style support, otherwise set to false. |
$enable-dark-style |
Set to true to enable dark style support, otherwise set to false. |
Reload the project and restore NuGet packages.
Remove node_modules directory and then restore NPM packages.
Rebuild assets:
Task Runner Explorer → Double click on "build" taskCtrl/Cmd + Shift + P → Tasks: Run task → gulp: buildRebuild the project
theme-default class is renamed to theme-light.
[Before] Pages/Layouts/_Application.cshtml
<html lang="en" class="default-style">
[After] Pages/Layouts/_Application.cshtml
<html lang="en" class="light-style">
ThemeSettings plugin settings are changed. Use Settings Panel Generator to get updated settings.
ThemeSettings.setMaterial() method is removed.
Added ThemeSettings.setStyle(), ThemeSettings.isLightStyle(), ThemeSettings.isMaterialStyle(), ThemeSettings.isDarkStyle() methods.
See Settings panel docs.
New style-dependent utility classes, which change its color depending on the current active style:
.theme-text-white - White (light or material style) / dark (dark style) text..theme-text-dark - Dark (light or material style) / white (dark style) text..theme-bg-white - White (light or material style) / dark (dark style) background..theme-bg-dark - Dark (light or material style) / white (dark style) background..theme-border-white - White (light or material style) / dark (dark style) border..theme-border-dark - Dark (light or material style) / white (dark style) border.Changes in third-party components:
plyr changed its initialization method:
Before
plyr.setup('#selector', options);
After
new Plyr('#selector', options);
spinkit classes are changed. See https://github.com/tobiasahlin/SpinKit
SweetAlert's type option is renamed to icon.
Before
Swal.fire({
...,
type: 'warning',
});
After
Swal.fire({
...,
icon: 'warning',
});
Upgrade .NET Core to 3.0:
Official upgrade guide: https://docs.microsoft.com/en-us/aspnet/core/migration/22-to-30?view=aspnetcore-3.0&tabs=visual-studio
(Optional) Upgrade Node.js to 10.16 LTS and Yarn
The build process was changed and now all vendor javascript files are built from original sources. All pre-compiled javascript files are removed. Regarding these changes, remove the next directories and copy the corresponding ones from the release:
{PROJECT_NAME}/wwwroot/vendor/js/
{PROJECT_NAME}/wwwroot/vendor/fonts/
{PROJECT_NAME}/wwwroot/vendor/libs/*/
Copy with replace changed files and directories:
AspnetCoreStarter/wwwroot/vendor/css/_appwork/_custom-forms.scss AspnetCoreStarter/wwwroot/vendor/css/_appwork/_dropdown.scss AspnetCoreStarter/wwwroot/vendor/css/_appwork/_forms.scss AspnetCoreStarter/wwwroot/vendor/css/_appwork/_layout.scss AspnetCoreStarter/wwwroot/vendor/css/_appwork/_mixins.scss AspnetCoreStarter/wwwroot/vendor/css/_appwork/_nav.scss AspnetCoreStarter/wwwroot/vendor/css/_appwork/_sidenav.scss AspnetCoreStarter/wwwroot/vendor/css/_appwork/_tables.scss AspnetCoreStarter/wwwroot/vendor/css/_appwork/_utilities.scss
Copy new files:
AspnetCoreStarter/webpack.config.js AspnetCoreStarter/build-config.js
Update:
{PROJECT_NAME}.sln. Diff
{PROJECT_NAME}/{PROJECT_NAME}.csproj. Diff
{PROJECT_NAME}/Program.cs. Diff
{PROJECT_NAME}/Startup.cs. Diff
{PROJECT_NAME}/appsettings.json. Diff
{PROJECT_NAME}/Gulpfile.js. Diff
{PROJECT_NAME}/package.json. Diff
{PROJECT_NAME}/Pages/Layouts/_Application.cshtml. Diff
{PROJECT_NAME}/Pages/Shared/_ValidationScriptsPartial.cshtml. Diff
All *.js and *.scss files within the {PROJECT_NAME}/wwwroot/
directory and its subdirectories are processed by webpack and node-sass now (See Assets compilation).
Regarding this change, edit your asset paths:
<!-- Before -->
<link rel="stylesheet" href="~/vendor/fonts/ionicons.css" />
<link rel="stylesheet" href="~/vendor/css/appwork.css" />
<link rel="stylesheet" href="~/vendor/css/appwork.min.css" asp-append-version="true" />
<link rel="stylesheet" href="~/vendor/libs/perfect-scrollbar/perfect-scrollbar.css" />
<link rel="stylesheet" href="~/vendor/libs/perfect-scrollbar/perfect-scrollbar.min.css" asp-append-version="true" />
<link rel="stylesheet" href="~/css/site.css" />
<link rel="stylesheet" href="~/css/site.min.css" asp-append-version="true" />
<script src="~/vendor/js/layout-helpers.js"></script>
<script src="~/vendor/js/layout-helpers.js" asp-append-version="true"></script>
<script src="~/vendor/libs/perfect-scrollbar/perfect-scrollbar.js"></script>
<script src="~/vendor/libs/perfect-scrollbar/perfect-scrollbar.js" asp-append-version="true"></script>
<script src="~/js/site.es5.js"></script>
<script src="~/js/site.es5.min.js" asp-append-version="true"></script>
<!-- After -->
<link rel="stylesheet" href="~/vendor/fonts/ionicons.dist.css" />
<link rel="stylesheet" href="~/vendor/css/appwork.dist.css" />
<link rel="stylesheet" href="~/vendor/css/appwork.dist.css" asp-append-version="true" />
<link rel="stylesheet" href="~/vendor/libs/perfect-scrollbar/perfect-scrollbar.dist.css" />
<link rel="stylesheet" href="~/vendor/libs/perfect-scrollbar/perfect-scrollbar.dist.css" asp-append-version="true" />
<link rel="stylesheet" href="~/css/site.dist.css" />
<link rel="stylesheet" href="~/css/site.dist.css" asp-append-version="true" />
<script src="~/vendor/js/layout-helpers.dist.js"></script>
<script src="~/vendor/js/layout-helpers.dist.js" asp-append-version="true"></script>
<script src="~/vendor/libs/perfect-scrollbar/perfect-scrollbar.dist.js"></script>
<script src="~/vendor/libs/perfect-scrollbar/perfect-scrollbar.dist.js" asp-append-version="true"></script>
<script src="~/js/site.dist.js"></script>
<script src="~/js/site.dist.js" asp-append-version="true"></script>
Reload project and restore NuGet packages.
Restore/Install Yarn packages.
Rebuild assets:
Task Runner Explorer → Double click on "build" taskCtrl/Cmd + Shift + P → Tasks: Run task → gulp: buildRebuild project
Changes in third-party libraries:
bootstrap-multiselect plugin was removed.bootstrap-sweetalert replaced with original sweetalert2 plugin. API isn't changed.Shepherd.js changed its API. See aspnet-core-demo/AspnetCoreDemo/wwwroot/js/ui_tour.js for
example. https://shepherdjs.dev/docs/tutorial-02-usage.htmlAvailable extensions list of bootstrap-table package is changed (see
aspnet-core-starter/AspnetCoreStarter/wwwroot/vendor/libs/bootstrap-table/extensions):
Added extensions/cell-input Removed extensions/group-by Removed extensions/multi-column-toggle Removed extensions/multiple-search Removed extensions/multiple-selection-row Removed extensions/select2-filter Removed extensions/tree-column
Copy with replace the next directories:
wwwroot/vendor/libs/bootstrap-sortable/ wwwroot/vendor/libs/flot/ wwwroot/vendor/libs/idletimer/
Update:
package.json. Diff
Restore/Install Yarn packages
Rebuild assets
(Optional) Upgrade Node.js to 10.15 LTS and Yarn
Copy new files and directories:
wwwroot/vendor/css/migrate/
Copy with replace all SCSS files within wwwroot/vendor/css/ and wwwroot/vendor/css/rtl/ directories:
wwwroot/vendor/css/*.scss wwwroot/vendor/css/rtl/*.scss
Copy with replace changed files and directories:
wwwroot/vendor/css/_appwork/ wwwroot/vendor/css/_theme/ wwwroot/vendor/css/_uikit/_social.scss wwwroot/vendor/css/pages/clients.scss wwwroot/vendor/css/pages/messages.scss wwwroot/vendor/js/ wwwroot/vendor/libs/ wwwroot/vendor/fonts/ Gulpfile.js
Remove excluded libraries:
wwwroot/vendor/libs/bootstrap-tour/
Since some extensions were removed from the bootstrap-table package, remove
wwwroot/vendor/libs/bootstrap-table/ directory
and copy new appwork-v1_3_0/aspnet-core-starter/AspnetCoreStarter/wwwroot/vendor/libs/bootstrap-table/
Update:
package.json. Diff
Restore/Install Yarn packages
Rebuild assets:
Task Runner Explorer → Double click on "build:all" taskCtrl/Cmd + Shift + P → Tasks: Run task → gulp: build:all(Optional) Upgrade .Net Core framework:
Include polyfills in the <head> block after core stylesheets (see aspnet-core2-starter-generator for example):
<!-- Load polyfills -->
<environment include="Development"><script src="~/vendor/js/polyfills.js"></script></environment>
<environment exclude="Development"><script src="~/vendor/js/polyfills.js" asp-append-version="true"></script></environment>
<script>document['documentMode']===10&&document.write('<script src="https://polyfill.io/v3/polyfill.min.js?features=Intl.~locale.en"><\/script>')</script>
Bootstrap CSS:
Include migration CSS file to the end of the <head> block:
<environment include="Development"><link rel="stylesheet" href="~/vendor/css/migrate/appwork-130.css" /></environment>
<environment exclude="Development"><link rel="stylesheet" href="~/vendor/css/migrate/appwork-130.min.css" asp-append-version="true" /></environment>
Changed classes:
.font-weight-thin → .font-weight-lighter
.text-dark → .text-body
.bg-none → .bg-transparent
.font-sans-serif → .text-sans-serif
.font-serif → .text-serif
.font-monospace → .text-monospace
.box-shadow-none → .shadow-none
.container-m--x → .container-m-nx
.container-m--y → .container-m-ny
.btn-round → .rounded-pill
Negative horizontal margins:
.m{sides}--{size} → .m{sides}-n{size}
.m{sides}-{breakpoint}--{size} → .m{sides}-{breakpoint}-n{size}
Bootstrap JS:
All dropdown links must have href="#" attribute. Dropdown links with href="javascript:void(0)" will throw an error
Plugin API changed:
Flot.js - See https://github.com/flot/flot/blob/master/CHANGELOG.md
bootstrap-table - see demo examples
Fullcalendar - See https://fullcalendar.io/docs
bootstrap-sweetalert is deprecated, use Sweetalert2 instead. See - https://sweetalert2.github.io/
bootstrap-tour library was removed, use "shepherd" tour library instead. See - https://shipshapecode.github.io/shepherd/
Note: Validation icons are disabled by default. To enable it, add the next
variable in the wwwroot/vendor/css/_custom-variables/_appwork.scss
and
wwwroot/vendor/css/_custom-variables/_appwork-material.scss:
$enable-validation-icons: true;
Update *.csproj. Diff
Update Gulpfile.js. Diff
Update package.json. Diff
Copy with replace changed files and directories:
wwwroot/vendor/css/_appwork/_accordion.scss wwwroot/vendor/css/_appwork/_breadcrumb.scss wwwroot/vendor/css/_appwork/_buttons.scss wwwroot/vendor/css/_appwork/_close.scss wwwroot/vendor/css/_appwork/_custom-forms.scss wwwroot/vendor/css/_appwork/_mixins.scss wwwroot/vendor/css/_appwork/_switcher.scss wwwroot/vendor/css/_appwork/_variables-material.scss wwwroot/vendor/css/_appwork/_variables.scss wwwroot/vendor/css/colors-material.scss wwwroot/vendor/fonts/fontawesome/ wwwroot/vendor/fonts/ionicons/ wwwroot/vendor/fonts/fontawesome.css wwwroot/vendor/fonts/ionicons.css wwwroot/vendor/js/ wwwroot/vendor/libs/
Update .NET Core to 2.1:
Restore/Install Yarn packages
Rebuild assets:
Task Runner Explorer → Double click on "build:all" taskCtrl/Cmd + Shift + P → Tasks: Run task → gulp: build:allRebuild project