Skip to content

Commit

Permalink
BP Block Widget UI and Circle/Square Avatar fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
vapvarun committed Dec 18, 2023
1 parent 69ef0c6 commit 016983a
Show file tree
Hide file tree
Showing 12 changed files with 634 additions and 316 deletions.
135 changes: 131 additions & 4 deletions assets/css/buddypress.css
Original file line number Diff line number Diff line change
Expand Up @@ -353,14 +353,27 @@ body.buddypress #buddypress.buddypress-wrap .html-active button.switch-html {
padding-left: 8px;
}

.buddypress .avatar {
.buddypress .avatar,
.grid > li .item-avatar .avatar {
border-radius: 3px;
}

.buddypress.round-avatars .avatar {
body.round-avatars .buddypress-wrap .avatar,
.buddypress.round-avatars .avatar,
body.round-avatars #buddypress #item-header-cover-image #item-header-avatar img.avatar {
border-radius: 50%;
}

.round-avatars #buddypress #item-header-cover-image #item-header-avatar .member-status {
right: 15px;
top: 15px;
}

body:not(.round-avatars) .grid .member-status {
right: -2px;
top: -2px;
}

@media screen and (min-width: 46.8em) {
.buddypress-wrap.bp-dir-hori-nav:not(.bp-vertical-navs) nav:not(.tabbed-links) {
border-bottom: 1px solid var(--global-border-color);
Expand Down Expand Up @@ -1708,6 +1721,19 @@ li.load-more a.loading::after {
animation: spin 1s infinite linear;
}

.buddypress .buddypress-wrap .generic-button .loading::after {
content: "\f110";
font-family: "FontAwesome";
font-size: 18px;
font-weight: 900;
line-height: 1;
margin-left: 10px;
text-align: center;
display: inline-block;
-webkit-animation: spin 1s infinite linear;
animation: spin 1s infinite linear;
}

@-ms-keyframes spin {
from {
-ms-transform: rotate(0deg);
Expand Down Expand Up @@ -1767,7 +1793,7 @@ li.load-more a.loading::after {
height: 80px;
width: 80px;
margin: 0 auto 10px;
border-radius: 50%;
/* border-radius: 50%; */
}

.bp-member-preview-cover,
Expand Down Expand Up @@ -3082,9 +3108,14 @@ button#bp-delete-avatar {
/*--------------------------------------------------------------
# BuddyPress Sidebar
--------------------------------------------------------------*/
.widget .activity-list {
padding: 0;
}

.buddypress-wrap .buddypress.widget .avatar-block,
.buddypress.widget .avatar-block {
display: flex;
flex-flow: row wrap;
margin: 0 -5px;
}

Expand Down Expand Up @@ -3249,7 +3280,19 @@ button#bp-delete-avatar {

.buddypress.widget div.activity-list blockquote .activity-item:not(.mini) {
padding-top: 15px;
padding-bottom: 1px;
padding-bottom: 15px;
box-shadow: none;
border: 1px solid var(--global-border-color);
border-radius: var(--global-border-radius);
}

.buddypress.widget .bp-latest-activities-block .activity-list blockquote {
margin: 0 0 15px;
padding: 0 !important;
}

.buddypress.widget div.activity-list blockquote .activity-item:not(.mini) p {
margin: 0;
}

.wp-block-bp-login-form form#bp-login-widget-form {
Expand Down Expand Up @@ -3277,6 +3320,90 @@ button#bp-delete-avatar {
outline: none;
}

.widget .bp-block-members .member-content .item-header-avatar img.avatar,
.widget .bp-block-groups .group-content .item-header-avatar img.avatar {
width: 50px;
height: 50px;
}

.widget .bp-block-members.avatar-full .item-header-avatar,
.widget .bp-block-groups.avatar-full .item-header-avatar {
width: 70px;
}

.widget .bp-dynamic-block-container .item-options {
font-size: 13px;
}

.widget .bp-block-member .member-content,
.widget .bp-block-group .group-content {
display: flex;
flex-direction: column;
}

.widget .bp-block-group .group-description,
.widget .bp-block-member .member-description {
padding: 15px 0 0;
text-align: center;
}

.widget .bp-block-member.avatar-full.has-cover .item-header-avatar,
.widget .bp-block-group.avatar-full.has-cover .item-header-avatar {
width: 100%;
text-align: center;
}

.widget .bp-block-group.avatar-full.has-cover img.avatar,
.widget .bp-block-member.avatar-full.has-cover img.avatar {
margin: auto;
}

.widget .bp-block-group.has-description .bp-profile-button a.button {
float: none;
}

.widget .bp-profile-button,
.widget .bp-block-group .bp-profile-button a.button,
.widget .bp-block-member .bp-profile-button a.button {
margin-top: 0;
position: static;
}

.widget .bp-block-member .member-description .bp-profile-button {
margin-top: 15px;
}

.widget .bp-block-member .bp-profile-button a.button,
.widget .bp-block-group.has-description .bp-profile-button a.button {
font-family: inherit;
font-size: medium;
color: #fff;
background-color: var(--button_background_color);
border-radius: var(--button-border-radius)!important;
padding: 8px 20px;
font-weight: 700;
font-style: normal;
text-decoration: none;
text-align: center;
cursor: pointer;
display: inline-block;
line-height: 1.3;
border: 1px solid var(--button_border_color);
outline: 0;
vertical-align: middle;
-webkit-appearance: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-transition: all .2s linear;
transition: all .2s linear;
}

.widget .bp-block-member .bp-profile-button a.button:hover,
.widget .bp-block-group.has-description .bp-profile-button a.button:hover {
background-color: var(--button_background_hover_color);
border: 1px solid var(--button_border_hover_color);
color: #fff;
}

/*--------------------------------------------------------------
# Extra Plugins Support
Expand Down
2 changes: 1 addition & 1 deletion assets/css/buddypress.min.css

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions assets/css/platform.css
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,15 @@ form.ac-form .ac-reply-content .ac-textarea .ac-input[contenteditable="true"] {
/*--------------------------------------------------------------
# Groups Directory
--------------------------------------------------------------*/
.round-avatars #buddypress #item-header-cover-image #item-header-avatar .member-status {
right: 15px;
top: 15px;
}

body:not(.round-avatars) .buddypress-wrap .members-list li .member-status {
right: -2px;
top: -2px;
}

.buddypress-wrap ul.bp-list.groups-dir-list:not(.grid) .item-entry .list-wrap {
background: #fff;
Expand Down Expand Up @@ -649,6 +658,13 @@ form.ac-form .ac-reply-content .ac-textarea .ac-input[contenteditable="true"] {
margin-top: auto;
max-width: 126px;
width: 100%;
}

.buddypress-wrap ul.bp-list.groups-dir-list.grid.bb-cover-enabled .group-avatar-wrap img.avatar {
border-radius: 3px;
}

body.round-avatars .buddypress-wrap ul.bp-list.groups-dir-list.grid.bb-cover-enabled .group-avatar-wrap img.avatar {
border-radius: 50%;
}

Expand Down Expand Up @@ -712,6 +728,10 @@ form.ac-form .ac-reply-content .ac-textarea .ac-input[contenteditable="true"] {
width: auto;
}

#buddypress #item-header-cover-image #item-header-avatar span.link-change-overlay {
display: none;
}

#item-header a.link-change-cover-image>i,
#item-header a.position-change-cover-image>i,
#item-header a.link-change-profile-image>i {
Expand Down
2 changes: 1 addition & 1 deletion assets/css/platform.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/woocommerce.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bb-buddypress/members/members-loop.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,4 +279,4 @@
</div>
</div>
</transition>
</div> <!-- .bb-remove-connection -->
</div> <!-- .bb-remove-connection -->
3 changes: 3 additions & 0 deletions external/kirki-utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ function buddyx_defaults( $key = '' ) {
// single post title layout
$defaults['single-post-title-layout'] = 'buddyx-section-title-above';

// buddypress avatar style
$defaults['buddypress-avatar-style'] = 'on';

if ( ! empty( $key ) && array_key_exists( $key, $defaults ) ) {
return $defaults[ $key ];
}
Expand Down
Loading

0 comments on commit 016983a

Please sign in to comment.