Add `leptonx-lite` theme as optional for Angular UI to templates

pull/12938/head
Engincan VESKE 4 years ago
parent 12040ad249
commit 6d5b438d30

@ -15,7 +15,9 @@ public class TemplateCodeDeleteStep : ProjectBuildPipelineStep
file.Name.EndsWith(".gitignore") ||
file.Name.EndsWith(".yml") ||
file.Name.EndsWith(".ps1") ||
file.Name.EndsWith(".html"))
file.Name.EndsWith(".html") ||
file.Name.EndsWith(".ts") ||
file.Name.EndsWith(".scss"))
{
file.RemoveTemplateCode(context.Symbols);
file.RemoveTemplateCodeMarkers();

@ -120,7 +120,7 @@ public static class FileEntryExtensions
}
}
if (lines[i+1].Contains("<TEMPLATE-REMOVE"))
if ((i + 1 < lines.Length) && (lines[i + 1].Contains("<TEMPLATE-REMOVE")))
{
continue;
}

@ -65,6 +65,9 @@
"inject": true,
"bundleName": "bootstrap-ltr.min"
},
//<TEMPLATE-REMOVE IF-NOT='LEPTONX-LITE'>
"node_modules/bootstrap-icons/font/bootstrap-icons.css",
//</TEMPLATE-REMOVE>
"src/styles.scss"
],
"scripts": []

@ -18,7 +18,12 @@
"@abp/ng.identity": "~5.3.0-rc.3",
"@abp/ng.setting-management": "~5.3.0-rc.3",
"@abp/ng.tenant-management": "~5.3.0-rc.3",
//<TEMPLATE-REMOVE IF-NOT='BASIC'>
"@abp/ng.theme.basic": "~5.3.0-rc.3",
//</TEMPLATE-REMOVE>
//<TEMPLATE-REMOVE IF-NOT='LEPTONX-LITE'>
"@abp/ng.theme.lepton-x": "~1.0.0-beta.2",
//</TEMPLATE-REMOVE>
"@abp/ng.theme.shared": "~5.3.0-rc.3",
"@angular/animations": "~13.1.1",
"@angular/common": "~13.1.1",
@ -31,6 +36,9 @@
"@angular/router": "~13.1.1",
"rxjs": "~6.6.0",
"tslib": "^2.1.0",
//<TEMPLATE-REMOVE IF-NOT='LEPTONX-LITE'>
"bootstrap-icons": "~1.8.3",
//</TEMPLATE-REMOVE>
"zone.js": "~0.11.4"
},
"devDependencies": {

@ -4,7 +4,13 @@ import { registerLocale } from '@abp/ng.core/locale';
import { IdentityConfigModule } from '@abp/ng.identity/config';
import { SettingManagementConfigModule } from '@abp/ng.setting-management/config';
import { TenantManagementConfigModule } from '@abp/ng.tenant-management/config';
//<TEMPLATE-REMOVE IF-NOT='BASIC'>
import { ThemeBasicModule } from '@abp/ng.theme.basic';
//</TEMPLATE-REMOVE>
//<TEMPLATE-REMOVE IF-NOT='LEPTONX-LITE'>
import { ThemeLeptonXModule } from '@abp/ng.theme.lepton-x';
import { SideMenuLayoutModule } from '@abp/ng.theme.lepton-x/layouts';
//</TEMPLATE-REMOVE>
import { ThemeSharedModule } from '@abp/ng.theme.shared';
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
@ -28,7 +34,13 @@ import { APP_ROUTE_PROVIDER } from './route.provider';
IdentityConfigModule.forRoot(),
TenantManagementConfigModule.forRoot(),
SettingManagementConfigModule.forRoot(),
//<TEMPLATE-REMOVE IF-NOT='BASIC'>
ThemeBasicModule.forRoot(),
//</TEMPLATE-REMOVE>
//<TEMPLATE-REMOVE IF-NOT='LEPTONX-LITE'>
ThemeLeptonXModule.forRoot(),
SideMenuLayoutModule.forRoot(),
//</TEMPLATE-REMOVE>
],
declarations: [AppComponent],
providers: [APP_ROUTE_PROVIDER],

@ -1,7 +1,6 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { HomeComponent } from './home.component';
import { ApplicationLayoutComponent } from '@abp/ng.theme.basic';
const routes: Routes = [{ path: '', component: HomeComponent }];

@ -24,3 +24,11 @@
transform: translate(-50%, -50%);
}
}
+//<TEMPLATE-REMOVE IF-NOT='LEPTONX-LITE'>
:root {
--lpx-logo: url('/assets/images/logo.png');
--lpx-logo-icon: url('/assets/images/logo-icon.png');
--lpx-brand: #edae53;
}
//</TEMPLATE-REMOVE>

@ -65,6 +65,9 @@
"inject": true,
"bundleName": "bootstrap-ltr.min"
},
//<TEMPLATE-REMOVE IF-NOT='LEPTONX-LITE'>
"node_modules/bootstrap-icons/font/bootstrap-icons.css",
//</TEMPLATE-REMOVE>
"src/styles.scss"
],
"scripts": []

@ -18,7 +18,12 @@
"@abp/ng.identity": "~5.3.0-rc.3",
"@abp/ng.setting-management": "~5.3.0-rc.3",
"@abp/ng.tenant-management": "~5.3.0-rc.3",
//<TEMPLATE-REMOVE IF-NOT='BASIC'>
"@abp/ng.theme.basic": "~5.3.0-rc.3",
//</TEMPLATE-REMOVE>
//<TEMPLATE-REMOVE IF-NOT='LEPTONX-LITE'>
"@abp/ng.theme.lepton-x": "~1.0.0-beta.2",
//</TEMPLATE-REMOVE>
"@abp/ng.theme.shared": "~5.3.0-rc.3",
"@angular/animations": "~13.3.3",
"@angular/common": "~13.3.3",
@ -31,6 +36,9 @@
"@angular/router": "~13.3.3",
"rxjs": "~6.6.0",
"tslib": "^2.1.0",
//<TEMPLATE-REMOVE IF-NOT='LEPTONX-LITE'>
"bootstrap-icons": "~1.8.3",
//</TEMPLATE-REMOVE>
"zone.js": "~0.11.4"
},
"devDependencies": {

@ -4,7 +4,13 @@ import { registerLocale } from '@abp/ng.core/locale';
import { IdentityConfigModule } from '@abp/ng.identity/config';
import { SettingManagementConfigModule } from '@abp/ng.setting-management/config';
import { TenantManagementConfigModule } from '@abp/ng.tenant-management/config';
//<TEMPLATE-REMOVE IF-NOT='BASIC'>
import { ThemeBasicModule } from '@abp/ng.theme.basic';
//</TEMPLATE-REMOVE>
//<TEMPLATE-REMOVE IF-NOT='LEPTONX-LITE'>
import { ThemeLeptonXModule } from '@abp/ng.theme.lepton-x';
import { SideMenuLayoutModule } from '@abp/ng.theme.lepton-x/layouts';
//</TEMPLATE-REMOVE>
import { ThemeSharedModule } from '@abp/ng.theme.shared';
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
@ -28,7 +34,13 @@ import { APP_ROUTE_PROVIDER } from './route.provider';
IdentityConfigModule.forRoot(),
TenantManagementConfigModule.forRoot(),
SettingManagementConfigModule.forRoot(),
//<TEMPLATE-REMOVE IF-NOT='BASIC'>
ThemeBasicModule.forRoot(),
//</TEMPLATE-REMOVE>
//<TEMPLATE-REMOVE IF-NOT='LEPTONX-LITE'>
ThemeLeptonXModule.forRoot(),
SideMenuLayoutModule.forRoot(),
//</TEMPLATE-REMOVE>
],
declarations: [AppComponent],
providers: [APP_ROUTE_PROVIDER],

@ -1,7 +1,6 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { HomeComponent } from './home.component';
import { ApplicationLayoutComponent } from '@abp/ng.theme.basic';
const routes: Routes = [{ path: '', component: HomeComponent }];

@ -24,3 +24,11 @@
transform: translate(-50%, -50%);
}
}
//<TEMPLATE-REMOVE IF-NOT='LEPTONX-LITE'>
:root {
--lpx-logo: url('/assets/images/logo.png');
--lpx-logo-icon: url('/assets/images/logo-icon.png');
--lpx-brand: #edae53;
}
//</TEMPLATE-REMOVE>
Loading…
Cancel
Save