aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/forms/markdown-textarea.component.html
diff options
context:
space:
mode:
authorKim <1877318+kimsible@users.noreply.github.com>2020-04-28 14:53:43 +0200
committerGitHub <noreply@github.com>2020-04-28 14:53:43 +0200
commitb15fe00f7409b27573e162192530bc73e3f918b1 (patch)
treea71df67cee37a60f4de573ca9347aa3262cd8463 /client/src/app/shared/forms/markdown-textarea.component.html
parent4682468d4d07e0864155dd2b403d93754786ea13 (diff)
downloadPeerTube-b15fe00f7409b27573e162192530bc73e3f918b1.tar.gz
PeerTube-b15fe00f7409b27573e162192530bc73e3f918b1.tar.zst
PeerTube-b15fe00f7409b27573e162192530bc73e3f918b1.zip
Add maximized mode to markdown-textarea + CSS improvements (#2660)
* Add arrows-angle-contract/expand bootstrap icons * Add grey textarea-background-color * Add maximized support to markdown-textarea + improve column display * Refactor CSS + add ResizeObservable * Replace bootstrap icons with softies * Add ResizeObserver typing definition * Add focus on textarea + Fix Observables * Propage component changes on markdown plugins * Ignore ResizeObserver not implemented in typescript yet * Move observers from constructor to click event * Add scss and css variables * Replace textareaWidth with textareaMaxWidth to fix others textareas * Clean unused css rules * Fix ResizeObserver unknown by TypeScript compiler * Set max-width: 100% for small and mobile views * Fix textarea/preview height on maximized mode * Add common padding textarea/preview side-by-side * Hide scrollbar sub-menu on small-views * Add maximized mode for mobile views * Fix sass calculate syntax * Revert custom CSS variable for inputBorderRadius and inputBorderColor * Remove unsued methods * Fix missing implement method Co-authored-by: kimsible <kimsible@users.noreply.github.com>
Diffstat (limited to 'client/src/app/shared/forms/markdown-textarea.component.html')
-rw-r--r--client/src/app/shared/forms/markdown-textarea.component.html16
1 files changed, 12 insertions, 4 deletions
diff --git a/client/src/app/shared/forms/markdown-textarea.component.html b/client/src/app/shared/forms/markdown-textarea.component.html
index 3cadb3619..a519f3e0a 100644
--- a/client/src/app/shared/forms/markdown-textarea.component.html
+++ b/client/src/app/shared/forms/markdown-textarea.component.html
@@ -1,12 +1,12 @@
1<div class="root" [ngStyle]="{ 'flex-direction': flexDirection }"> 1<div class="root" [ngClass]="{ 'maximized': isMaximized }" [ngStyle]="{ 'max-width': textareaMaxWidth }">
2 <textarea 2 <textarea #textarea
3 [(ngModel)]="content" (ngModelChange)="onModelChange()" 3 [(ngModel)]="content" (ngModelChange)="onModelChange()"
4 class="form-control" [ngClass]="classes" 4 class="form-control" [ngClass]="classes"
5 [ngStyle]="{ width: textareaWidth, height: textareaHeight, 'margin-right': textareaMarginRight }" 5 [ngStyle]="{ height: textareaHeight }"
6 [id]="name" [name]="name"> 6 [id]="name" [name]="name">
7 </textarea> 7 </textarea>
8 8
9 <div ngbNav #nav="ngbNav" class="nav-pills previews"> 9 <div ngbNav #nav="ngbNav" class="nav-pills nav-preview">
10 <ng-container ngbNavItem *ngIf="truncate !== undefined"> 10 <ng-container ngbNavItem *ngIf="truncate !== undefined">
11 <a ngbNavLink i18n>Truncated preview</a> 11 <a ngbNavLink i18n>Truncated preview</a>
12 12
@@ -22,6 +22,14 @@
22 <div [innerHTML]="previewHTML"></div> 22 <div [innerHTML]="previewHTML"></div>
23 </ng-template> 23 </ng-template>
24 </ng-container> 24 </ng-container>
25
26 <my-button
27 *ngIf="!isMaximized" icon="fullscreen" (click)="onMaximizeClick()"
28 ></my-button>
29
30 <my-button
31 *ngIf="isMaximized" icon="exit-fullscreen" (click)="onMaximizeClick()"
32 ></my-button>
25 </div> 33 </div>
26 34
27 <div [ngbNavOutlet]="nav"></div> 35 <div [ngbNavOutlet]="nav"></div>