Style contributors list (first pass)

This commit is contained in:
Kelly Dwan 2019-11-12 12:33:32 -05:00
parent da76512d55
commit 7dbc725581
No known key found for this signature in database
GPG key ID: 8BA5575F3D11575D
2 changed files with 30 additions and 13 deletions

View file

@ -43,3 +43,24 @@
.pledge-form .email-status.is-unconfirmed {
color: #c92c2c;
}
.contributor-list li * {
vertical-align: middle;
}
.contributor-list .button-link-delete {
text-decoration: none;
margin-right: 8px;
}
.contributor-list .avatar {
margin-right: 8px;
}
.contributor-list .contributor-list__name {
font-size: 1.1em;
}
.contributor-list .button {
float: right;
}

View file

@ -28,21 +28,17 @@ namespace WordPressDotOrg\FiveForTheFuture\View;
$contributor = get_user_by( 'login', $contributor_post->post_title );
?>
<li>
<?php echo get_avatar( $contributor->user_email, 32 ); ?>
<?php echo esc_html( $contributor_post->post_title ); ?>
<!-- TODO These buttons don't do anything yet.
<button class="button-primary" data-action="remove-contributor" data-contributor-post="<?php echo esc_attr( $contributor_post->ID ); ?>">
<?php esc_html_e( 'Remove', 'wporg' ); ?>
<button class="button-link button-link-delete" data-action="remove-contributor" data-contributor-post="<?php echo esc_attr( $contributor_post->ID ); ?>" aria-label="<?php esc_html_e( 'Remove', 'wporg' ); ?>">
<span class="dashicons dashicons-no-alt" aria-hidden="true"></span>
</button>
-->
<?php echo get_avatar( $contributor->user_email, 32 ); ?>
<span class="contributor-list__name">
<?php echo esc_html( $contributor_post->post_title ); ?>
</span>
<?php if ( 'pending' === $contributor_post->post_status ) : ?>
<?php submit_button(
'Resend Confirmation',
'secondary',
'resend-contributor-confirmation',
false,
array( 'formaction' => add_query_arg( 'resend-contributor-id', $contributor_post->ID ) )
); ?>
<button class="button" data-action="resend-contributor-confirmation" data-contributor-post="<?php echo esc_attr( $contributor_post->ID ); ?>">
<?php esc_html_e( 'Resend Confirmation', 'wporg' ); ?>
</button>
<?php endif; ?>
</li>
<?php endforeach; ?>