From 1d10f797a207a528f209148cf0db328792acf054 Mon Sep 17 00:00:00 2001 From: gaelle morin Date: Wed, 7 Apr 2021 23:21:50 +0200 Subject: [PATCH] patch: community-map --- package-lock.json | 6 +- package.json | 2 +- src/dependencies.pug | 4 + src/images/photos.svg | 1 + src/index.pug | 2 +- src/locales/en.json | 8 +- src/locales/es.json | 8 +- src/locales/fr.json | 8 +- src/styles/admin-circles/_index.scss | 100 +++++++++++++++++- src/styles/index.scss | 9 -- src/views/page-communities.pug | 76 ++++++------- .../partials/admin/page-admin-circles.pug | 7 -- .../communities/page-community-directory.pug | 10 +- .../communities/page-community-map.pug | 22 +++- .../communities/page-community-profile.pug | 74 +++++++++++++ src/views/partials/header.pug | 2 +- src/views/partials/menu-left.pug | 1 + src/views/partials/widgets.pug | 11 ++ .../widgets/hubl-admin-community-logo.pug | 2 +- .../hubl-communities-counter-alternate.pug | 4 +- .../widgets/hubl-communities-logo.pug | 4 +- .../hubl-communities-profile-address.pug | 4 + .../hubl-communities-profile-email.pug | 3 + .../hubl-communities-profile-facebook.pug | 3 + .../hubl-communities-profile-instagram.pug | 3 + .../hubl-communities-profile-linkedin.pug | 3 + .../widgets/hubl-communities-profile-logo.pug | 2 +- ...bl-communities-profile-members-counter.pug | 4 +- .../hubl-communities-profile-phone.pug | 3 + .../hubl-communities-profile-picture.pug | 3 + .../hubl-communities-profile-profile.pug | 6 -- .../hubl-communities-profile-twitter.pug | 3 + .../hubl-communities-profile-website.pug | 3 + 33 files changed, 309 insertions(+), 92 deletions(-) create mode 100644 src/images/photos.svg create mode 100644 src/views/partials/widgets/hubl-communities-profile-email.pug create mode 100644 src/views/partials/widgets/hubl-communities-profile-facebook.pug create mode 100644 src/views/partials/widgets/hubl-communities-profile-instagram.pug create mode 100644 src/views/partials/widgets/hubl-communities-profile-linkedin.pug create mode 100644 src/views/partials/widgets/hubl-communities-profile-phone.pug create mode 100644 src/views/partials/widgets/hubl-communities-profile-picture.pug delete mode 100644 src/views/partials/widgets/hubl-communities-profile-profile.pug create mode 100644 src/views/partials/widgets/hubl-communities-profile-twitter.pug create mode 100644 src/views/partials/widgets/hubl-communities-profile-website.pug diff --git a/package-lock.json b/package-lock.json index 045e087..7b2b879 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1159,9 +1159,9 @@ } }, "@startinblox/hubl-styling-framework": { - "version": "1.8.17", - "resolved": "https://registry.npmjs.org/@startinblox/hubl-styling-framework/-/hubl-styling-framework-1.8.17.tgz", - "integrity": "sha512-x9TlnpLs/k2WyJAwlYyexSXs3q9QmSOe/43E1O8Scuh4V1qzs5pnMKz9B91lw9563d6u62Z5WyGPeqaS4detmA==" + "version": "1.8.18", + "resolved": "https://registry.npmjs.org/@startinblox/hubl-styling-framework/-/hubl-styling-framework-1.8.18.tgz", + "integrity": "sha512-GdtuX2AjYwPQfMqU7oCuFfjTS4B9UKdnllYDi9Eg/F6XCcUIdUGSG05TP5yNPkuyI1OZ0Rj/arzhchzLOWqHhA==" }, "@types/q": { "version": "1.5.4", diff --git a/package.json b/package.json index 8a91316..7046887 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ ] }, "dependencies": { - "@startinblox/hubl-styling-framework": "^1.8.17", + "@startinblox/hubl-styling-framework": "^1.8.18", "cross-env": "^7.0.3", "fs-extra": "^9.0.1", "normalize.css": "^8.0.1", diff --git a/src/dependencies.pug b/src/dependencies.pug index d92c743..4623119 100644 --- a/src/dependencies.pug +++ b/src/dependencies.pug @@ -14,6 +14,10 @@ if componentSet.has("chat") || componentSet.has("circles") || componentSet.has(" script(type="module" src="https://cdn.skypack.dev/@startinblox/component-chat@5.2" defer) //- script(type="module" src="/lib/solid-xmpp-chat/dist/index.js" defer) +if componentSet.has("communities") + script(type="module" src="https://cdn.skypack.dev/@startinblox/core@0.16/dist/components/solid-map.js" defer) + //- script(type="module" src="/lib/sib-core/dist/components/solid-map.js" defer) + if componentSet.has("dashboard") script(type="module" src="https://cdn.skypack.dev/@startinblox/component-dashboard@4.0" defer) //- script(type="module" src="/lib/solid-dashboard/dist/index.js" defer) diff --git a/src/images/photos.svg b/src/images/photos.svg new file mode 100644 index 0000000..c01bb22 --- /dev/null +++ b/src/images/photos.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/index.pug b/src/index.pug index 7d6fcfb..fa00420 100644 --- a/src/index.pug +++ b/src/index.pug @@ -112,7 +112,7 @@ html(lang="en") include views/page-circle.pug if component.type == "communities" - .scrollbar-content + .scrollbar-content.whitespace-normal include views/page-communities.pug if component.type == "dashboard" diff --git a/src/locales/en.json b/src/locales/en.json index 2c3d40e..778dc96 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -161,7 +161,13 @@ "list": { "title": "Communities", "searchBy": "Find by name", - "searchButton": "Search" + "searchButton": "Search", + "members": "members" + }, + "profile": { + "back": "Back", + "members": "members", + "edit": "Edit the page" } }, "project": { diff --git a/src/locales/es.json b/src/locales/es.json index b369dda..43bd5d2 100644 --- a/src/locales/es.json +++ b/src/locales/es.json @@ -161,7 +161,13 @@ "list": { "title": "", "searchBy": "", - "searchButton": "" + "searchButton": "", + "members": "" + }, + "profile": { + "back": "", + "members": "", + "edit": "" } }, "project": { diff --git a/src/locales/fr.json b/src/locales/fr.json index ba9b513..75f732c 100644 --- a/src/locales/fr.json +++ b/src/locales/fr.json @@ -161,7 +161,13 @@ "list": { "title": "Les communautés", "searchBy": "Trouver par nom", - "searchButton": "Rechercher" + "searchButton": "Rechercher", + "members": "membres" + }, + "profile": { + "back": "Retour", + "members": "membres", + "edit": "Editer la page" } }, "project": { diff --git a/src/styles/admin-circles/_index.scss b/src/styles/admin-circles/_index.scss index e80679a..84ad1df 100644 --- a/src/styles/admin-circles/_index.scss +++ b/src/styles/admin-circles/_index.scss @@ -1,5 +1,6 @@ #admin-circles, -#admin-circles-leave { +#admin-circles-leave, +.communities-directory { /* Fix on Join button in admin (circles + projects) */ /* Styles on buttons and .children-link don't work because this input is inside too many elements. */ @@ -115,12 +116,77 @@ } } + hubl-communities-profile-logo { + height: 155px; + width: 100%; + display: block; + + div { + display: block; + width: 100%; + height: 100%; + background-position: center; + background-repeat: no-repeat; + background-size: contain; + } + } + .tab.active { font-weight: bold; border-bottom: 5px solid var(--color-third); padding-bottom: 10px; } + .communities-profile-picture { + height: 200px; + + div { + display: block; + width: 100%; + height: 100%; + background-position: center; + background-repeat: no-repeat; + background-size: contain; + } + + .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(3)>.picture-empty { + background: #E9F2FF; + + svg { + fill: #D7E2F3; + } + } + } + + .communities-profile-map .leaflet-pane.leaflet-popup-pane { + /*display: none;*/ + + .leaflet-popup-content-wrapper { + white-space: normal; + } + } + @media (max-width: 768px) { .tabs { @@ -143,5 +209,37 @@ } } } + + .community-profile-logo { + border-bottom: 1px solid #D6CECE; + } + + hubl-communities-profile-logo { + height: 100px; + } + + .communities-profile-picture { + height: 180px; + + object { + height: 80px; + width: 80px; + } + } + + .mobile-map-search-field { + position: fixed; + top: 70px; + z-index: 1000; + width: 97%; + } + + .communities-map { + height: calc(100vh - 50px) !important; + + .leaflet-top.leaflet-left { + display: none; + } + } } } \ No newline at end of file diff --git a/src/styles/index.scss b/src/styles/index.scss index 96632fc..a5fc667 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -88,15 +88,6 @@ hubl-menu-empty+hubl-menu-empty { justify-content: center; } -/* Animation on cards in #communities */ -#communities { - - .segment.hover:hover { - box-shadow: 0 0 16px 0 rgba(46, 63, 88, 0.34); - bottom: 2px; - } -} - /* Style that already exists in the framework but strangely I can't find it in the inspector. So I duplicate it here */ .two-lines-ellipsis { display: -webkit-box !important; diff --git a/src/views/page-communities.pug b/src/views/page-communities.pug index e26480c..dfa5687 100644 --- a/src/views/page-communities.pug +++ b/src/views/page-communities.pug @@ -1,42 +1,34 @@ -div.padding-small.whitespace-normal.sm-padding-none.sm-padding-top-large.sm-padding-bottom-large - - h2.margin-top-xxsmall.margin-left-xsmall.margin-bottom-medium.sm-margin-none.sm-margin-right-xsmall.sm-margin-bottom-large.sm-margin-left-xsmall.text-xlarge.text-bold.text-color-heading.text-uppercase(data-trans='communities.list.title') - - div.padding-top-xxsmall.margin-left-xsmall.sm-padding-none.sm-margin-none.sm-margin-right-xsmall.sm-margin-left-xsmall - div.segment.half.sm-full - solid-form-search.form.search-form.search-button( - id=`communities-filter-${page}` - fields='name' - placeholder-name='' - widget-name='solid-form-placeholder-text' - class-name="segment margin-bottom-medium sm-margin-bottom-none three-quarter sm-full padding-right-small sm-padding-none text-small input-bg-white children-shadow" - submit-button="" - submit-widget="button" - data-trans='placeholder-name=communities.list.searchBy;submit-button=communities.list.searchButton' - ) - div.segment.half.sm-full.text-right - solid-link.segment.children-link-rounded.children-icon-map.children-link-reversed.color-secondary.bordered - span - - div.segment.full.padding-top-xsmall.sm-padding-xsmall.whitespace-normal - solid-display( - class='segment full children children-quarter sm-children-full children-margin-bottom-medium sm-children-margin-bottom-xsmall children-padding-right-xsmall children-padding-left-xsmall sm-children-padding-none sm-whitespace-normal masonry pagination' - data-src='https://api.test3.startinblox.com/communities/' - fields='segment1(segment2(logo), segment3(name, profile.shortDescription, counter))' - filtered-by=`communities-filter-${page}` - order-by='name' - paginate-by='20' - loader-id=`loader-communities-${page}` - - class-segment1='segment hover bg-color-white shadow border-rounded-xxsmall full text-top whitespace-normal' - class-segment2='segment block padding-xlarge text-center' - class-segment3='segment full padding-xlarge padding-top-medium sm-padding-medium border-top border-color-grey text-center whitespace-normal' - class-name='segment block one-line-ellipsis text-xlarge text-bold text-color-heading margin-bottom-xsmall' - class-profile.shortDescription='segment two-lines-ellipsis margin-bottom-xlarge sm-margin-bottom-medium whitespace-normal circle-subtitle-custom' - class-counter='segment block margin-bottom-large whitespace-normal' - - widget-logo='hubl-communities-logo' - action-counter="counter" - widget-counter='hubl-communities-counter-alternate' - next="" - ) \ No newline at end of file +div.communities-directory + solid-router(default-route=`${component.route}-directory` hidden) + solid-route(name=`${component.route}-directory`) + solid-route(name=`${component.route}-map`) + solid-route(name=`${component.route}-profile` use-id) + solid-route(name=`${component.route}-edit` use-id) + div( + id=`${component.route}-directory` + hidden + data-view=`${component.route}-directory` + no-render + ) + include partials/communities/page-community-directory.pug + div( + id=`${component.route}-map` + hidden + data-view=`${component.route}-map` + no-render + ) + include partials/communities/page-community-map.pug + div( + id=`${component.route}-profile` + hidden + data-view=`${component.route}-profile` + no-render + ) + include partials/communities/page-community-profile.pug + div( + id=`${component.route}-edit` + hidden + data-view=`${component.route}-edit` + no-render + ) + include partials/communities/page-community-edit.pug diff --git a/src/views/partials/admin/page-admin-circles.pug b/src/views/partials/admin/page-admin-circles.pug index 2e18bd4..9aae27b 100644 --- a/src/views/partials/admin/page-admin-circles.pug +++ b/src/views/partials/admin/page-admin-circles.pug @@ -22,18 +22,11 @@ div.segment.full.padding-large.padding-top-medium.padding-bottom-xsmall.sm-paddi solid-form-search.form.search-form.search-button( id=`admin-circle-filter-${page}` -<<<<<<< HEAD - fields='name' - label-name='' - widget-name='solid-form-label-text' - class-name="segment margin-bottom-medium sm-margin-bottom-none third sm-full padding-right-small sm-padding-none text-small" -======= fields='searchname' search-searchname='name, circle.name' label-searchname='' widget-searchname='solid-form-label-text' class-searchname="segment margin-bottom-medium sm-margin-bottom-none third sm-full padding-right-small sm-padding-none text-small text-semibold text-uppercase text-color-heading" ->>>>>>> b9a8c8ba4de7985088e46bda8c024cf121439ff8 submit-button="" submit-widget="button" data-trans='label-searchname=circle.list.searchBy;submit-button=circle.list.searchButton' diff --git a/src/views/partials/communities/page-community-directory.pug b/src/views/partials/communities/page-community-directory.pug index 50b0ba8..e615b49 100644 --- a/src/views/partials/communities/page-community-directory.pug +++ b/src/views/partials/communities/page-community-directory.pug @@ -1,7 +1,7 @@ -.padding-small.sm-padding-none.sm-padding-top-large.sm-padding-bottom-large - h2.margin-top-xxsmall.margin-left-xsmall.margin-bottom-medium.sm-margin-none.sm-margin-right-xsmall.sm-margin-bottom-large.sm-margin-left-xsmall.text-xlarge.text-bold.text-color-heading.text-uppercase(data-trans='communities.list.title') +.padding-small.sm-padding-none.sm-padding-top-medium.sm-padding-bottom-medium + h2.margin-top-xxsmall.margin-left-xsmall.margin-bottom-medium.sm-margin-none.sm-margin-right-xsmall.sm-margin-bottom-small.sm-margin-left-xsmall.text-xlarge.text-bold.text-color-heading.text-uppercase(data-trans='communities.list.title') - div.padding-top-xxsmall.margin-left-xsmall.sm-padding-none.sm-margin-none.sm-margin-right-xsmall.sm-margin-left-xsmall + div.padding-top-xxsmall.margin-left-xsmall.margin-right-xsmall.sm-padding-none.sm-margin-none.sm-margin-right-xsmall.sm-margin-left-xsmall div.segment.half.sm-full solid-form-search.form.search-form.search-button( id=`communities-filter` @@ -34,10 +34,10 @@ class-segment1='segment hover bg-color-white shadow border-rounded-xxsmall full text-top whitespace-normal' class-segment2='segment block padding-xlarge text-center' - class-segment3='segment full padding-xlarge padding-top-medium sm-padding-medium border-top border-color-grey text-center whitespace-normal' + class-segment3='segment full padding-xlarge sm-padding-medium border-top border-color-grey text-center whitespace-normal' class-name='segment block one-line-ellipsis text-xlarge text-bold text-color-heading margin-bottom-xsmall' class-profile.shortDescription='segment two-lines-ellipsis margin-bottom-xlarge sm-margin-bottom-medium whitespace-normal circle-subtitle-custom' - class-counter='segment block margin-bottom-large whitespace-normal' + class-counter='segment block whitespace-normal' widget-logo='hubl-admin-community-logo' action-counter="counter" diff --git a/src/views/partials/communities/page-community-map.pug b/src/views/partials/communities/page-community-map.pug index 68ce18d..bdaa8de 100644 --- a/src/views/partials/communities/page-community-map.pug +++ b/src/views/partials/communities/page-community-map.pug @@ -1,18 +1,30 @@ -.padding-small.sm-padding-none.sm-padding-top-large.sm-padding-bottom-large - h2.margin-top-xxsmall.margin-left-xsmall.margin-bottom-medium.sm-margin-none.sm-margin-right-xsmall.sm-margin-bottom-large.sm-margin-left-xsmall.text-xlarge.text-bold.text-color-heading.text-uppercase(data-trans='communities.list.title') +.padding-small.sm-padding-none + h2.segment.sm-hidden.margin-top-xxsmall.margin-left-xsmall.margin-bottom-medium.sm-margin-none.sm-margin-right-xsmall.sm-margin-bottom-large.sm-margin-left-xsmall.text-xlarge.text-bold.text-color-heading.text-uppercase(data-trans='communities.list.title') - div.padding-top-xxsmall.margin-left-xsmall.sm-padding-none.sm-margin-none.sm-margin-right-xsmall.sm-margin-left-xsmall + div.mobile-map-search-field.padding-top-xxsmall.margin-left-xsmall.margin-right-xsmall.sm-padding-none.sm-margin-none.sm-margin-right-xsmall.sm-margin-left-xsmall div.segment.half.sm-full solid-form-search.form.search-form.search-button( id=`communities-filter-map` fields='name' + search-name='community.name' placeholder-name='' widget-name='solid-form-placeholder-text' class-name="segment margin-bottom-medium sm-margin-bottom-none three-quarter sm-full padding-right-small sm-padding-none text-small input-bg-white children-shadow" + submit-button="" submit-widget="button" data-trans='placeholder-name=communities.list.searchBy;submit-button=communities.list.searchButton' ) div.segment.half.sm-full.text-right - solid-link.segment.children-link-rounded.children-icon-map.children-link-reversed.color-secondary.bordered(next=`${component.route}-directory`) - span \ No newline at end of file + solid-link.segment.children-link-rounded.children-icon-grid.children-link-reversed.color-secondary.bordered(next=`${component.route}-directory`) + span + + solid-map.communities-map.margin-right-xsmall.margin-left-xsmall.sm-margin-none.shadow( + data-src=`${component.endpoints.get}` + loader-id=`loader-${component.route}-map` + nested-field="addresses" + fields="position(community.name, community.profile.shortDescription, address_line1, address_line2)" + clustering="" + filtered-by=`communities-filter-map` + style="display:block;height:698px;" + ) \ 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 e69de29..9e49a46 100644 --- a/src/views/partials/communities/page-community-profile.pug +++ b/src/views/partials/communities/page-community-profile.pug @@ -0,0 +1,74 @@ +div.community-profile.padding-medium.sm-padding-none + div.segment.full.sm-hidden.text-right + solid-link.backlink.text-xlarge.line-xlarge.margin-right-xxsmall(next=`${component.route}-directory` data-trans="communities.profile.back") + + div.segment.block.shadow.bg-color-white.margin-right-xxsmall.margin-top-large.margin-left-xxsmall.sm-margin-none + + div.loader(id=`loader-${component.route}-profile`) + div + div + div + div + + solid-display.segment.block.whitespace-normal( + fields="segment0(segment1(community-picture(logo)), segment2(segment3(segment4(name),segment5(profile.tweeter, profile.facebook, profile.linkedin, profile.instagram)), segment6(profile.shortDescription), segment7(profile.tweeter, profile.facebook, profile.linkedin, profile.instagram), segment8(addresses.adress_line1, addresses.address_line2, members, profile.website, profile.email, profile.phone), segment9(profile.description), segment10(edit))), segment11(profile.picture1, profile.picture2, profile.picture3)" + loader-id=`loader-${component.route}-profile` + + class-segment0="segment full padding-xlarge sm-padding-none whitespace-normal" + class-segment1="community-profile-logo segment third sm-full margin-top-medium padding-top-medium padding-right-medium sm-margin-top-xsmall sm-padding-medium text-center" + + class-segment2="segment two-third sm-full sm-padding-top-medium sm-padding-right-xsmall sm-padding-bottom-medium sm-padding-left-xsmall text-top sm-text-center whitespace-normal" + + class-segment3="segment full sm-two-third text-center" + class-segment4="segment half sm-two-third padding-top-xsmall" + class-name="segment block text-color-heading text-xxlarge text-bold sm-text-center margin-bottom-xxsmall whitespace-normal" + class-segment5="segment half text-right sm-hidden" + + class-segment6="segment two-third sm-full padding-top-xsmall sm-text-center" + class-profile.shortDescription="segment block sm-text-center margin-bottom-large whitespace-normal" + + class-segment7="segment lg-hidden sm-full" + + class-segment8="segment two-third sm-full padding-bottom-large padding-bottom-xxsmall sm-text-left" + + class-segment9="segment full" + class-profile.description="segment full whitespace-normal" + + class-segment10="segment full text-right margin-top-xxlarge" + action-edit=`${component.route}-edit` + class-edit="segment sm-full button text-xsmall text-bold text-uppercase text-center reversed color-secondary bordered icon icon-pencil" + value-edit="" + data-trans='value-edit=communities.profile.edit' + + class-segment11="segment full whitespace-normal" + class-profile.picture1="communities-profile-picture segment third" + class-profile.picture2="communities-profile-picture segment third" + class-profile.picture3="communities-profile-picture segment third" + + widget-logo="hubl-communities-profile-logo" + widget-profile.tweeter="hubl-communities-profile-twitter" + widget-profile.facebook="hubl-communities-profile-facebook" + widget-profile.linkedin="hubl-communities-profile-linkedin" + widget-profile.instagram="hubl-communities-profile-instagram" + widget-addresses="hubl-communities-profile-address" + widget-members="hubl-communities-profile-members-counter" + widget-profile.website="hubl-communities-profile-website" + widget-profile.email="hubl-communities-profile-email" + widget-profile.phone="hubl-communities-profile-phone" + widget-profile.picture1="hubl-communities-profile-picture" + widget-profile.picture2="hubl-communities-profile-picture" + widget-profile.picture3="hubl-communities-profile-picture" + + bind-resources + ) + + solid-map.communities-profile-map( + bind-resources + nested-field="addresses" + fields="position(community.name, address_line1, address_line2)" + class-community-name="segment block margin bottom-xsmall text-color-heading text-xlarge text-bold" + class-address_line1="segment block" + class-address_line2="segment block" + clustering="" + style="display:block;height:450px;" + ) diff --git a/src/views/partials/header.pug b/src/views/partials/header.pug index 5277980..ca1a3d1 100644 --- a/src/views/partials/header.pug +++ b/src/views/partials/header.pug @@ -99,7 +99,7 @@ div if componentSet.has("communities") solid-link.text-hover(next=`admin-${getRoute("chat", true)}`) li.segment.padding-top-small.sm-padding-top-medium - a.icon.icon-people.icon-third.icon-small.icon-margin-right-xsmall(data-trans='admin.menuRight.community') + a.icon.icon-grid.icon-third.icon-small.icon-margin-right-xsmall(data-trans='admin.menuRight.community') if componentSet.has("circles") solid-link.text-hover(next=`admin-${getRoute("circles", true)}`) li.segment.padding-top-small.sm-padding-top-medium diff --git a/src/views/partials/menu-left.pug b/src/views/partials/menu-left.pug index 4a50ef6..fa362ab 100644 --- a/src/views/partials/menu-left.pug +++ b/src/views/partials/menu-left.pug @@ -28,6 +28,7 @@ solid-router#navbar-router(default-route='dashboard') div.segment.margin-right-xxsmall div.segment.icon.icon-small.icon-grid div.segment.text-uppercase.text-letter-spacing-large(data-trans="menuLeft.communities") + solid-route(name=`${component.route}-profile`) div.divider if component.type == "circles" diff --git a/src/views/partials/widgets.pug b/src/views/partials/widgets.pug index 9abc0d8..a95c9f6 100644 --- a/src/views/partials/widgets.pug +++ b/src/views/partials/widgets.pug @@ -22,6 +22,17 @@ include widgets/hubl-circle-team-contact.pug include widgets/hubl-circle-user-admin.pug include widgets/hubl-communities-counter-alternate.pug include widgets/hubl-communities-logo.pug +include widgets/hubl-communities-profile-address.pug +include widgets/hubl-communities-profile-email.pug +include widgets/hubl-communities-profile-facebook.pug +include widgets/hubl-communities-profile-instagram.pug +include widgets/hubl-communities-profile-linkedin.pug +include widgets/hubl-communities-profile-logo.pug +include widgets/hubl-communities-profile-members-counter.pug +include widgets/hubl-communities-profile-phone.pug +include widgets/hubl-communities-profile-picture.pug +include widgets/hubl-communities-profile-twitter.pug +include widgets/hubl-communities-profile-website.pug include widgets/hubl-counter.pug include widgets/hubl-email-field.pug include widgets/hubl-menu-empty.pug diff --git a/src/views/partials/widgets/hubl-admin-community-logo.pug b/src/views/partials/widgets/hubl-admin-community-logo.pug index 8db707e..183b486 100644 --- a/src/views/partials/widgets/hubl-admin-community-logo.pug +++ b/src/views/partials/widgets/hubl-admin-community-logo.pug @@ -1,3 +1,3 @@ -if componentSet.has('admin') && componentSet.has('circles') +if (componentSet.has('admin') && componentSet.has('circles')) || componentSet.has('communities') solid-widget(name='hubl-admin-community-logo') template ${value != "" ? `
` : `
`} \ No newline at end of file diff --git a/src/views/partials/widgets/hubl-communities-counter-alternate.pug b/src/views/partials/widgets/hubl-communities-counter-alternate.pug index a92b274..076edea 100644 --- a/src/views/partials/widgets/hubl-communities-counter-alternate.pug +++ b/src/views/partials/widgets/hubl-communities-counter-alternate.pug @@ -1,4 +1,4 @@ -if componentSet.has('admin') && componentSet.has('communities') +if componentSet.has('communities') solid-widget(name='hubl-communities-counter-alternate') template div @@ -9,4 +9,4 @@ if componentSet.has('admin') && componentSet.has('communities') nested-field="members" counter-template="\\\${counter}" ) - span members + span(data-trans="communities.list.members") diff --git a/src/views/partials/widgets/hubl-communities-logo.pug b/src/views/partials/widgets/hubl-communities-logo.pug index adde5a4..17cea6c 100644 --- a/src/views/partials/widgets/hubl-communities-logo.pug +++ b/src/views/partials/widgets/hubl-communities-logo.pug @@ -1,3 +1,3 @@ -if componentSet.has('admin') && componentSet.has('communities') +if componentSet.has('communities') solid-widget(name='hubl-communities-logo') - template ${value != "" ? `
` : `
`} \ No newline at end of file + template ${value != "" ? `
` : `
`} diff --git a/src/views/partials/widgets/hubl-communities-profile-address.pug b/src/views/partials/widgets/hubl-communities-profile-address.pug index e69de29..b59b961 100644 --- a/src/views/partials/widgets/hubl-communities-profile-address.pug +++ b/src/views/partials/widgets/hubl-communities-profile-address.pug @@ -0,0 +1,4 @@ +if componentSet.has('communities') + solid-widget(name='hubl-communities-profile-address') + template + | ${await value != "" ? `\${await value.adress_line1}
\${await value.adress_line2}
` : ``} diff --git a/src/views/partials/widgets/hubl-communities-profile-email.pug b/src/views/partials/widgets/hubl-communities-profile-email.pug new file mode 100644 index 0000000..c9b0876 --- /dev/null +++ b/src/views/partials/widgets/hubl-communities-profile-email.pug @@ -0,0 +1,3 @@ +if componentSet.has('communities') + solid-widget(name='hubl-communities-profile-email') + template ${value != "" ? `\$value` : ``} diff --git a/src/views/partials/widgets/hubl-communities-profile-facebook.pug b/src/views/partials/widgets/hubl-communities-profile-facebook.pug new file mode 100644 index 0000000..11716b0 --- /dev/null +++ b/src/views/partials/widgets/hubl-communities-profile-facebook.pug @@ -0,0 +1,3 @@ +if componentSet.has('communities') + solid-widget(name='hubl-communities-profile-facebook') + template ${value != "" ? `` : ``} diff --git a/src/views/partials/widgets/hubl-communities-profile-instagram.pug b/src/views/partials/widgets/hubl-communities-profile-instagram.pug new file mode 100644 index 0000000..34d5c6f --- /dev/null +++ b/src/views/partials/widgets/hubl-communities-profile-instagram.pug @@ -0,0 +1,3 @@ +if componentSet.has('communities') + solid-widget(name='hubl-communities-profile-instagram') + template ${value != "" ? `` : ``} diff --git a/src/views/partials/widgets/hubl-communities-profile-linkedin.pug b/src/views/partials/widgets/hubl-communities-profile-linkedin.pug new file mode 100644 index 0000000..c3801f8 --- /dev/null +++ b/src/views/partials/widgets/hubl-communities-profile-linkedin.pug @@ -0,0 +1,3 @@ +if componentSet.has('communities') + solid-widget(name='hubl-communities-profile-linkedin') + template ${value != "" ? `` : ``} diff --git a/src/views/partials/widgets/hubl-communities-profile-logo.pug b/src/views/partials/widgets/hubl-communities-profile-logo.pug index aadc962..a58adb6 100644 --- a/src/views/partials/widgets/hubl-communities-profile-logo.pug +++ b/src/views/partials/widgets/hubl-communities-profile-logo.pug @@ -1,3 +1,3 @@ -if componentSet.has('admin') && componentSet.has('communities') +if componentSet.has('communities') solid-widget(name='hubl-communities-profile-logo') template ${value != "" ? `
` : `
`} \ No newline at end of file diff --git a/src/views/partials/widgets/hubl-communities-profile-members-counter.pug b/src/views/partials/widgets/hubl-communities-profile-members-counter.pug index 45a7e41..0ce0538 100644 --- a/src/views/partials/widgets/hubl-communities-profile-members-counter.pug +++ b/src/views/partials/widgets/hubl-communities-profile-members-counter.pug @@ -1,4 +1,4 @@ -if componentSet.has('admin') && componentSet.has('communities') +if componentSet.has('communities') solid-widget(name='hubl-communities-profile-members-counter') template p @@ -8,4 +8,4 @@ if componentSet.has('admin') && componentSet.has('communities') fields='' counter-template="\\\${counter}" ) - span members \ No newline at end of file + span(data-trans="communities.profile.members") \ No newline at end of file diff --git a/src/views/partials/widgets/hubl-communities-profile-phone.pug b/src/views/partials/widgets/hubl-communities-profile-phone.pug new file mode 100644 index 0000000..183befb --- /dev/null +++ b/src/views/partials/widgets/hubl-communities-profile-phone.pug @@ -0,0 +1,3 @@ +if componentSet.has('communities') + solid-widget(name='hubl-communities-profile-phone') + template ${value != "" ? `\$value` : ``} diff --git a/src/views/partials/widgets/hubl-communities-profile-picture.pug b/src/views/partials/widgets/hubl-communities-profile-picture.pug new file mode 100644 index 0000000..37caa95 --- /dev/null +++ b/src/views/partials/widgets/hubl-communities-profile-picture.pug @@ -0,0 +1,3 @@ +if componentSet.has('communities') + solid-widget(name='hubl-communities-profile-picture') + template ${value != "" ? `
` : `
`} diff --git a/src/views/partials/widgets/hubl-communities-profile-profile.pug b/src/views/partials/widgets/hubl-communities-profile-profile.pug deleted file mode 100644 index c0c53b3..0000000 --- a/src/views/partials/widgets/hubl-communities-profile-profile.pug +++ /dev/null @@ -1,6 +0,0 @@ -if componentSet.has('admin') && componentSet.has('communities') - solid-widget(name='hubl-communities-profile-profile') - template - | ${value.website != "" ? `\$value.website` : `
`} - | ${value.email != "" ? `\$value.email` : `
`} - | ${value.phone != "" ? `\$value.phone` : `
`} diff --git a/src/views/partials/widgets/hubl-communities-profile-twitter.pug b/src/views/partials/widgets/hubl-communities-profile-twitter.pug new file mode 100644 index 0000000..364c07e --- /dev/null +++ b/src/views/partials/widgets/hubl-communities-profile-twitter.pug @@ -0,0 +1,3 @@ +if componentSet.has('communities') + solid-widget(name='hubl-communities-profile-twitter') + template ${value != "" ? `` : ``} diff --git a/src/views/partials/widgets/hubl-communities-profile-website.pug b/src/views/partials/widgets/hubl-communities-profile-website.pug new file mode 100644 index 0000000..41eaf9c --- /dev/null +++ b/src/views/partials/widgets/hubl-communities-profile-website.pug @@ -0,0 +1,3 @@ +if componentSet.has('communities') + solid-widget(name='hubl-communities-profile-website') + template ${value != "" ? `$value` : ``}