From c823efe5e4796e00d0edfdeb5336e265c768fd26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Thu, 24 Oct 2019 13:16:53 +0200 Subject: [PATCH] MOBILE-3205 forum: Discussion and post new architecture --- .../index/addon-mod-forum-index.html | 73 ++++++++++--------- .../mod/forum/components/index/index.scss | 49 +++++++++++++ .../components/post/addon-mod-forum-post.html | 64 +++++++++------- src/addon/mod/forum/components/post/post.scss | 47 ++++++++++++ 4 files changed, 171 insertions(+), 62 deletions(-) diff --git a/src/addon/mod/forum/components/index/addon-mod-forum-index.html b/src/addon/mod/forum/components/index/addon-mod-forum-index.html index 7a1641f92..9e9f3badf 100644 --- a/src/addon/mod/forum/components/index/addon-mod-forum-index.html +++ b/src/addon/mod/forum/components/index/addon-mod-forum-index.html @@ -43,51 +43,52 @@ - - -

-

- {{ 'core.notsent' | translate }} - {{discussion.userfullname}} -

-
- - - {{ discussion.groupname }} - + +
+

+ +

+
+
+ +

{{discussion.userfullname}}

+

{{ discussion.groupname }}

+

{{ 'core.notsent' | translate }}

+
- - -

- - - -

-

- -
{{ 'addon.mod_forum.unreadpostsnumber' | translate:{ '$a' : discussion.numunread} }}
-
- {{discussion.userfullname}} -

-

{{discussion.created | coreDateDayOrTime}}

-
- - - + +
+

+ + + +

+ +
+
+ +
+

{{discussion.userfullname}}

+

{{ discussion.groupname }}

+

{{discussion.created | coreFormatDate: "strftimedatetimeshort"}}

+
+
+ + - {{ discussion.groupname }} + {{ 'addon.mod_forum.lastpost' | translate }} + {{discussion.timemodified | coreTimeAgo}} + {{discussion.created | coreTimeAgo}} {{ 'addon.mod_forum.numreplies' | translate:{numreplies: discussion.numreplies} }} - - - - - {{ 'addon.mod_forum.lastpost' | translate }} {{discussion.timemodified | coreTimeAgo}} + {{ discussion.numunread }} diff --git a/src/addon/mod/forum/components/index/index.scss b/src/addon/mod/forum/components/index/index.scss index 5b0fd16cc..911c5d809 100644 --- a/src/addon/mod/forum/components/index/index.scss +++ b/src/addon/mod/forum/components/index/index.scss @@ -1,5 +1,54 @@ +$addon-forum-avatar-size: 28px; + ion-app.app-root addon-mod-forum-index { .addon-forum-star { color: $core-star-color; } + + .addon-mod-forum-discussion.item { + .label { + margin-top: 4px; + + h2 { + margin-top: 8px; + margin-bottom: 8px; + font-weight: bold; + ion-icon { + @include margin(0, 6px, 0, 0); + } + } + h3 { + font-size: 1.6rem; + } + } + + ion-avatar { + width: $addon-forum-avatar-size; + height: $addon-forum-avatar-size; + min-width: $addon-forum-avatar-size; + min-height: $addon-forum-avatar-size; + &[item-start] { + @include margin(0, 8px, 0, 0); + } + img { + width: $addon-forum-avatar-size; + height: $addon-forum-avatar-size; + } + } + + .addon-mod-forum-discussion-title, + .addon-mod-forum-discussion-info { + display: flex; + align-items: center; + } + .addon-mod-forum-discussion-title h2, + .addon-mod-forum-discussion-info .addon-mod-forum-discussion-author { + flex-grow: 1; + } + + .addon-mod-forum-discussion-more-info { + font-size: 1.4rem; + clear: both; + } + } } diff --git a/src/addon/mod/forum/components/post/addon-mod-forum-post.html b/src/addon/mod/forum/components/post/addon-mod-forum-post.html index 64f387bfc..f6cca3c17 100644 --- a/src/addon/mod/forum/components/post/addon-mod-forum-post.html +++ b/src/addon/mod/forum/components/post/addon-mod-forum-post.html @@ -1,22 +1,30 @@ - -

- - - -

-

- {{ 'core.notsent' | translate }} - - {{post.modified | coreDateDayOrTime}} -

{{ 'addon.mod_forum.unread' | translate }}
- - {{post.userfullname}} -

+
+

+ + + +

+ + + + +
+
- +
{{ 'addon.mod_forum.postisprivatereply' | translate }}
@@ -30,22 +38,26 @@
- -
{{ 'core.tag.tags' | translate }}:
- -
- - - - - +
+ +
{{ 'core.tag.tags' | translate }}:
+ +
+ + + + + + +
+ {{ 'addon.mod_forum.subject' | translate }} diff --git a/src/addon/mod/forum/components/post/post.scss b/src/addon/mod/forum/components/post/post.scss index 43358381e..429be2b80 100644 --- a/src/addon/mod/forum/components/post/post.scss +++ b/src/addon/mod/forum/components/post/post.scss @@ -2,4 +2,51 @@ ion-app.app-root addon-mod-forum-post { .addon-forum-star { color: $core-star-color; } + + .card-header .item { + .label { + margin-top: 4px; + + h2 { + margin-top: 8px; + margin-bottom: 8px; + font-weight: bold; + ion-icon { + @include margin(0, 6px, 0, 0); + } + } + h3 { + font-size: 1.6rem; + } + } + + ion-avatar { + width: $addon-forum-avatar-size; + height: $addon-forum-avatar-size; + min-width: $addon-forum-avatar-size; + min-height: $addon-forum-avatar-size; + &[item-start] { + @include margin(0, 8px, 0, 0); + } + img { + width: $addon-forum-avatar-size; + height: $addon-forum-avatar-size; + } + } + + .addon-mod-forum-post-title, + .addon-mod-forum-post-info { + display: flex; + align-items: center; + } + .addon-mod-forum-post-title h2, + .addon-mod-forum-post-info .addon-mod-forum-post-author { + flex-grow: 1; + } + } + + .addon-mod-forum-post-more-info div { + font-size: 1.4rem; + } } +