This commit is contained in:
CHEVALLIER Abel
2025-11-13 16:23:22 +01:00
parent de9c515a47
commit cb235644dc
34924 changed files with 3811102 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
.content {
flex: 1;
}
.content p {
margin-bottom: 1em;
}
.content-link a {
margin-right: 16px;
}
.content-link a img {
margin-right: 8px;
}
.content-image {
margin: 0 0 0 60px;
display: flex;
align-items: center;
}
.content-image img {
width: 100%;
}
@media (max-width: 768px) {
.content-image {
flex: 100%;
margin: 24px 0 0;
}
}

View File

@@ -0,0 +1,87 @@
<nz-page-header>
<!--breadcrumb-->
<nz-breadcrumb nz-page-header-breadcrumb>
<nz-breadcrumb-item>First-level Menu</nz-breadcrumb-item>
<nz-breadcrumb-item>
<a>Second-level Menu</a>
</nz-breadcrumb-item>
<nz-breadcrumb-item>Third-level Menu</nz-breadcrumb-item>
</nz-breadcrumb>
<!--avatar-->
<nz-avatar nz-page-header-avatar nzSrc="https://avatars0.githubusercontent.com/u/22736418?s=88&v=4"></nz-avatar>
<!--title-->
<nz-page-header-title>Title</nz-page-header-title>
<!--subtitle-->
<nz-page-header-subtitle>This is a subtitle</nz-page-header-subtitle>
<!--tags-->
<nz-page-header-tags>
<nz-tag [nzColor]="'blue'">Running</nz-tag>
</nz-page-header-tags>
<!--extra-->
<nz-page-header-extra>
<nz-space>
<button *nzSpaceItem nz-button>Operation</button>
<button *nzSpaceItem nz-button>Operation</button>
<button *nzSpaceItem nz-button nzType="primary">Primary</button>
<button
*nzSpaceItem
nz-button
nzNoAnimation
nz-dropdown
[nzDropdownMenu]="menu"
nzPlacement="bottomRight"
style="border: none; padding: 0"
>
<nz-icon nzType="more" nzTheme="outline" style="font-size: 20px; vertical-align: top;" />
</button>
</nz-space>
<nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu>
<li nz-menu-item>1st menu item length</li>
<li nz-menu-item>2nd menu item length</li>
<li nz-menu-item>3rd menu item length</li>
</ul>
</nz-dropdown-menu>
</nz-page-header-extra>
<!--content-->
<nz-page-header-content>
<div nz-row>
<div class="content">
<p nz-paragraph>
Ant Design interprets the color system into two levels: a system-level color system and a product-level
color system.
</p>
<p nz-paragraph>
Ant Design's design team preferred to design with the HSB color model, which makes it easier for designers
to have a clear psychological expectation of color when adjusting colors, as well as facilitate
communication in teams.
</p>
<div class="content-link">
<a>
<img src="https://gw.alipayobjects.com/zos/rmsportal/MjEImQtenlyueSmVEfUD.svg" alt="start" />
Quick Start
</a>
<a>
<img src="https://gw.alipayobjects.com/zos/rmsportal/NbuDUAuBlIApFuDvWiND.svg" alt="info" />
Product Info
</a>
<a>
<img src="https://gw.alipayobjects.com/zos/rmsportal/ohOEPSYdDTNnyMbGuyLb.svg" alt="doc" />
Product Doc
</a>
</div>
</div>
<div class="content-image">
<img src="https://gw.alipayobjects.com/zos/antfincdn/K%24NnlsB%26hz/pageHeader.svg" alt="content" />
</div>
</div>
</nz-page-header-content>
</nz-page-header>

View File

@@ -0,0 +1,23 @@
import { fakeAsync, ComponentFixture, TestBed } from '@angular/core/testing';
import { <%= classify(name) %>Component } from './<%= dasherize(name) %>.component';
describe('<%= classify(name) %>Component', () => {
let component: <%= classify(name) %>Component;
let fixture: ComponentFixture<<%= classify(name) %>Component>;
beforeEach(fakeAsync(() => {
TestBed.configureTestingModule({
declarations: [ <%= classify(name) %>Component ]
})
.compileComponents();
;
fixture = TestBed.createComponent(<%= classify(name) %>Component);
component = fixture.componentInstance;
fixture.detectChanges();
}));
it('should compile', () => {
expect(component).toBeTruthy();
});
});

View File

@@ -0,0 +1,152 @@
import { Component } from '@angular/core';
import { NzAvatarModule } from 'ng-zorro-antd/avatar';
import { NzBreadCrumbModule } from 'ng-zorro-antd/breadcrumb';
import { NzButtonModule } from 'ng-zorro-antd/button';
import { NzNoAnimationModule } from 'ng-zorro-antd/core/no-animation';
import { NzDropDownModule } from 'ng-zorro-antd/dropdown';
import { NzGridModule } from 'ng-zorro-antd/grid';
import { NzIconModule } from 'ng-zorro-antd/icon';
import { NzPageHeaderModule } from 'ng-zorro-antd/page-header';
import { NzSpaceModule } from 'ng-zorro-antd/space';
import { NzTagModule } from 'ng-zorro-antd/tag';
import { NzTypographyModule } from 'ng-zorro-antd/typography';
@Component({
selector: '<%= selector %>',
imports: [
NzAvatarModule,
NzBreadCrumbModule,
NzButtonModule,
NzDropDownModule,
NzGridModule,
NzIconModule,
NzNoAnimationModule,
NzPageHeaderModule,
NzSpaceModule,
NzTagModule,
NzTypographyModule
],
<% if(inlineTemplate) { %>template: `
<nz-page-header>
<!--breadcrumb-->
<nz-breadcrumb nz-page-header-breadcrumb>
<nz-breadcrumb-item>First-level Menu</nz-breadcrumb-item>
<nz-breadcrumb-item>
<a>Second-level Menu</a>
</nz-breadcrumb-item>
<nz-breadcrumb-item>Third-level Menu</nz-breadcrumb-item>
</nz-breadcrumb>
<!--avatar-->
<nz-avatar nz-page-header-avatar nzSrc="https://avatars0.githubusercontent.com/u/22736418?s=88&v=4"></nz-avatar>
<!--title-->
<nz-page-header-title>Title</nz-page-header-title>
<!--subtitle-->
<nz-page-header-subtitle>This is a subtitle</nz-page-header-subtitle>
<!--tags-->
<nz-page-header-tags>
<nz-tag [nzColor]="'blue'">Running</nz-tag>
</nz-page-header-tags>
<!--extra-->
<nz-page-header-extra>
<nz-space>
<button *nzSpaceItem nz-button>Operation</button>
<button *nzSpaceItem nz-button>Operation</button>
<button *nzSpaceItem nz-button nzType="primary">Primary</button>
<button
*nzSpaceItem
nz-button
nzNoAnimation
nz-dropdown
[nzDropdownMenu]="menu"
nzPlacement="bottomRight"
style="border: none; padding: 0"
>
<nz-icon nzType="more" nzTheme="outline" style="font-size: 20px; vertical-align: top;" />
</button>
</nz-space>
<nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu>
<li nz-menu-item>1st menu item length</li>
<li nz-menu-item>2nd menu item length</li>
<li nz-menu-item>3rd menu item length</li>
</ul>
</nz-dropdown-menu>
</nz-page-header-extra>
<!--content-->
<nz-page-header-content>
<div nz-row>
<div class="content">
<p nz-paragraph>
Ant Design interprets the color system into two levels: a system-level color system and a product-level
color system.
</p>
<p nz-paragraph>
Ant Design's design team preferred to design with the HSB color model, which makes it easier for designers
to have a clear psychological expectation of color when adjusting colors, as well as facilitate
communication in teams.
</p>
<div class="content-link">
<a>
<img src="https://gw.alipayobjects.com/zos/rmsportal/MjEImQtenlyueSmVEfUD.svg" alt="start" />
Quick Start
</a>
<a>
<img src="https://gw.alipayobjects.com/zos/rmsportal/NbuDUAuBlIApFuDvWiND.svg" alt="info" />
Product Info
</a>
<a>
<img src="https://gw.alipayobjects.com/zos/rmsportal/ohOEPSYdDTNnyMbGuyLb.svg" alt="doc" />
Product Doc
</a>
</div>
</div>
<div class="content-image">
<img src="https://gw.alipayobjects.com/zos/antfincdn/K%24NnlsB%26hz/pageHeader.svg" alt="content" />
</div>
</div>
</nz-page-header-content>
</nz-page-header>
`<% } else { %>templateUrl: './<%= dasherize(name) %>.component.html'<% } %>,
<% if(inlineStyle) { %>styles: [`
.content {
flex: 1;
}
.content p {
margin-bottom: 1em;
}
.content-link a {
margin-right: 16px;
}
.content-link a img {
margin-right: 8px;
}
.content-image {
margin: 0 0 0 60px;
display: flex;
align-items: center;
}
.content-image img {
width: 100%;
}
@media (max-width: 768px) {
.content-image {
flex: 100%;
margin: 24px 0 0;
}
}
`]<% } else { %>styleUrls: ['./<%= dasherize(name) %>.component.<%= style %>']<% } %>
})
export class <%= classify(name) %>Component {}

View File

@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = default_1;
const schematics_1 = require("@angular-devkit/schematics");
const build_component_1 = require("../../utils/build-component");
function default_1(options) {
return (0, schematics_1.chain)([
(0, build_component_1.buildComponent)(Object.assign({}, options), {
template: './__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template',
stylesheet: './__path__/__name@dasherize@if-flat__/__name@dasherize__.component.__style__.template'
})
]);
}
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../schematics/demo/page-header-content/index.ts"],"names":[],"mappings":";;AAQA,4BAUC;AAlBD,2DAGoC;AACpC,iEAA6D;AAI7D,mBAAwB,OAAe;IACrC,OAAO,IAAA,kBAAK,EAAC;QACX,IAAA,gCAAc,oBACP,OAAO,GACZ;YACE,QAAQ,EAAE,kFAAkF;YAC5F,UAAU,EAAE,uFAAuF;SACpG,CACF;KACF,CAAC,CAAC;AACL,CAAC"}

View File

@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=schema.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../schematics/demo/page-header-content/schema.ts"],"names":[],"mappings":""}

View File

@@ -0,0 +1 @@
{"$schema":"http://json-schema.org/schema","$id":"content-page-header","title":"NG-ZORRO content page-header","type":"object","properties":{"path":{"type":"string","format":"path","description":"The path to create the component.","visible":false},"project":{"type":"string","description":"The name of the project.","$default":{"$source":"projectName"}},"name":{"type":"string","description":"The name of the component.","$default":{"$source":"argv","index":0},"x-prompt":"What should be the name of the component?"},"inlineStyle":{"description":"When true, includes styles inline in the component.ts file. Only CSS styles can be included inline. By default, an external styles file is created and referenced in the component.ts file.","type":"boolean","default":false,"alias":"s"},"inlineTemplate":{"description":"When true, includes template inline in the component.ts file. By default, an external template file is created and referenced in the component.ts file.","type":"boolean","default":false,"alias":"t"},"standalone":{"description":"Whether the generated component is standalone.","type":"boolean"},"prefix":{"type":"string","description":"The prefix to apply to the generated component selector.","alias":"p","oneOf":[{"maxLength":0},{"minLength":1,"format":"html-selector"}]},"styleext":{"description":"The file extension to use for style files.","type":"string","default":"css","x-deprecated":"Use \"style\" instead."},"style":{"description":"The file extension or preprocessor to use for style files.","type":"string","default":"css","enum":["css","scss","sass","less","styl"]},"spec":{"type":"boolean","description":"When true (the default), generates a \"spec.ts\" test file for the new component.","default":true,"x-deprecated":"Use \"skipTests\" instead."},"skipTests":{"type":"boolean","description":"When true, does not create \"spec.ts\" test files for the new component."},"flat":{"type":"boolean","description":"Flag to indicate if a dir is created.","default":false},"skipImport":{"type":"boolean","description":"When true, does not import this component into the owning NgModule."},"selector":{"type":"string","format":"html-selector","description":"The selector to use for the component."},"module":{"type":"string","description":"Allows specification of the declaring module.","alias":"m"},"export":{"type":"boolean","default":false,"description":"When true, the declaring NgModule exports this component."},"entryComponent":{"type":"boolean","default":false,"description":"When true, the new component is the entry component of the declaring NgModule."},"classnameWithModule":{"type":"boolean","description":"When true, Use module class name as additional prefix for the component classname.","default":false}},"required":["name"]}