diff --git a/src/core/components/user-avatar/user-avatar.scss b/src/core/components/user-avatar/user-avatar.scss index 679796d19..94b738f0e 100644 --- a/src/core/components/user-avatar/user-avatar.scss +++ b/src/core/components/user-avatar/user-avatar.scss @@ -1,6 +1,11 @@ :host { position: relative; cursor: pointer; + img { + border-radius: 50%; + width: var(--core-avatar-size); + height: var(--core-avatar-size); + } .contact-status { position: absolute; @@ -30,4 +35,9 @@ :host-context(.toolbar) .contact-status { width: 10px; height: 10px; -} \ No newline at end of file +} + +:host-context([dir="rtl"]) .contact-status { + left: 0; + right: unset; +} diff --git a/src/core/components/user-avatar/user-avatar.ts b/src/core/components/user-avatar/user-avatar.ts index 565971a9a..dbbd25b31 100644 --- a/src/core/components/user-avatar/user-avatar.ts +++ b/src/core/components/user-avatar/user-avatar.ts @@ -26,7 +26,7 @@ import { CoreUserProvider, CoreUserBasicData, CoreUserProfilePictureUpdatedData /** * Component to display a "user avatar". * - * Example: + * Example: */ @Component({ selector: 'core-user-avatar', diff --git a/src/core/features/courses/pages/course-preview/course-preview.html b/src/core/features/courses/pages/course-preview/course-preview.html index 444ad7027..1424ea2a5 100644 --- a/src/core/features/courses/pages/course-preview/course-preview.html +++ b/src/core/features/courses/pages/course-preview/course-preview.html @@ -47,11 +47,11 @@ [userId]="contact.id" [courseId]="isEnrolled ? course.id : null" [attr.aria-label]="'core.viewprofile' | translate"> - - +

{{contact.fullname}}

diff --git a/src/core/features/mainmenu/pages/more/more.html b/src/core/features/mainmenu/pages/more/more.html index 0661d0347..aba57a084 100644 --- a/src/core/features/mainmenu/pages/more/more.html +++ b/src/core/features/mainmenu/pages/more/more.html @@ -10,7 +10,7 @@ - +

{{siteInfo.fullname}}

diff --git a/src/core/features/user/pages/profile/profile.html b/src/core/features/user/pages/profile/profile.html index 5f8b50497..332e7cdbf 100644 --- a/src/core/features/user/pages/profile/profile.html +++ b/src/core/features/user/pages/profile/profile.html @@ -12,15 +12,14 @@ - - - - +

+ - - +
+

{{ user.fullname }}

{{ user.address }}

diff --git a/src/core/features/user/pages/profile/profile.scss b/src/core/features/user/pages/profile/profile.scss index 454b80ab1..d3bcabffe 100644 --- a/src/core/features/user/pages/profile/profile.scss +++ b/src/core/features/user/pages/profile/profile.scss @@ -1,31 +1,49 @@ :host { + + .core-user-profile-maininfo::part(native) { + flex-direction: column; + } + ::ng-deep { + core-user-avatar { + display: block; + --core-avatar-size: var(--core-large-avatar-size); + + img { + margin: 0; + } + + .contact-status { + width: 24px !important; + height: 24px !important; + } + + .core-icon-foreground { + position: absolute; + right: 0; + bottom: 0; + line-height: 30px; + text-align: center; + width: 30px; + height: 30px; + border-radius: 50%; + background-color:var(--background); + + :host-context([dir="rtl"]) & { + left: 0; + right: unset; + } + } + } + } + +} + +:host-context([dir="rtl"]) ::ng-deep core-user-avatar .core-icon-foreground { + left: 0; + right: unset; +} + // @todo - // .core-icon-foreground { - // position: absolute; - // @include position(null, 0, 0, null); - // font-size: 24px; - // line-height: 30px; - // text-align: center; - - // width: 30px; - // height: 30px; - // border-radius: 50%; - // background-color: $white; - // @include darkmode() { - // background: $core-dark-item-bg-color; - // } - // } - // [core-user-avatar].item-avatar-center { - // display: inline-block; - // img { - // margin: 0; - // } - // .contact-status { - // width: 24px; - // height: 24px; - // } - // } - // .core-user-communication-handlers { // background: $list-background-color; // border-bottom: 1px solid $list-border-color; @@ -66,4 +84,4 @@ // @include margin(null, null, null, 0.3em); // } // } -} \ No newline at end of file + diff --git a/src/theme/app.scss b/src/theme/app.scss index 66a988c47..106fcab25 100644 --- a/src/theme/app.scss +++ b/src/theme/app.scss @@ -203,13 +203,14 @@ ion-card.core-danger-card { // Avatar // ------------------------- // Large centered avatar -img.large-avatar { +img.large-avatar, +.large-avatar img { display: block; margin: auto; - width: 90px; - height: 90px; - max-width: 90px; - max-height: 90px; + width: var(--core-large-avatar-size); + height: var(--core-large-avatar-size); + max-width: var(--core-large-avatar-size); + max-height: var(--core-large-avatar-size); margin-bottom: 10px; border-radius : 50%; padding: 4px; @@ -217,6 +218,11 @@ img.large-avatar { background-color: transparent; } +ion-avatar.large-avatar { + width: var(--core-large-avatar-size); + height: var(--core-large-avatar-size); +} + ion-avatar ion-img, ion-avatar img { text-indent: -99999px; background-color: var(--gray-light); diff --git a/src/theme/variables.scss b/src/theme/variables.scss index 836edd3fd..2c7b87910 100644 --- a/src/theme/variables.scss +++ b/src/theme/variables.scss @@ -170,6 +170,10 @@ --core-course-color-8: var(--custom-course-color-9, #fd79a8); --core-course-color-9: var(--custom-course-color-90, #6c5ce7); --core-star-color: var(--custom-star-color, var(--core-color)); + + --core-large-avatar-size: var(--custom-large-avatar-size, 90px); + + --core-avatar-size: var(--custom-avatar-size, 64px); } /*