46 lines
1.8 KiB
HTML
46 lines
1.8 KiB
HTML
<div *ngIf="loading" style="text-align:center; padding: 2rem;">
|
|
<p-progressSpinner></p-progressSpinner>
|
|
</div>
|
|
|
|
<ng-container *ngIf="!loading">
|
|
<!-- Find bar (shown only when showFindBar is true) -->
|
|
<div *ngIf="showFindBar" class="markdown-viewer__find-bar">
|
|
<input
|
|
type="text"
|
|
class="markdown-viewer__find-input"
|
|
[(ngModel)]="searchQuery"
|
|
(ngModelChange)="onSearchChange($event)"
|
|
(keydown)="onSearchKeydown($event)"
|
|
placeholder="Find in page..."
|
|
i18n-placeholder="@@findInPage">
|
|
<span *ngIf="searchQuery" class="markdown-viewer__find-count">
|
|
{{ matchCount === 0 ? 'No matches' : (currentMatchIndex + 1) + ' of ' + matchCount }}
|
|
</span>
|
|
<ng-container *ngIf="searchQuery && matchCount > 0">
|
|
<button class="markdown-viewer__find-nav" (click)="navigateMatch(-1)" title="Previous match">▴</button>
|
|
<button class="markdown-viewer__find-nav" (click)="navigateMatch(1)" title="Next match">▾</button>
|
|
</ng-container>
|
|
<button *ngIf="searchQuery" class="markdown-viewer__find-clear" (click)="clearSearch()" title="Clear">✕</button>
|
|
</div>
|
|
|
|
<ng-container *ngIf="sections[0]">
|
|
<div #markdownContent class="markdown-viewer__body markdown-viewer__content markdown-viewer__content--full">
|
|
<div
|
|
*ngIf="sections[0].intro"
|
|
[attr.id]="sections[0].introAnchorId"
|
|
class="markdown-viewer__intro"
|
|
[innerHTML]="sections[0].intro"></div>
|
|
<div
|
|
*ngFor="let panel of sections[0].flatPanels"
|
|
[attr.id]="panel.anchorId"
|
|
class="markdown-viewer__panel-node">
|
|
<div class="markdown-viewer__section-title">{{ panel.header }}</div>
|
|
<div
|
|
*ngIf="panel.content"
|
|
class="markdown-viewer__panel-content"
|
|
[innerHTML]="panel.content"></div>
|
|
</div>
|
|
</div>
|
|
</ng-container>
|
|
</ng-container>
|