aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorkimsible <kimsible@users.noreply.github.com>2020-08-09 14:20:56 +0200
committerChocobozzz <chocobozzz@cpy.re>2020-08-14 15:03:38 +0200
commitfd9c3c8d66197c8f6dfc6cc01cad797cda6c4f30 (patch)
treed3c067cece52aad361173da0b58b4ffca7adb35c
parent04c7f7017546709c4bcf83b1b143e399582e63de (diff)
downloadPeerTube-fd9c3c8d66197c8f6dfc6cc01cad797cda6c4f30.tar.gz
PeerTube-fd9c3c8d66197c8f6dfc6cc01cad797cda6c4f30.tar.zst
PeerTube-fd9c3c8d66197c8f6dfc6cc01cad797cda6c4f30.zip
Refactor popover markdown, add code style
-rw-r--r--client/src/app/+videos/+video-watch/comment/video-comment-add.component.html40
-rw-r--r--client/src/sass/application.scss10
2 files changed, 33 insertions, 17 deletions
diff --git a/client/src/app/+videos/+video-watch/comment/video-comment-add.component.html b/client/src/app/+videos/+video-watch/comment/video-comment-add.component.html
index b4f8bda5e..4af0d277c 100644
--- a/client/src/app/+videos/+video-watch/comment/video-comment-add.component.html
+++ b/client/src/app/+videos/+video-watch/comment/video-comment-add.component.html
@@ -3,28 +3,34 @@
3 <img [src]="getAvatarUrl()" alt="Avatar" /> 3 <img [src]="getAvatarUrl()" alt="Avatar" />
4 4
5 <div class="form-group"> 5 <div class="form-group">
6 <textarea i18n-placeholder placeholder="Add comment..." myAutoResize [readonly]="(user === null) ? true : false"
7 (click)="openVisitorModal($event)" formControlName="text" [ngClass]="{ 'input-error': formErrors['text'] }"
8 (keyup.control.enter)="onValidKey()" (keyup.meta.enter)="onValidKey()" #textarea>
9
10 </textarea>
6 <my-help class="markdown-guide" helpType="custom" iconName="markdown" i18n-title title="Markdown compatible"> 11 <my-help class="markdown-guide" helpType="custom" iconName="markdown" i18n-title title="Markdown compatible">
7 <ng-template ptTemplate="customHtml"> 12 <ng-template ptTemplate="customHtml">
8 <div i18n> 13 <span i18n>Markdown compatible that supports:</span>
9 Markdown compatible that supports:
10 14
11 <ul> 15 <ul>
12 <li>Emphasis: <strong>**bold**</strong>, <i>_italic_</i></li> 16 <li><span i18n>Auto generated links</span></li>
13 <li>Links</li> 17 <li><span i18n>Break lines</span></li>
14 <li>Break lines</li> 18 <li><span i18n>Lists</span></li>
15 <li>Lists</li> 19 <li>
16 <li>Emojis</li> 20 <span i18n>Emphasis</span>
17 </ul> 21 <code>**<strong i18n>bold</strong>** _<i i18n>italic</i>_</code>
18 </div> 22 </li>
23 <li>
24 <span i18n>Emoji shortcuts</span>
25 <code>:) &lt;3</code>
26 </li>
27 <li>
28 <span i18n>Emoji markup</span>
29 <code>:smile:</code>
30 </li>
31 </ul>
19 </ng-template> 32 </ng-template>
20 </my-help> 33 </my-help>
21 <textarea i18n-placeholder placeholder="Add comment..." myAutoResize
22 [readonly]="(user === null) ? true : false"
23 (click)="openVisitorModal($event)"
24 formControlName="text" [ngClass]="{ 'input-error': formErrors['text'] }"
25 (keyup.control.enter)="onValidKey()" (keyup.meta.enter)="onValidKey()" #textarea>
26
27 </textarea>
28 <div *ngIf="formErrors.text" class="form-error"> 34 <div *ngIf="formErrors.text" class="form-error">
29 {{ formErrors.text }} 35 {{ formErrors.text }}
30 </div> 36 </div>
diff --git a/client/src/sass/application.scss b/client/src/sass/application.scss
index d2811d24a..3be8f057b 100644
--- a/client/src/sass/application.scss
+++ b/client/src/sass/application.scss
@@ -103,6 +103,16 @@ label {
103 font-size: 15px; 103 font-size: 15px;
104} 104}
105 105
106code {
107 background-color: pvar(--greyBackgroundColor);
108 border-radius: 3px;
109 padding: .2em .4em;
110 margin: auto .4em;
111 font-size: 75%;
112 display: inline-block;
113 vertical-align: middle;
114}
115
106.form-error { 116.form-error {
107 display: block; 117 display: block;
108 color: $red; 118 color: $red;