-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(template): add page links for pre and next page
- Loading branch information
Showing
11 changed files
with
206 additions
and
11 deletions.
There are no files selected for viewing
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
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
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
32 changes: 32 additions & 0 deletions
32
packages/template/src/shared/doc-pages-links/doc-pages-links.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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<div class="dg-pages-link"> | ||
<div class="dg-page-link" *ngIf="docPages.pre && docPages.pre.channelPath"> | ||
<a [routerLink]="['/' + docPages.pre.channelPath + '/' + docPages.pre.path]"> | ||
<div class="dg-page-link-icon"> | ||
<dg-icon iconName="arrowLeft"></dg-icon> | ||
</div> | ||
<div> | ||
<div class="dg-page-link-label"> | ||
{{ 'PRE_PAGE' | dgTranslate }} | ||
</div> | ||
<div class="dg-page-link-title"> | ||
{{ docPages.pre.title }} | ||
</div> | ||
</div> | ||
</a> | ||
</div> | ||
<div class="dg-page-link" *ngIf="docPages.next && docPages.next.channelPath"> | ||
<a [routerLink]="['/' + docPages.next.channelPath + '/' + docPages.next.path]"> | ||
<div class="dg-page-link-icon"> | ||
<dg-icon iconName="arrowRight"></dg-icon> | ||
</div> | ||
<div> | ||
<div class="dg-page-link-label"> | ||
{{ 'NEXT_PAGE' | dgTranslate }} | ||
</div> | ||
<div class="dg-page-link-title"> | ||
{{ docPages.next.title }} | ||
</div> | ||
</div> | ||
</a> | ||
</div> | ||
</div> |
14 changes: 14 additions & 0 deletions
14
packages/template/src/shared/doc-pages-links/doc-pages-links.component.ts
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { Component, Input } from '@angular/core'; | ||
import { NavigationItem } from '@docgeni/template'; | ||
|
||
@Component({ | ||
selector: 'dg-doc-pages-links', | ||
templateUrl: './doc-pages-links.component.html' | ||
}) | ||
export class DocPagesLinksComponent { | ||
@Input() docPages: { | ||
pre: NavigationItem; | ||
next: NavigationItem; | ||
}; | ||
constructor() {} | ||
} |
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
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