From e5c766c42d25653237dbb1d53c21cd3c704b1888 Mon Sep 17 00:00:00 2001 From: gaelle morin Date: Tue, 27 Apr 2021 12:41:05 +0200 Subject: [PATCH 1/3] patch: communities-profile - Default picture added on large screens --- src/images/photos.svg | 1 + src/styles/admin-circles/_index.scss | 40 +++++++++++++++++++ src/views/partials/widgets.pug | 1 + .../hubl-communities-profile-picture.pug | 2 +- 4 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 src/images/photos.svg diff --git a/src/images/photos.svg b/src/images/photos.svg new file mode 100644 index 0000000..acf15ad --- /dev/null +++ b/src/images/photos.svg @@ -0,0 +1 @@ + diff --git a/src/styles/admin-circles/_index.scss b/src/styles/admin-circles/_index.scss index 7752f3d..ad0c607 100644 --- a/src/styles/admin-circles/_index.scss +++ b/src/styles/admin-circles/_index.scss @@ -176,6 +176,10 @@ background-size: cover; } } + + .picture-empty { + display: none; + } } .communities-map { @@ -343,6 +347,42 @@ } } } + + @media (min-width: 768.01px) { + + .communities-profile-picture { + + .picture-empty { + display: flex; + justify-content: center; + align-items: center; + + object { + height: 100px; + width: 100px; + object-fit: cover; + object-position: center; + } + } + + &:nth-child(2)>.picture-empty { + background: #E4E9F1; + + svg { + fill: #D0D4DA; + } + } + + &:nth-child(1)>.picture-empty, + &:nth-child(3)>.picture-empty { + background: #E9F2FF; + + svg { + fill: #D7E2F3; + } + } + } + } .flex { display: flex; diff --git a/src/views/partials/widgets.pug b/src/views/partials/widgets.pug index ee38e84..37ca813 100644 --- a/src/views/partials/widgets.pug +++ b/src/views/partials/widgets.pug @@ -27,6 +27,7 @@ include widgets/hubl-communities-edit-email.pug include widgets/hubl-communities-edit-website.pug include widgets/hubl-communities-logo.pug include widgets/hubl-communities-map-fix-url-name.pug +include widgets/hubl-communities-profile-picture.pug include widgets/hubl-communities-profile-email.pug include widgets/hubl-communities-profile-facebook.pug include widgets/hubl-communities-profile-instagram.pug diff --git a/src/views/partials/widgets/hubl-communities-profile-picture.pug b/src/views/partials/widgets/hubl-communities-profile-picture.pug index c470f50..06c73d4 100644 --- a/src/views/partials/widgets/hubl-communities-profile-picture.pug +++ b/src/views/partials/widgets/hubl-communities-profile-picture.pug @@ -1,3 +1,3 @@ if componentSet.has('communities') && getRoute('communities') solid-widget(name='hubl-communities-profile-picture') - template ${value != "" ? `
` : `
`} + template ${value != "" ? `
` : `
`} From 5e871e19fa4dbbd44b7497c14ce88b5d9a0aea64 Mon Sep 17 00:00:00 2001 From: gaelle morin Date: Tue, 27 Apr 2021 12:41:05 +0200 Subject: [PATCH 2/3] patch: communities-profile - Default picture added on large screens --- src/images/photos.svg | 1 + src/styles/admin-circles/_index.scss | 40 +++++++++++++++++++ src/views/partials/widgets.pug | 1 + .../hubl-communities-profile-picture.pug | 2 +- 4 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 src/images/photos.svg diff --git a/src/images/photos.svg b/src/images/photos.svg new file mode 100644 index 0000000..acf15ad --- /dev/null +++ b/src/images/photos.svg @@ -0,0 +1 @@ + diff --git a/src/styles/admin-circles/_index.scss b/src/styles/admin-circles/_index.scss index 7752f3d..ad0c607 100644 --- a/src/styles/admin-circles/_index.scss +++ b/src/styles/admin-circles/_index.scss @@ -176,6 +176,10 @@ background-size: cover; } } + + .picture-empty { + display: none; + } } .communities-map { @@ -343,6 +347,42 @@ } } } + + @media (min-width: 768.01px) { + + .communities-profile-picture { + + .picture-empty { + display: flex; + justify-content: center; + align-items: center; + + object { + height: 100px; + width: 100px; + object-fit: cover; + object-position: center; + } + } + + &:nth-child(2)>.picture-empty { + background: #E4E9F1; + + svg { + fill: #D0D4DA; + } + } + + &:nth-child(1)>.picture-empty, + &:nth-child(3)>.picture-empty { + background: #E9F2FF; + + svg { + fill: #D7E2F3; + } + } + } + } .flex { display: flex; diff --git a/src/views/partials/widgets.pug b/src/views/partials/widgets.pug index ee38e84..37ca813 100644 --- a/src/views/partials/widgets.pug +++ b/src/views/partials/widgets.pug @@ -27,6 +27,7 @@ include widgets/hubl-communities-edit-email.pug include widgets/hubl-communities-edit-website.pug include widgets/hubl-communities-logo.pug include widgets/hubl-communities-map-fix-url-name.pug +include widgets/hubl-communities-profile-picture.pug include widgets/hubl-communities-profile-email.pug include widgets/hubl-communities-profile-facebook.pug include widgets/hubl-communities-profile-instagram.pug diff --git a/src/views/partials/widgets/hubl-communities-profile-picture.pug b/src/views/partials/widgets/hubl-communities-profile-picture.pug index c470f50..06c73d4 100644 --- a/src/views/partials/widgets/hubl-communities-profile-picture.pug +++ b/src/views/partials/widgets/hubl-communities-profile-picture.pug @@ -1,3 +1,3 @@ if componentSet.has('communities') && getRoute('communities') solid-widget(name='hubl-communities-profile-picture') - template ${value != "" ? `
` : `
`} + template ${value != "" ? `
` : `
`} From 53b7b3ebddea92ba77a47f664e32296a27e98e28 Mon Sep 17 00:00:00 2001 From: gaelle morin Date: Wed, 28 Apr 2021 12:32:06 +0200 Subject: [PATCH 3/3] fix: communities-profile - Pictures on small screens --- src/styles/admin-circles/_index.scss | 4 ---- src/views/partials/communities/page-community-profile.pug | 8 ++++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/styles/admin-circles/_index.scss b/src/styles/admin-circles/_index.scss index ad0c607..d47aad1 100644 --- a/src/styles/admin-circles/_index.scss +++ b/src/styles/admin-circles/_index.scss @@ -383,8 +383,4 @@ } } } - - .flex { - display: flex; - } } \ No newline at end of file diff --git a/src/views/partials/communities/page-community-profile.pug b/src/views/partials/communities/page-community-profile.pug index 029020b..cb76b1b 100644 --- a/src/views/partials/communities/page-community-profile.pug +++ b/src/views/partials/communities/page-community-profile.pug @@ -41,10 +41,10 @@ div.community-profile.padding-medium.sm-padding-none class-segment10="segment full text-right" - class-segment11="segment full whitespace-normal flex" - class-profile.picture1="communities-profile-picture segment third sm-full" - class-profile.picture2="communities-profile-picture segment third sm-full" - class-profile.picture3="communities-profile-picture segment third sm-full" + class-segment11="segment full whitespace-normal" + class-profile.picture1="communities-profile-picture segment third sm-full text-top" + class-profile.picture2="communities-profile-picture segment third sm-full text-top" + class-profile.picture3="communities-profile-picture segment third sm-full text-top" widget-logo="hubl-communities-profile-logo" widget-profile.description="solid-display-value-markdown"