diff --git a/src/dependencies.pug b/src/dependencies.pug index f1c82fd..a1daf4f 100644 --- a/src/dependencies.pug +++ b/src/dependencies.pug @@ -20,5 +20,5 @@ script(type="module" src="https://unpkg.com/@startinblox/router@0.7.2") script(type="module" src="https://unpkg.com/@startinblox/component-chat@0.1.7") script(type="module" src="https://unpkg.com/@startinblox/component-notifications@0.1.12") script(type="module" src="https://unpkg.com/@startinblox/component-conversation@0.2.1") -script(type="module" src="https://unpkg.com/@startinblox/component-directory@0.1.15") +script(type="module" src="https://unpkg.com/@startinblox/component-directory@0.1.16") diff --git a/src/header.pug b/src/header.pug index 9099c88..0f37c0b 100644 --- a/src/header.pug +++ b/src/header.pug @@ -11,15 +11,13 @@ sib-notifications( bind-user ) -sib-widget(name="user-picture") - template - img(name="${name}",src="\${value || '/images/user.jpg'}",style="max-width:100%; max-height: 100%;") +include templates/hd-user-avatar.pug details#user-controls summary(tabindex='0' role='button') sib-display#user-controls__profile( data-fields='first_name, account.picture', - widget-account.picture='user-picture', + widget-account.picture='hd-user-avatar', bind-user ) #user-controls__panel diff --git a/src/page-job-offers.pug b/src/page-job-offers.pug index f648a42..51ad526 100644 --- a/src/page-job-offers.pug +++ b/src/page-job-offers.pug @@ -1,5 +1,6 @@ div.job-offers__main + include templates/hd-user-avatar.pug include templates/template-groups.pug include templates/template-skills.pug include templates/template-joboffers-filter.pug @@ -12,7 +13,7 @@ div.job-offers__main data-fields='user-thumb, creationDate, title, description, skills, send', set-user-thumb='author.account.picture, author.first_name, author.groups', - widget-author.account.picture='sib-display-img', + widget-author.account.picture='hd-user-avatar', widget-author.groups='groups-name', multiple-author.groups, diff --git a/src/styles/layout/job-offers/job-offers.scss b/src/styles/layout/job-offers/job-offers.scss index 186b446..066372c 100644 --- a/src/styles/layout/job-offers/job-offers.scss +++ b/src/styles/layout/job-offers/job-offers.scss @@ -87,7 +87,7 @@ } } - sib-display-img { + hd-user-avatar { background-color: $color-0-0-100; border-radius: 50%; height: 4.25rem; diff --git a/src/templates/hd-user-avatar.pug b/src/templates/hd-user-avatar.pug new file mode 100644 index 0000000..86a0d4c --- /dev/null +++ b/src/templates/hd-user-avatar.pug @@ -0,0 +1,3 @@ +sib-widget(name='hd-user-avatar') + template + img(name="${name}",src="\${value || '/images/alien.jpg'}",style="max-width:100%; max-height: 100%;") \ No newline at end of file diff --git a/src/templates/template-team.pug b/src/templates/template-team.pug index 1f42849..2b80733 100644 --- a/src/templates/template-team.pug +++ b/src/templates/template-team.pug @@ -1,9 +1,11 @@ +include hd-user-avatar.pug + sib-widget(name='team-template') template sib-display( data-src="${value.user['@id']}" data-fields='account.picture', - widget-account.picture='sib-display-img' + widget-account.picture='hd-user-avatar' ) div(name='user.thumb') span ${value.user.name} diff --git a/www/images/alien.jpg b/www/images/alien.jpg new file mode 100644 index 0000000..c6277a1 Binary files /dev/null and b/www/images/alien.jpg differ diff --git a/www/images/user.jpg b/www/images/user.jpg deleted file mode 100644 index 6edfb38..0000000 Binary files a/www/images/user.jpg and /dev/null differ