diff --git a/_screenshot/data.webp b/_screenshot/data.webp new file mode 100644 index 0000000000..5f8992d5a2 Binary files /dev/null and b/_screenshot/data.webp differ diff --git a/src/app/core/i18n/en-US.ts b/src/app/core/i18n/en-US.ts index 90e220de9d..45947fc87d 100644 --- a/src/app/core/i18n/en-US.ts +++ b/src/app/core/i18n/en-US.ts @@ -25,6 +25,8 @@ export const ENUS = { 'app.home.theme.ms.desc': 'For microservice development style', 'app.home.theme.yun': 'Yun', 'app.home.theme.yun.desc': 'Let users focus more on business', + 'app.home.theme.data': 'Data', + 'app.home.theme.data.desc': 'Mainly dashboard and large screen data view', 'app.header.menu.home': 'Home', 'app.header.menu.docs': 'Docs', 'app.header.menu.components': 'Components', diff --git a/src/app/core/i18n/zh-CN.ts b/src/app/core/i18n/zh-CN.ts index b8896dcbd4..4321d4d86b 100644 --- a/src/app/core/i18n/zh-CN.ts +++ b/src/app/core/i18n/zh-CN.ts @@ -25,6 +25,8 @@ export const ZHCN = { 'app.home.theme.ms.desc': '面向微服务开发风格的主题', 'app.home.theme.yun': '云', 'app.home.theme.yun.desc': '将功能细节化让用户更聚焦业务', + 'app.home.theme.data': '数据', + 'app.home.theme.data.desc': '以仪表盘、大屏展示为主', 'app.header.menu.home': '首页', 'app.header.menu.docs': '文档', 'app.header.menu.components': '组件', diff --git a/src/app/routes/home/home.component.html b/src/app/routes/home/home.component.html index 61345f60b4..182cc7b282 100644 --- a/src/app/routes/home/home.component.html +++ b/src/app/routes/home/home.component.html @@ -24,10 +24,10 @@

NG-ALAIN

- @for (i of list; track $index) { + @for (i of allThemes; track $index) {
- - + +
} @@ -118,7 +118,7 @@

{{ 'app.home.feature.demo' | i18n }}

{{ 'app.home.theme' | i18n }}

- @for (t of themes; track $index) { + @for (t of bussionThemes; track $index) { } diff --git a/src/app/routes/home/home.component.ts b/src/app/routes/home/home.component.ts index 4e5fea7c8f..e1003ca207 100644 --- a/src/app/routes/home/home.component.ts +++ b/src/app/routes/home/home.component.ts @@ -15,6 +15,13 @@ import { NzToolTipModule } from 'ng-zorro-antd/tooltip'; import { I18NService } from '@core'; +interface ThemeItem { + type: string; + url: string; + screenshot: string; + buession: boolean; +} + @Component({ selector: 'app-home', templateUrl: './home.component.html', @@ -33,13 +40,16 @@ import { I18NService } from '@core'; ] }) export class HomeComponent implements OnInit, OnDestroy, AfterViewInit { - list = [ - { type: 'basic', url: 'https://ng-alain.github.io/ng-alain' }, - { type: 'pro', url: 'https://e.ng-alain.com/theme/pro' }, - { type: 'ms', url: 'https://e.ng-alain.com/theme/ms' }, - { type: 'yun', url: 'https://e.ng-alain.com/theme/yun' } + allThemes: ThemeItem[] = [ + { type: 'data', url: 'https://e.ng-alain.com/theme/data', screenshot: 'data.webp', buession: true }, + { type: 'basic', url: 'https://ng-alain.github.io/ng-alain', screenshot: 'basic.png', buession: false }, + { type: 'pro', url: 'https://e.ng-alain.com/theme/pro', screenshot: 'pro.png', buession: true }, + { type: 'ms', url: 'https://e.ng-alain.com/theme/ms', screenshot: 'ms.png', buession: true }, + { type: 'yun', url: 'https://e.ng-alain.com/theme/yun', screenshot: 'yun.png', buession: true } ]; - themes = ['pro', 'ms', 'yun']; + get bussionThemes(): ThemeItem[] { + return this.allThemes.filter(w => w.buession); + } get isBrowser(): boolean { return this.platform.isBrowser; } diff --git a/src/assets/screenshot/data.webp b/src/assets/screenshot/data.webp new file mode 100644 index 0000000000..5f8992d5a2 Binary files /dev/null and b/src/assets/screenshot/data.webp differ