forked from NG-ZORRO/ng-zorro-antd-mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
62 additions
and
72 deletions.
There are no files selected for viewing
75 changes: 42 additions & 33 deletions
75
site_scripts/_site/src/app/share/nz-codebox/nz-codebox.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,44 @@ | ||
<section class="code-box code-box-target" [ngClass]="{'expand':nzExpanded}" [attr.id]="nzId"> | ||
<section class="code-box-meta markdown"> | ||
<div class="code-box-title"> | ||
<a (click)="navigateToFragment()">{{ nzTitle }} | ||
<a class="edit-button" [attr.href]="nzHref" target="_blank" style=""> | ||
<i class="anticon anticon-edit"></i> | ||
</a> | ||
</a> | ||
</div> | ||
<ng-content select="[intro]"></ng-content> | ||
<nz-tooltip [nzTitle]="nzExpanded?'Hide Code':'Show Code'"> | ||
<span class="code-expand-icon" nz-tooltip (click)="nzExpanded=!nzExpanded"> | ||
<img alt="expand code" src="https://gw.alipayobjects.com/zos/rmsportal/wSAkBuJFbdxsosKKpqyq.svg" [class.code-expand-icon-show]="nzExpanded" | ||
[class.code-expand-icon-hide]="!nzExpanded"> | ||
<img alt="expand code" src="https://gw.alipayobjects.com/zos/rmsportal/OpROPHYqWmrMDBFMZtKF.svg" [class.code-expand-icon-show]="!nzExpanded" | ||
[class.code-expand-icon-hide]="nzExpanded"> | ||
</span> | ||
</nz-tooltip> | ||
</section> | ||
<section class="highlight-wrapper" [ngClass]="{'highlight-wrapper-expand':nzExpanded}"> | ||
<div class="highlight"> | ||
<div class="code-box-actions"> | ||
<nz-tooltip [nzTitle]="'Edit On StackBlitz'"> | ||
<i nz-tooltip class="anticon anticon-form code-box-code-copy" (click)="openOnStackBlitz()"></i> | ||
</nz-tooltip> | ||
<nz-tooltip [nzTitle]="'Copy Code'"> | ||
<i nz-tooltip class="anticon anticon-copy code-box-code-copy" [class.anticon-copy]="!_copied" [class.anticon-check]="_copied" | ||
[class.ant-tooltip-open]="_copied" (click)="copyCode(nzRawCode)"></i> | ||
</nz-tooltip> | ||
</div> | ||
<ng-content select="[code]"></ng-content> | ||
<section class="code-box" [ngClass]="{'expand':nzExpanded, 'code-box-target':nzSelected}" [attr.id]="nzId"> | ||
<section class="code-box-meta markdown"> | ||
<div class="code-box-title"> | ||
<a (click)="navigateToFragment()">{{ nzTitle }} | ||
<a class="edit-button" [attr.href]="nzHref" target="_blank" style=""> | ||
<i class="anticon anticon-edit"></i> | ||
</a> | ||
</a> | ||
</div> | ||
<ng-content select="[intro]"></ng-content> | ||
<nz-tooltip [nzTitle]="nzExpanded?'Hide Code':'Show Code'"> | ||
<span class="code-expand-icon" nz-tooltip (click)="nzExpanded=!nzExpanded"> | ||
<nz-modal | ||
[(nzVisible)]="nzExpanded" | ||
[nzWidth]="nzWidth" | ||
[nzTitle]="nzTitle" | ||
[nzCancelText]="null" | ||
[nzOkText]="'返回'" | ||
(nzOnCancel)="handleCancel()" | ||
(nzOnOk)="handleOk()" | ||
> | ||
<nz-highlight [nzCode]="_code" [nzLanguage]="'typescript'"></nz-highlight> | ||
</div> | ||
</section> | ||
</nz-modal> | ||
</span> | ||
</nz-tooltip> | ||
</section> | ||
<section class="highlight-wrapper" [ngClass]="{'highlight-wrapper-expand':true}"> | ||
<div class="highlight"> | ||
<div class="code-box-actions"> | ||
<nz-tooltip [nzTitle]="'Edit On StackBlitz'"> | ||
<i nz-tooltip class="anticon anticon-form code-box-code-copy" (click)="openOnStackBlitz()"></i> | ||
</nz-tooltip> | ||
<nz-tooltip [nzTitle]="'Copy Code'"> | ||
<i nz-tooltip class="anticon anticon-copy code-box-code-copy" [class.anticon-copy]="!_copied" [class.anticon-check]="_copied" [class.ant-tooltip-open]="_copied" (click)="copyCode(nzRawCode)"></i> | ||
</nz-tooltip> | ||
<nz-tooltip [nzTitle]="'Copy Generate Command'" *ngIf="nzGenerateCommand"> | ||
<i nz-tooltip class="anticon anticon-code-o code-box-code-copy" [class.anticon-code-o]="!_commandCopied" [class.anticon-check]="_commandCopied" [class.ant-tooltip-open]="_commandCopied" (click)="copyGenerateCommand(nzGenerateCommand)"></i> | ||
</nz-tooltip> | ||
</div> | ||
<ng-content select="[code]"></ng-content> | ||
<nz-highlight [nzCode]="_code" [nzLanguage]="'typescript'"></nz-highlight> | ||
</div> | ||
</section> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters