From 23df4a58991eceb1ba9453faedaacf722e5f3831 Mon Sep 17 00:00:00 2001 From: Tykayn Date: Tue, 22 Mar 2022 11:53:45 +0100 Subject: [PATCH] style on comments bubbles --- .../consultation/consultation.component.html | 37 ++++-- .../consultation/consultation.component.scss | 1 + .../comments/comments.component.html | 125 ++++++++---------- .../comments/comments.component.scss | 46 ++++++- .../components/comments/comments.component.ts | 1 + 5 files changed, 124 insertions(+), 86 deletions(-) diff --git a/src/app/features/consultation/consultation.component.html b/src/app/features/consultation/consultation.component.html index 39b483e4..04d94ecd 100644 --- a/src/app/features/consultation/consultation.component.html +++ b/src/app/features/consultation/consultation.component.html @@ -1,6 +1,6 @@ -
+
-
-
+

{{ 'participation.comments' | translate }} + #

-
- - -
- Ce sondage ne permet pas d'ajouter de commentaires -
+ + + +
+ Ce sondage ne permet pas d'ajouter de commentaires
-
-
-

loading ...

-
-
+
+

+ Loading +

+
+ +

+ +
diff --git a/src/app/features/consultation/consultation.component.scss b/src/app/features/consultation/consultation.component.scss index 0ea6ca7c..3e2e4948 100644 --- a/src/app/features/consultation/consultation.component.scss +++ b/src/app/features/consultation/consultation.component.scss @@ -8,6 +8,7 @@ .poll_loaded { .description { min-height: 2rem; + margin-bottom: 1rem; } } .options-button { diff --git a/src/app/shared/components/comments/comments.component.html b/src/app/shared/components/comments/comments.component.html index 92d58111..c3bd9460 100644 --- a/src/app/shared/components/comments/comments.component.html +++ b/src/app/shared/components/comments/comments.component.html @@ -1,88 +1,71 @@ -
+
⚰️ Ce sondage a expiré, il n'est plus possible d'y ajouter de votes ou de commentaires
-

- - {{ 'participation.comments_new' | translate }} -

- -
-
-

- {{ comment.pseudo }} - (somebody) - , - - - {{ - 'date_delays.dipslay_comments_delay' - | translate - : { - counter_delay: calculateDaysAgoOfComment(comment.created_at), - time_unit: 'date_delays.days' | translate - } - }} - {{ calculateDaysAgoOfComment(comment.created_at) }} , - - - {{ comment.created_at | date: 'short':'Europe/Paris' }} - -

-
-
+ +
+
+
+

+ {{ comment.pseudo }} + (somebody) +

+

{{ comment.text }}

+
+
+ {{ + 'date_delays.dipslay_comments_delay' + | translate + : { + counter_delay: calculateDaysAgoOfComment(comment.created_at), + time_unit: 'date_delays.days' | translate + } + }} + +
+ + {{ comment.created_at | date: 'short':'Europe/Paris' }} +
+
-
+
-
- - - - - - - - - - - - - - - - - - - -
- - - - +
-
-
+
diff --git a/src/app/shared/components/comments/comments.component.scss b/src/app/shared/components/comments/comments.component.scss index 7cfdd368..41f9ffad 100644 --- a/src/app/shared/components/comments/comments.component.scss +++ b/src/app/shared/components/comments/comments.component.scss @@ -1,3 +1,47 @@ .date { - font-size: 0.85em; + font-weight: 400; + font-size: 12px; + line-height: 14px; + margin-top: 8px; +} +#comments { + color: #383838; + + .message-text { + background: #f6f5fd; + border-radius: 8px; + color: #383838; + padding: 1rem; + font-size: 16px; + line-height: 20px; + position: relative; + } + .message-comment { + margin-bottom: 1rem; + } + .message-comment-pseudo { + color: #3e3882; + font-weight: 700; + font-size: 14px; + line-height: 16px; + margin: 8px 0px; + } + .left-point { + width: 0; + height: 0; + border-left: 0.5rem solid transparent; + border-right: 0.5rem solid transparent; + border-top: 0.5rem solid #f6f5fd; + position: absolute; + top: 69%; + left: -0.7rem; + transform: rotate(88deg); + } +} +#new_comment { + min-height: 80px; + width: 100%; +} +.new-comment-section { + margin-bottom: 2rem; } diff --git a/src/app/shared/components/comments/comments.component.ts b/src/app/shared/components/comments/comments.component.ts index 312db7db..a51a9639 100644 --- a/src/app/shared/components/comments/comments.component.ts +++ b/src/app/shared/components/comments/comments.component.ts @@ -21,6 +21,7 @@ export class CommentsComponent { myEmail: '', myComment: '', }; + display_comment_date: boolean = false; constructor( private pollService: PollService,